Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

118 lines
2.0 KiB

  1. title OS2_STUB - OS/2 Simulation routines for DOS 3
  2. ; These routines simulate family API routines for DOS 3
  3. ;
  4. ; Routines which are never called under DOS 3 just return
  5. ; popping the parameters.
  6. ;
  7. ; 87/04/24 SKS DOSGETMACHINEMODE stores a Byte, not a Word!
  8. ;
  9. memL=1 ; simulate large model for returns
  10. ?PLM=1 ; pascal calling conventions
  11. ?WIN=0 ; no Windows
  12. .xlist
  13. include cmac_mrt.inc ; old, customized masm510 cmacros
  14. .list
  15. include msdos.inc
  16. sBegin code
  17. assumes cs,code
  18. ; __DOSDEVCONFIG - return 8087/80287 indicator
  19. cProc __DOSDEVCONFIG,<PUBLIC>,<ES,BX>
  20. parmDP devinfo
  21. parmW devitem
  22. parmW reserved
  23. cbegin
  24. les bx,devinfo
  25. mov word ptr es:[bx],1 ; assume have 287
  26. xor ax,ax ; return no error
  27. cend
  28. ; __DOSGETMACHINEMODE - return real mode indicator
  29. cProc __DOSGETMACHINEMODE,<PUBLIC>,<ES,BX>
  30. parmDP mode
  31. cbegin
  32. les bx,mode
  33. xor ax,ax ; ax = return code and mode
  34. mov es:[bx],al ; set machine mode to real
  35. cend
  36. ; __DOSSETVEC - never called under DOS 3.x
  37. cProc __DOSSETVEC,<PUBLIC>,<>
  38. parmDP oldaddr
  39. parmDP newaddr
  40. parmW vecnum
  41. cbegin
  42. cend
  43. ; __DOSCREATECSALIAS
  44. cProc __DOSCREATECSALIAS,<PUBLIC>,<ES,BX>
  45. parmW dataseg
  46. parmDP csalias
  47. cbegin
  48. mov ax,dataseg
  49. les bx,csalias
  50. mov es:[bx],ax ; use dataseg value
  51. cend
  52. ; __DOSFREESEG - never called from DOS 3.x
  53. cProc __DOSFREESEG,<PUBLIC>,<>
  54. parmW dataseg
  55. cbegin
  56. cend
  57. ; __DOSWRITE - stripped-down version called from emulator for no87 message
  58. ; - note that there is no error detection in this version
  59. ; - since the emulator doesn't check for write errors anyway
  60. cProc __DOSWRITE,<PUBLIC>,<ds> ; <di> commented out
  61. parmW handle ; unsigned
  62. parmD p_buffer ; char far *
  63. parmW bytestowrite ; unsigned
  64. parmD p_byteswritten ; unsigned far *
  65. ; returns unsgined
  66. cbegin
  67. mov cx,bytestowrite
  68. mov bx,handle
  69. lds dx,p_buffer
  70. callos write
  71. ; jc wrtret ; if write error, error code already in AX
  72. ; ; if no error, set bytes written
  73. ; les di,p_byteswritten
  74. ; mov word ptr es:[di],ax
  75. xor ax,ax ; if no error, clear return code
  76. ;wrtret:
  77. cend
  78. sEnd code
  79. end