home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / listings / v_02_06 / tp55rtl.src < prev    next >
Text File  |  1990-11-06  |  13KB  |  413 lines

  1. ;=============================================================================
  2. ;=============================================================================
  3. ;
  4. ;                Label Name Library for Turbo Pascal v5.5
  5. ;
  6. ;   Writen by Clark A. Calkins,
  7. ;             C. C. Software
  8. ;             1907 Alvarado Ave.
  9. ;             Walnut Creek, CA 94596
  10. ;
  11. ;             circa September 1990
  12. ;
  13. ;   This file may be freely copied and used for non-commercial purposes.
  14. ;   Intended for use with the Masterful Disassembler (MD86) version 2.3 or
  15. ;   later. This file should be compiled with MD86MAC v1.3 or later. No
  16. ;   compiler error or warning messages should be generated.
  17. ;
  18. ;   There are no known coding errors in these definitions but no guarantees
  19. ;   are implied.
  20. ;
  21. ;=============================================================================
  22. ;
  23. ;   Initialize routine. This sets interupt vectors and segment registers.
  24. ;
  25. label     = TpInit
  26.   mask    = $ff,$00,$00,$ff,$ff,$ff,$ff,$00,$00,$ff,$ff,$ff,$ff,$ff
  27.   mask    = $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff
  28.   compare = $ba,$00,$00,$8e,$da,$8c,$06,$00,$00,$33,$ed,$8b,$c4,$05
  29.   compare = $13,$00,$b1,$04,$d3,$e8,$8c,$d2,$03,$c2
  30. endlabel
  31. ;
  32. ;   Normal exit routine.
  33. ;
  34. label     = TpExit
  35.   mask    = $ff,$ff,$ff,$ff,$ff,$00,$00,$ff,$ff,$ff,$ff,$00,$00,$ff
  36.   mask    = $ff,$ff,$ff,$ff
  37.   compare = $33,$c9,$33,$db,$ba,$00,$00,$8e,$da,$fb,$a3,$00,$00,$8b
  38.   compare = $c1,$0b,$c3,$74
  39. endlabel
  40. ;
  41. ;   String support functions.
  42. ;
  43. label     = StrStore
  44.   nomask
  45.   compare = $fc,$8b,$dc,$8c,$da,$36,$c4,$7f,$08,$36,$c5,$77,$04
  46.   compare = $ac,$aa,$8a,$c8,$32,$ed,$f3,$a4,$8e,$da,$ca,$04,$00
  47. endlabel
  48. ;
  49. label     = StrMove
  50.   nomask
  51.   compare = $fc,$8b,$dc,$8c,$da,$36,$c5,$77,$0a,$36,$c4,$7f,$06
  52.   compare = $36,$8b,$4f,$04,$ac,$3a,$c1,$76,$02,$8a,$c1,$aa,$8a
  53.   compare = $c8,$32,$ed,$f3,$a4,$8e,$da,$ca,$0a,$00
  54. endlabel
  55. ;
  56. label     = StrCopy
  57.   nomask
  58.   compare = $fc,$8b,$dc,$8c,$da,$36,$c4,$7f,$0c,$36,$c5,$77,$08
  59.   compare = $8a,$04,$32,$e4,$36,$8b,$4f,$06,$0b,$c9,$7f,$03,$b9
  60.   compare = $01,$00,$03,$f1,$2b,$c1,$72,$13,$40,$36,$8b,$4f,$04
  61.   compare = $0b,$c9,$7d,$02,$33,$c9,$3b,$c1,$76,$06,$8b,$c1,$eb
  62.   compare = $02,$33,$c0,$aa,$8b,$c8,$f3,$a4,$8e,$da,$ca
  63. endlabel
  64. ;
  65. label     = StrAdd
  66.   nomask
  67.   compare = $fc,$8b,$dc,$8c,$da,$36,$c4,$7f,$08,$36,$c5,$77,$04
  68.   compare = $26,$8a,$0d,$32,$ed,$ac,$26,$00,$05,$73,$08,$26,$c6
  69.   compare = $05,$ff,$8a,$c1,$f6,$d0,$03,$f9,$47,$8a,$c8,$f3,$a4
  70.   compare = $8e,$da,$ca,$04,$00
  71. endlabel
  72. ;
  73. label     = StrLngth
  74.   nomask
  75.   compare = $8b,$dc,$36,$c4,$7f,$04,$26,$8a,$05,$32,$e4,$ca,$04
  76.   compare = $00
  77. endlabel
  78. ;
  79. label     = WrtItem
  80.   mask    = $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$00,$00
  81.   mask    = $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff
  82.   compare = $55,$8b,$ec,$1e,$c4,$7e,$0c,$06,$57,$e8,$00,$00
  83.   compare = $75,$25,$c5,$76,$08,$8b,$4e,$06,$fc,$ac,$32,$e4,$2b,$c8
  84. endlabel
  85. ;
  86. label     = IO_end
  87.   mask    = $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff
  88.   mask    = $ff,$ff,$ff,$00,$00,$ff,$ff,$ff,$ff,$ff
  89.   compare = $8b,$dc,$36,$c4,$7f,$04,$26,$83,$7d,$1a,$00,$75,$03,$ca,$04
  90.   compare = $00,$83,$3e,$00,$00,$00,$75,$f6,$06,$57
  91. endlabel
  92. ;
  93. label     = Get_IO
  94.   mask    = $ff,$ff,$ff,$ff,$00,$00,$ff
  95.   mask    = $ff,$ff,$00,$00,$ff,$ff,$ff,$ff,$ff,$00,$00,$ff
  96.   compare = $33,$c0,$87,$06,$00,$00,$cb
  97.   compare = $83,$3e,$00,$00,$00,$75,$01,$cb,$a1,$00,$00,$e9
  98. endlabel
  99. label     = Check_IO
  100.   mask    = $ff,$ff,$00,$00,$ff,$ff,$ff,$ff,$ff,$00,$00,$ff
  101.   compare = $83,$3e,$00,$00,$00,$75,$01,$cb,$a1,$00,$00,$e9
  102. endlabel
  103. ;
  104. label     = Line_end
  105.   mask    = $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$00,$00,$ff,$ff,$ff,$ff
  106.   mask    = $ff,$00,$00,$ff,$ff,$ff,$00,$00,$ff,$ff,$ff,$ff,$ff,$ff,$ff
  107.   mask    = $ff
  108.   compare = $8b,$dc,$36,$c4,$7f,$04,$06,$57,$e8,$00,$00,$75,$0a,$b0,$0d
  109.   compare = $e8,$00,$00,$b0,$0a,$e8,$00,$00,$5f,$07,$26,$89,$5d,$08,$eb
  110.   compare = $06
  111. endlabel
  112. ;
  113. label     = RdStrItm
  114.   mask    = $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$00,$00
  115.   mask    = $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$00,$00,$ff
  116.   mask    = $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff
  117.   mask    = $ff,$ff,$ff
  118.   compare = $55,$8b,$ec,$1e,$c4,$7e,$0c,$06,$57,$e8,$00,$00
  119.   compare = $c5,$76,$08,$b9,$00,$00,$75,$15,$e8,$00,$00,$3c
  120.   compare = $0d,$74,$0e,$3c,$1a,$74,$0a,$43,$41,$46,$88,$04
  121.   compare = $3b,$4e,$06
  122. endlabel
  123. ;
  124. label     = Get_EOL
  125.   mask    = $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$00,$00,$ff
  126.   mask    = $ff,$ff,$00,$00,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff
  127.   mask    = $ff,$ff,$00,$00,$ff,$ff
  128.   compare = $8b,$dc,$36,$c4,$7f,$04,$06,$57,$e8,$00,$00,$75
  129.   compare = $14,$e8,$00,$00,$3c,$1a,$74,$0d,$43,$3c,$0d,$75
  130.   compare = $f4,$e8,$00,$00,$3c,$0a
  131. endlabel
  132. ;
  133. ;   Long and short integer file I/O procedures.
  134. ;
  135. label     = WrtDblWd
  136.   mask    = $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff
  137.   mask    = $ff,$ff,$ff,$ff,$ff,$ff,$00,$00,$ff,$ff,$ff,$ff
  138.   mask    = $ff,$ff,$00,$00,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff
  139.   mask    = $ff
  140.   compare = $55,$8b,$ec,$83,$ec,$20,$8b,$46,$08,$8b,$56,$0a
  141.   compare = $8d,$7e,$e0,$16,$07,$e8,$00,$00,$c4,$7e,$0c,$06
  142.   compare = $57,$e8,$00,$00,$75,$1f,$8b,$46,$06,$2b,$c1,$7e
  143.   compare = $0d
  144. endlabel
  145. ;
  146. label     = RdDblWrd
  147.   mask    = $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff
  148.   mask    = $00,$00,$ff,$ff,$ff,$ff,$ff,$ff,$00,$00,$ff,$ff
  149.   mask    = $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff
  150.   compare = $55,$8b,$ec,$83,$ec,$20,$c4,$7e,$06,$06,$57,$e8
  151.   compare = $00,$00,$be,$00,$00,$75,$21,$e8,$00,$00,$3c,$1a
  152.   compare = $74,$1a,$3c,$20,$77,$03,$43,$eb,$f2
  153. endlabel
  154. ;
  155. ;   Procedure to assign a file name to a file variable. Used for text type
  156. ;   files.
  157. ;
  158. labelname = Txt_asgn
  159.   nomask
  160.   compare = $8b,$dc,$1e,$36,$c4,$7f,$08,$36,$c5,$77,$04,$fc,$33,$c0
  161.   compare = $ab,$b8,$b0,$d7,$ab,$b8,$80,$00,$ab,$33,$c0,$ab,$ab,$ab
  162. endlabel
  163. ;
  164. ;   Procedure to assign binary files.
  165. ;
  166. labelname = Bin_asgn
  167.   nomask
  168.   compare = $8b,$dc,$1e,$36,$c4,$7f,$08,$36,$c5,$77,$04,$fc,$33,$c0
  169.   compare = $ab,$b8,$b0,$d7,$ab,$33,$c0,$b9,$16,$00,$f3,$ab
  170. endlabel
  171. ;
  172. ;   Procedure to open a text file.
  173. ;
  174. labelname = Txt_open
  175.   nomask
  176.   compare = $8b,$dc,$36,$c4,$7f,$04,$26,$8b,$45,$02,$3d,$b1,$d7
  177.   compare = $74,$12,$3d,$b2,$d7,$74,$0d
  178. endlabel
  179. ;
  180. ;   Procedure to open a text file for reading.
  181. ;
  182. labelname = TxtReset
  183.   nomask
  184.   compare = $ba,$b1,$d7,$eb
  185.   argument
  186.     rbyte = 4
  187.     type  = nearaddress
  188.     name  = Txt_open
  189.   endargument
  190. endlabel
  191. ;
  192. ;   Procedure to open a text file for writing.
  193. ;
  194. labelname = TxtWrite
  195.   nomask
  196.   compare = $ba,$b2,$d7,$eb
  197.   argument
  198.     rbyte = 4
  199.     type  = nearaddress
  200.     name  = Txt_open
  201.   endargument
  202. endlabel
  203. ;
  204. ;   Procedure to open a binary file for reading.
  205. ;
  206. labelname = BinReset
  207.   mask    = $ff,$00,$00,$ff,$ff,$ff,$ff,$ff,$ff
  208.   mask    = $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff
  209.   mask    = $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff
  210.   compare = $a0,$00,$00,$b4,$3d,$33,$d2,$eb,$06
  211.   compare = $b8,$00,$3c,$ba,$01,$00,$55,$8b,$ec,$c4,$7e,$08,$26,$81,$7d
  212.   compare = $02,$b0,$d7,$74,$1a,$26,$81,$7d,$02,$b3,$d7,$74,$08
  213. endlabel
  214. ;
  215. ;   Procedure to open a binary file for writing.
  216. ;
  217. labelname = BinWrite
  218.   nomask
  219.   compare = $b8,$00,$3c,$ba,$01,$00,$55,$8b,$ec,$c4,$7e,$08,$26,$81,$7d
  220.   compare = $02,$b0,$d7,$74,$1a,$26,$81,$7d,$02,$b3,$d7,$74,$08
  221. endlabel
  222. ;
  223. ;============================================================================
  224. ;   Label names for the CRT unit.
  225. ;============================================================================
  226. ;
  227. ;   Label name for GOTOXY(x,y) procedure.
  228. ;
  229. labelname = GotoXYp
  230.   mask    = $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff
  231.   mask    = $00,$00,$ff,$ff,$ff,$ff,$00,$00,$ff,$ff,$ff,$ff,$ff,$ff
  232.   mask    = $00,$00,$ff,$ff
  233.   compare = $8b,$dc,$36,$8a,$57,$06,$36,$8a,$77,$04,$fe,$ca,$02,$16
  234.   compare = $00,$00,$72,$17,$3a,$16,$00,$00,$77,$11,$fe,$ce,$02,$36
  235.   compare = $00,$00,$72,$09
  236. endlabel
  237. ;
  238. ;   The clear to end of line procedure CLREOL.
  239. ;
  240. labelname = ClrEol
  241.   mask    = $ff,$00,$00,$ff,$00,$00,$ff,$ff,$00,$00,$ff,$ff
  242.   mask    = $ff,$ff,$00,$00,$ff,$00,$00,$ff
  243.   compare = $e8,$00,$00,$b8,$00,$00,$8a,$3e,$00,$00,$8b,$ca
  244.   compare = $8a,$16,$00,$00,$e8,$00,$00,$cb
  245. endlabel
  246. ;
  247. ;   The clear screen procedure CLRSCR.
  248. ;
  249. labelname = ClrScr
  250.   mask    = $ff,$00,$00,$ff,$ff,$00,$00,$ff,$ff,$00,$00,$ff
  251.   mask    = $ff,$00,$00,$ff,$00,$00,$ff,$ff,$00,$00,$ff,$00
  252.   mask    = $00,$ff
  253.   compare = $b8,$00,$00,$8a,$3e,$00,$00,$8b,$0e,$00,$00,$8b
  254.   compare = $16,$00,$00,$e8,$00,$00,$8b,$16,$00,$00,$e8,$00
  255.   compare = $00,$cb
  256. endlabel
  257. ;
  258. ;   The DELAY() procedure.
  259. ;
  260. labelname = Delay_p
  261.   mask    = $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff
  262.   mask    = $ff,$ff,$ff,$ff,$00,$00,$ff,$ff,$ff,$00,$00,$ff,$ff,$ff,$ff
  263.   mask    = $ff,$ff
  264.   compare = $8b,$dc,$36,$8b,$57,$04,$0b,$d2,$74,$13,$33,$ff,$8e,$c7,$26
  265.   compare = $8a,$05,$8b,$1e,$00,$00,$8b,$cb,$e8,$00,$00,$4a,$75,$f8,$ca
  266.   compare = $02,$00
  267. endlabel
  268. ;
  269. ;   Video interupt entry.
  270. ;
  271. labelname = VideoInt
  272.   nomask
  273.   compare = $56,$57,$55,$06,$cd,$10,$07,$5d,$5f,$5e,$c3
  274. endlabel
  275. ;
  276. ;   Line delete function DELLINE.
  277. ;
  278. labelname = DelLine
  279.   mask    = $ff,$ff,$ff,$ff,$ff,$00,$00,$ff,$ff,$ff,$00,$00,$ff,$ff,$00,$00
  280.   mask    = $ff,$ff,$ff,$ff,$00,$00,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$00,$00,$ff
  281.   compare = $b8,$01,$06,$50,$e8,$00,$00,$58,$8a,$3e,$00,$00,$8a,$0e,$00,$00
  282.   compare = $8a,$ee,$8b,$16,$00,$00,$3a,$ee,$75,$02,$32,$c0,$e8,$00,$00,$cb
  283.   argument
  284.     rbyte = 29
  285.     type  = nearaddress
  286.     name  = VideoInt
  287.   endargument
  288. endlabel
  289. ;
  290. ;   High video procedure.
  291. ;
  292. labelname = HighVid
  293.   mask    = $ff,$ff,$00,$00,$ff,$ff
  294.   compare = $80,$0e,$00,$00,$08,$cb
  295. endlabel
  296. ;
  297. ;   Low video procedure.
  298. ;
  299. labelname = LowVideo
  300.   mask    = $ff,$ff,$00,$00,$ff,$ff
  301.   compare = $80,$26,$00,$00,$f7,$cb
  302. endlabel
  303. ;
  304. ;   Key pressed procedure.
  305. ;
  306. labelname = KeyPrest
  307.   mask    = $ff,$ff,$00,$00,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff
  308.   mask    = $ff,$ff,$ff
  309.   compare = $80,$3e,$00,$00,$00,$75,$08,$b4,$01,$cd,$16,$b0,$00,$74,$02
  310.   compare = $b0,$01,$cb
  311. endlabel
  312. ;
  313. ;   Procedure to turn the speeker off.
  314. ;
  315. labelname = NoSound
  316.   nomask
  317.   compare = $e4,$61,$24,$fc,$e6,$61,$cb
  318. endlabel
  319. ;
  320. ;   Procedure to turn the speeker on at a specified frequency.
  321. ;
  322. labelname = Sound
  323.   nomask
  324.   compare = $8b,$dc,$36,$8b,$5f,$04,$b8,$dd,$34,$ba,$12,$00
  325.   compare = $3b,$d3,$73,$1a,$f7,$f3,$8b,$d8,$e4,$61,$a8,$03
  326.   compare = $75,$08
  327. endlabel
  328. ;
  329. ;   Set the text background color.
  330. ;
  331. labelname = TxtBkg
  332.   mask    = $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff
  333.   mask    = $00,$00,$ff,$ff,$ff,$00,$00,$ff,$ff,$ff
  334.   compare = $8b,$dc,$36,$8a,$47,$04,$24,$07,$b1,$04,$d2,$e0,$80,$26
  335.   compare = $00,$00,$8f,$08,$06,$00,$00,$ca,$02,$00
  336. endlabel
  337. ;
  338. ;   Set foreground color.
  339. ;
  340. labelname = TxtColor
  341.   mask    = $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff
  342.   mask    = $ff,$ff,$00,$00,$ff,$ff,$ff,$00,$00,$ff,$ff,$ff
  343.   compare = $8b,$dc,$36,$8a,$47,$04,$a8,$f0,$74,$04,$24,$0f,$0c,$80
  344.   compare = $80,$26,$00,$00,$70,$08,$06,$00,$00,$ca,$02,$00
  345. endlabel
  346. ;
  347. ;   Read a character.
  348. ;
  349. labelname = ReadKey
  350.   mask    = $ff,$00,$00,$ff,$ff,$00,$00,$ff,$ff,$ff,$ff,$ff,$ff,$ff
  351.   mask    = $ff,$ff,$ff,$ff,$ff,$ff
  352.   mask    = $ff,$ff,$00,$00,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$00,$00,$ff
  353.   compare = $a0,$00,$00,$c6,$06,$00,$00,$00,$0a,$c0,$75,$12,$32,$e4
  354.   compare = $cd,$16,$0a,$c0,$75,$0a
  355.   compare = $88,$26,$00,$00,$0a,$e4,$75,$02,$b0,$03,$e8,$00,$00,$cb
  356. endlabel
  357. ;
  358. ;   Set the text mode (mono, color, 40 cols, 80 cols, etc.).
  359. ;
  360. labelname = TxtMode
  361.   mask    = $ff,$ff,$ff,$ff,$ff,$ff,$ff,$00,$00,$ff,$00,$00
  362.   mask    = $ff,$00,$00,$ff,$00,$00,$ff,$ff,$ff
  363.   compare = $8b,$dc,$36,$8b,$47,$04,$e8,$00,$00,$e8,$00,$00
  364.   compare = $a0,$00,$00,$a2,$00,$00,$ca,$02,$00
  365. endlabel
  366. ;
  367. ;   Locate the current cursor position.
  368. ;
  369. labelname = CurPos_p
  370.   mask    = $ff,$ff,$ff,$ff,$ff
  371.   compare = $b4,$03,$32,$ff,$e9
  372.   argument
  373.     rbyte = 5
  374.     type  = nearaddress
  375.     name  = VideoInt
  376.   endargument
  377. endlabel
  378. ;
  379. ;   Determine the current 'X' coordinate.
  380. ;
  381. labelname = Where_X
  382.   mask    = $ff,$00,$00,$ff,$ff,$ff,$ff,$00,$00,$ff,$ff,$ff
  383.   compare = $e8,$00,$00,$8a,$c2,$2a,$06,$00,$00,$fe,$c0,$cb
  384.   argument
  385.     rbyte = 1
  386.     type  = nearaddress
  387.     name  = CurPos_p
  388.   endargument
  389. endlabel
  390. ;
  391. ;   Determine the current 'Y' coordinate.
  392. ;
  393. labelname = Where_Y
  394.   mask    = $ff,$00,$00,$ff,$ff,$ff,$ff,$00,$00,$ff,$ff,$ff
  395.   compare = $e8,$00,$00,$8a,$c6,$2a,$06,$00,$00,$fe,$c0,$cb
  396.   argument
  397.     rbyte = 1
  398.     type  = nearaddress
  399.     name  = CurPos_p
  400.   endargument
  401. endlabel
  402. ;
  403. ;   Set the window columns on the screen.
  404. ;
  405. labelname = Window
  406.   nomask
  407.   compare = $8b,$dc,$36,$8a,$57,$0a,$36,$8a,$77,$08,$36,$8a,$4f,$06
  408.   compare = $36,$8a,$6f,$04,$3a,$d1,$77,$27,$3a,$f5,$77,$23,$fe,$ca
  409.   compare = $78,$1f
  410. endlabel
  411. ;
  412. ;   End of label name library.
  413.