monroe_oc8820_r3.00.asm 25 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319
  1. org 00000h
  2. di ;0000 no interrupt
  3. ld sp,0ffa6h ;0001 init stack
  4. xor a ;0004 A=0
  5. jp init ;0005 go init 00046h
  6. ;RST 08 handle - clear top line
  7. ld de,0303eh ;0008 point to screen ram
  8. call cleartopline ;000b go clear top line 0052dh
  9. nop ;000e pass through to display message at return addr
  10. nop ;000f
  11. ;RST 10 handle - display message at return addr
  12. pop hl ;0010 get return addr
  13. displaymsg:
  14. ld c,(hl) ;0011 load count
  15. inc hl ;0012 dump
  16. ld b,000h ;0013
  17. jp printroutine ;0015 00541h
  18. ;
  19. rst 38h ;0018
  20. rst 38h ;0019
  21. rst 38h ;001a
  22. rst 38h ;001b
  23. rst 38h ;001c
  24. rst 38h ;001d
  25. rst 38h ;001e
  26. rst 38h ;001f
  27. rst 38h ;0020
  28. rst 38h ;0021
  29. rst 38h ;0022
  30. rst 38h ;0023
  31. rst 38h ;0024
  32. rst 38h ;0025
  33. rst 38h ;0026
  34. rst 38h ;0027
  35. rst 38h ;0028
  36. rst 38h ;0029
  37. rst 38h ;002a
  38. rst 38h ;002b
  39. rst 38h ;002c
  40. rst 38h ;002d
  41. rst 38h ;002e
  42. rst 38h ;002f
  43. rst 38h ;0030
  44. rst 38h ;0031
  45. rst 38h ;0032
  46. rst 38h ;0033
  47. rst 38h ;0034
  48. rst 38h ;0035
  49. rst 38h ;0036
  50. rst 38h ;0037
  51. rst 38h ;0038
  52. rst 38h ;0039
  53. rst 38h ;003a
  54. rst 38h ;003b
  55. rst 38h ;003c
  56. rst 38h ;003d
  57. rst 38h ;003e
  58. rst 38h ;003f
  59. jp 00000h ;0040
  60. jp 00000h ;0043
  61. ; init
  62. init:
  63. out (0c0h),a ;0046 clear io, floppy control
  64. out (0c4h),a ;0048 Program map A base
  65. out (0c5h),a ;004a Program map B base
  66. out (0c6h),a ;004c DMA map A base
  67. out (0c7h),a ;004e DMA map B base
  68. out (0d4h),a ;0050 Hi-res color
  69. out (0d8h),a ;0052 Hi-res start
  70. ld hl,0005ah ;0054
  71. jp otirloop ;0057 do OTIR loop on following data 00562h
  72. defb 0b5h ;005a io port CRT register select
  73. defb 004h ;005b count 4
  74. defb 0cfh ;005c
  75. defb 0b8h ;005d
  76. defb 037h ;005e
  77. defb 0efh ;005f
  78. ;
  79. defb 0b4h ;0060 io port PIO A data
  80. defb 001h ;0061 count 1
  81. defb 001h ;0062
  82. ;
  83. defb 0a1h ;0063 io port DART A command
  84. defb 006h ;0064 count 6
  85. defb 048h ;0065
  86. defb 048h ;0066
  87. defb 004h ;0067
  88. defb 044h ;0068
  89. defb 005h ;0069
  90. defb 0eah ;006a
  91. ;
  92. defb 0a3h ;006b io port DART B command
  93. defb 008h ;006c count 8
  94. defb 048h ;006d
  95. defb 048h ;006e
  96. defb 004h ;006f
  97. defb 044h ;0070
  98. defb 001h ;0071
  99. defb 000h ;0072
  100. defb 003h ;0073
  101. defb 0c1h ;0074
  102. ;
  103. defb 0a5h ;0075 io port SIO A command
  104. defb 002h ;0076count 2
  105. defb 048h ;0077
  106. defb 048h ;0078
  107. ;
  108. defb 0a7h ;0079 io port SIO B command
  109. defb 002h ;007a count 2
  110. defb 048h ;007b
  111. defb 048h ;007c
  112. ;
  113. defb 0a8h ;007d io port CTC CHANNEL 0 - Communications baud rate
  114. defb 002h ;007e count 2
  115. defb 003h ;007f
  116. defb 003h ;0080
  117. ;
  118. defb 0a9h ;0081 io port CTC CHANNEL 1 - AUX RS-232C baud rate
  119. defb 002h ;0082 count 2
  120. defb 003h ;0083
  121. defb 003h ;0084
  122. ;
  123. defb 0aah ;0085 io port CTC CHANNEL 2 - Printer baud rate
  124. defb 002h ;0086 count 2
  125. defb 057h ;0087
  126. defb 04eh ;0088
  127. ;
  128. defb 000h ;0089 io port reset
  129. defb 000h ;008a count 0 terminator
  130. ;code continues
  131. ld ix,00092h ;008b continuation addr
  132. jp setupclearscreen ;008f setup display and clear screen 00505h
  133. ;code continues
  134. ld a,080h ;0092
  135. out (0d4h),a ;0094 out 0d4h,80h Hi-res color
  136. ld de,03000h ;0096 point to display upper left corner
  137. ld hl,0009fh ;0099 point to message
  138. jp displaymsg ;009c go display message at HL 00011h
  139. defb 008h ;009f 8 bytes
  140. defb 054h ;00a0 T
  141. defb 065h ;00a1 e
  142. defb 073h ;00a2 s
  143. defb 074h ;00a3 t
  144. defb 069h ;00a4 i
  145. defb 06eh ;00a5 n
  146. defb 067h ;00a6 g
  147. defb 02eh ;00a7 .
  148. ld a,005h ;00a8
  149. out (0a3h),a ;00aa DART B command
  150. ld a,068h ;00ac
  151. out (0a3h),a ;00ae DART B command
  152. ld a,0f0h ;00b0 ?????
  153. out (0c8h),a ;00b2 Map and system control
  154. ld ix,0c001h ;00b4
  155. ld bc,000c5h ;00b8
  156. ld d,009h ;00bb
  157. ld a,0a0h ;00bd
  158. out (0c5h),a ;00bf Program map B base
  159. ld (ix-001h),b ;00c1
  160. dec b ;00c4
  161. inc a ;00c5
  162. out (0c5h),a ;00c6 Program map B base
  163. ld (ix-001h),b ;00c8
  164. dec a ;00cb
  165. out (0c5h),a ;00cc Program map B base
  166. ld b,(ix-001h) ;00ce
  167. inc b ;00d1
  168. jr z,$+4 ;00d2
  169. ld d,011h ;00d4
  170. ld b,d ;00d6
  171. ld hl,00122h ;00d7
  172. ld de,00000h ;00da
  173. outi ;00dd
  174. jr z,$+84 ;00df
  175. exx ;00e1
  176. ld b,055h ;00e2 memory check ?
  177. ld e,000h ;00e4
  178. ld hl,0c000h ;00e6 graphic memory address
  179. ld c,b ;00e9
  180. ld (hl),c ;00ea
  181. rlc c ;00eb
  182. inc l ;00ed
  183. jr nz,$-4 ;00ee
  184. rlc c ;00f0
  185. inc h ;00f2
  186. jr nz,$-9 ;00f3
  187. ld h,0c0h ;00f5
  188. ld c,b ;00f7
  189. ld a,(hl) ;00f8
  190. xor c ;00f9
  191. or e ;00fa
  192. ld e,a ;00fb
  193. rlc c ;00fc
  194. inc l ;00fe
  195. jr nz,$-7 ;00ff
  196. rlc c ;0101
  197. inc h ;0103
  198. jr nz,$-12 ;0104
  199. rlc b ;0106
  200. jr nc,$-34 ;0108
  201. ld a,e ;010a
  202. exx ;010b
  203. and a ;010c
  204. jr z,$+10 ;010d
  205. inc a ;010f
  206. jr z,$+6 ;0110
  207. or d ;0112
  208. ld d,a ;0113
  209. jr $+3 ;0114
  210. inc e ;0116
  211. ld a,b ;0117
  212. cp 004h ;0118
  213. jr nz,$-61 ;011a
  214. ld a,020h ;011c
  215. out (0c0h),a ;011e Floppy external control
  216. jr $-67 ;0120
  217. and c ;0122
  218. pop bc ;0123
  219. pop hl ;0124
  220. nop ;0125
  221. jr nz,$+66 ;0126
  222. ld h,b ;0128
  223. add a,b ;0129
  224. and b ;012a
  225. ret nz ;012b
  226. ret po ;012c
  227. ld bc,04121h ;012d
  228. ld h,c ;0130
  229. add a,c ;0131
  230. nop ;0132
  231. xor a ;0133
  232. or d ;0134
  233. or e ;0135
  234. jr z,$+43 ;0136;
  235. ld ix,0013fh ;0138
  236. jp 0058ch ;013c
  237. ld de,03000h ;013f
  238. ld hl,00148h ;0142
  239. jp displaymsg ;0145 00011h
  240. defb 017h ;0148 count 23
  241. defb 045h ;0149 Error #2 :Call service.
  242. defb 072h ;014a
  243. defb 072h ;014b
  244. defb 06fh ;014c
  245. defb 072h ;014d
  246. defb 020h ;014e
  247. defb 023h ;014f
  248. defb 032h ;0150
  249. defb 020h ;0151
  250. defb 03ah ;0152
  251. defb 043h ;0153
  252. defb 061h ;0154
  253. defb 06ch ;0155
  254. defb 06ch ;0156
  255. defb 020h ;0157
  256. defb 073h ;0158
  257. defb 065h ;0159
  258. defb 072h ;015a
  259. defb 076h ;015b
  260. defb 069h ;015c
  261. defb 063h ;015d
  262. defb 065h ;015e
  263. defb 02eh ;015f
  264. halt ;0160
  265. out (0c5h),a ;0161 Program map B base
  266. out (0c8h),a ;0163 Map and system control
  267. dec hl ;0165
  268. dec hl ;0166
  269. ld a,(hl) ;0167
  270. rrca ;0168
  271. and 080h ;0169
  272. ld (0ff80h),a ;016b
  273. ld de,0ffa6h ;016e
  274. ld hl,005beh ;0171
  275. ld bc,0005ah ;0174
  276. ldir ;0177
  277. call 00503h ;0179
  278. call 003d9h ;017c
  279. call 0061ch ;017f
  280. ld a,0ffh ;0182
  281. jr c,$+3 ;0184
  282. cpl ;0186
  283. ld (0ff93h),a ;0187
  284. ld hl,00404h ;018a
  285. ld (0ff91h),hl ;018d
  286. or a ;0190
  287. jr nz,$+50 ;0191
  288. ld c,010h ;0193
  289. call 0065ah ;0195
  290. jr c,$+19 ;0198
  291. ld bc,00000h ;019a
  292. call 0040eh ;019d
  293. jr c,$+11 ;01a0
  294. call 003a2h ;01a2
  295. ld a,(0ff8bh) ;01a5
  296. ld (0ff91h),a ;01a8
  297. ld c,011h ;01ab
  298. call 0065ah ;01ad
  299. jr c,$+19 ;01b0
  300. ld bc,00000h ;01b2
  301. call 0040eh ;01b5
  302. jr c,$+11 ;01b8
  303. call 003a2h ;01ba
  304. ld a,(0ff8bh) ;01bd
  305. ld (0ff92h),a ;01c0
  306. ld a,001h ;01c3
  307. ld c,008h ;01c5
  308. or 0a0h ;01c7
  309. out (0c0h),a ;01c9 Floppy external control
  310. ld b,a ;01cb
  311. in a,(0b0h) ;01cc Floppy status
  312. rr a ;01ce
  313. jr c,$-4 ;01d0
  314. in a,(0b0h) ;01d2 Floppy status
  315. add a,a ;01d4
  316. jr c,$+8 ;01d5
  317. call 0057dh ;01d7
  318. call 00262h ;01da
  319. inc c ;01dd
  320. ld a,b ;01de
  321. add a,a ;01df
  322. and 00fh ;01e0
  323. jr nz,$-27 ;01e2
  324. ld a,(0ff93h) ;01e4
  325. or a ;01e7
  326. jr nz,$+28 ;01e8
  327. in a,(0ffh) ;01ea ????
  328. and 020h ;01ec
  329. jr nz,$+22 ;01ee
  330. ld c,010h ;01f0
  331. call 0065ah ;01f2
  332. ld b,000h ;01f5
  333. call nc,00262h ;01f7
  334. ld c,011h ;01fa
  335. call 0065ah ;01fc
  336. ld b,000h ;01ff
  337. call nc,00262h ;0201
  338. call 00503h ;0204
  339. ld bc,002a3h ;0207
  340. ld hl,0061ah ;020a
  341. otir ;020d
  342. ld de,03000h ;020f
  343. ld hl,00218h ;0212
  344. jp displaymsg ;0215 00011h
  345. defb 019h ;0218 count 25
  346. defb 04eh ;0219 No System Device On Line.
  347. defb 06fh ;021a
  348. defb 020h ;021b
  349. defb 053h ;021c
  350. defb 079h ;021d
  351. defb 073h ;021e
  352. defb 074h ;021f
  353. defb 065h ;0220
  354. defb 06dh ;0221
  355. defb 020h ;0222
  356. defb 044h ;0223
  357. defb 065h ;0224
  358. defb 076h ;0225
  359. defb 069h ;0226
  360. defb 063h ;0227
  361. defb 065h ;0228
  362. defb 020h ;0229
  363. defb 04fh ;022a
  364. defb 06eh ;022b
  365. defb 020h ;022c
  366. defb 04ch ;022d
  367. defb 069h ;022e
  368. defb 06eh ;022f
  369. defb 065h ;0230
  370. defb 02eh ;0231
  371. call 0057dh ;0232
  372. call 0057dh ;0235
  373. call 0057dh ;0238
  374. jp 0017ch ;023b
  375. ld ix,00245h ;023e
  376. jp 0058ch ;0242
  377. call 0056bh ;0245
  378. rst 10h ;0248
  379. defb 017h ;0249 count 23
  380. defb 045h ;024a Error #0: Call service.
  381. defb 072h ;024b
  382. defb 072h ;024c
  383. defb 06fh ;024d
  384. defb 072h ;024e
  385. defb 020h ;024f
  386. defb 023h ;0250
  387. defb 030h ;0251
  388. defb 03ah ;0252
  389. defb 020h ;0253
  390. defb 043h ;0254
  391. defb 061h ;0255
  392. defb 06ch ;0256
  393. defb 06ch ;0257
  394. defb 020h ;0258
  395. defb 073h ;0259
  396. defb 065h ;025a
  397. defb 072h ;025b
  398. defb 076h ;025c
  399. defb 069h ;025d
  400. defb 063h ;025e
  401. defb 065h ;025f
  402. defb 02eh ;0260
  403. halt ;0261
  404. push bc ;0262
  405. xor a ;0263
  406. ld (0ff81h),a ;0264
  407. ld (0ff82h),a ;0267
  408. rst 8 ;026a
  409. defb 008h ;026b count 8
  410. defb 04ch ;026c Loading
  411. defb 06fh ;026d
  412. defb 061h ;026e
  413. defb 064h ;026f
  414. defb 069h ;0270
  415. defb 06eh ;0271
  416. defb 067h ;0272
  417. defb 020h ;0273
  418. pop ix ;0274
  419. call 004a1h ;0276
  420. jr c,$-59 ;0279
  421. ld bc,00000h ;027b
  422. call 0040eh ;027e
  423. jr c,$+92 ;0281
  424. ld hl,(0ff81h) ;0283
  425. ld a,l ;0286
  426. and a ;0287
  427. jr z,$+20 ;0288
  428. ld a,h ;028a
  429. and 003h ;028b
  430. in a,(0ffh) ;028d
  431. jr z,$+9 ;028f
  432. bit 0,a ;0291
  433. jr nz,$+9 ;0293
  434. jp 0034bh ;0295
  435. bit 1,a ;0298
  436. jr z,$-5 ;029a
  437. call 003a2h ;029c
  438. jp c,00343h ;029f
  439. jr z,$+20 ;02a2
  440. call 0040eh ;02a4
  441. jr c,$+54 ;02a7
  442. ld hl,0401fh ;02a9
  443. bit 0,(hl) ;02ac
  444. jp nz,0034fh ;02ae
  445. call 0040eh ;02b1
  446. jr c,$+41 ;02b4
  447. exx ;02b6
  448. ld hl,0400eh ;02b7
  449. ld d,(hl) ;02ba
  450. inc hl ;02bb
  451. ld e,(hl) ;02bc
  452. push de ;02bd
  453. pop iy ;02be
  454. ld hl,04080h ;02c0
  455. ld c,(hl) ;02c3
  456. inc hl ;02c4
  457. inc hl ;02c5
  458. ld d,(hl) ;02c6
  459. inc hl ;02c7
  460. ld e,(hl) ;02c8
  461. inc hl ;02c9
  462. ld a,(hl) ;02ca
  463. inc hl ;02cb
  464. ld l,(hl) ;02cc
  465. ld h,a ;02cd
  466. ex de,hl ;02ce
  467. push hl ;02cf
  468. ld a,e ;02d0
  469. add a,0ffh ;02d1
  470. ld a,d ;02d3
  471. exx ;02d4
  472. ld e,000h ;02d5
  473. adc a,e ;02d7
  474. ld d,a ;02d8
  475. pop hl ;02d9
  476. call 00414h ;02da
  477. jr c,$+106 ;02dd
  478. ld a,(0ff8bh) ;02df
  479. cp 002h ;02e2
  480. jr z,$+10 ;02e4
  481. xor a ;02e6
  482. ex af,af' ;02e7
  483. exx ;02e8
  484. jp 0ffa6h ;02e9
  485. ex af,af' ;02ec
  486. adc a,c ;02ed
  487. push ix ;02ee
  488. pop bc ;02f0
  489. ld a,(0ff8bh) ;02f1
  490. ld de,00013h ;02f4
  491. ld hl,0ff8dh ;02f7
  492. jr nz,$+69 ;02fa
  493. cp 002h ;02fc
  494. jp nz,0ffb8h ;02fe
  495. push bc ;0301
  496. bit 3,c ;0302
  497. jr nz,$+7 ;0304
  498. ld a,0ffh ;0306
  499. ld (0ff81h),a ;0308
  500. in a,(0ffh) ;030b
  501. ld c,a ;030d
  502. xor a ;030e
  503. bit 0,c ;030f
  504. jr z,$+4 ;0311
  505. ld a,00fh ;0313
  506. bit 1,c ;0315
  507. jr z,$+4 ;0317
  508. or 0f0h ;0319
  509. ld b,a ;031b
  510. ld a,(0ff81h) ;031c
  511. cpl ;031f
  512. and a ;0320
  513. jr z,$+19 ;0321
  514. push bc ;0323
  515. push ix ;0324
  516. pop bc ;0326
  517. ld a,c ;0327
  518. sub 007h ;0328
  519. ld b,a ;032a
  520. ld a,080h ;032b
  521. rlca ;032d
  522. rlca ;032e
  523. djnz $-2 ;032f
  524. pop bc ;0331
  525. and b ;0332
  526. rrca ;0333
  527. xor b ;0334
  528. pop bc ;0335
  529. ld (0ff81h),a ;0336
  530. ld a,(0ff8bh) ;0339
  531. jp 0ffb8h ;033c
  532. ld a,033h ;033f
  533. jr $+16 ;0341
  534. ld a,030h ;0343
  535. jr $+12 ;0345
  536. ld a,032h ;0347
  537. jr $+8 ;0349
  538. ld a,039h ;034b
  539. jr $+4 ;034d
  540. ld a,031h ;034f
  541. push ix ;0351
  542. push af ;0353
  543. call 0056bh ;0354
  544. push de ;0357
  545. rst 10h ;0358
  546. defb 028h ;0359 count 40
  547. defb 045h ;035a Error #10: Invalid System Disk in Drive
  548. defb 072h ;035b
  549. defb 072h ;035c
  550. defb 06fh ;035d
  551. defb 072h ;035e
  552. defb 020h ;035f
  553. defb 023h ;0360
  554. defb 031h ;0361
  555. defb 030h ;0362
  556. defb 03ah ;0363
  557. defb 020h ;0364
  558. defb 049h ;0365
  559. defb 06eh ;0366
  560. defb 076h ;0367
  561. defb 061h ;0368
  562. defb 06ch ;0369
  563. defb 069h ;036a
  564. defb 064h ;036b
  565. defb 020h ;036c
  566. defb 053h ;036d
  567. defb 079h ;036e
  568. defb 073h ;036f
  569. defb 074h ;0370
  570. defb 065h ;0371
  571. defb 06dh ;0372
  572. defb 020h ;0373
  573. defb 044h ;0374
  574. defb 069h ;0375
  575. defb 073h ;0376
  576. defb 06bh ;0377
  577. defb 020h ;0378
  578. defb 069h ;0379
  579. defb 06eh ;037a
  580. defb 020h ;037b
  581. defb 044h ;037c
  582. defb 072h ;037d
  583. defb 069h ;037e
  584. defb 076h ;037f
  585. defb 065h ;0380
  586. defb 020h ;0381
  587. pop hl ;0382
  588. pop bc ;0383
  589. ld de,00008h ;0384
  590. add hl,de ;0387
  591. add hl,de ;0388
  592. inc hl ;0389
  593. ld a,004h ;038a Select display memory
  594. out (0c8h),a ;038c Map and system control
  595. ld (hl),b ;038e
  596. xor a ;038f
  597. out (0c8h),a ;0390 Map and system control
  598. call 0057dh ;0392
  599. call 0057dh ;0395
  600. call 00503h ;0398
  601. call 003d9h ;039b
  602. exx ;039e
  603. pop bc ;039f
  604. scf ;03a0
  605. ret ;03a1
  606. ld a,003h ;03a2
  607. ld (0ff8bh),a ;03a4
  608. ld hl,0401dh ;03a7
  609. ld a,(hl) ;03aa
  610. cp 0e5h ;03ab
  611. scf ;03ad
  612. ret z ;03ae
  613. cp 06ch ;03af
  614. scf ;03b1
  615. ret z ;03b2
  616. add a,001h ;03b3
  617. jr nc,$+8 ;03b5
  618. ld hl,0ff8bh ;03b7
  619. ld (hl),002h ;03ba
  620. ret ;03bc
  621. inc hl ;03bd
  622. ld b,(hl) ;03be
  623. ld a,b ;03bf
  624. inc hl ;03c0
  625. ld c,(hl) ;03c1
  626. add a,001h ;03c2
  627. adc a,c ;03c4
  628. ld hl,0ff8bh ;03c5
  629. ld (hl),002h ;03c8
  630. jr z,$+10 ;03ca
  631. ld (hl),001h ;03cc
  632. ld a,b ;03ce
  633. or c ;03cf
  634. scf ;03d0
  635. ret z ;03d1
  636. or a ;03d2
  637. ret ;03d3
  638. ld bc,00001h ;03d4
  639. or a ;03d7
  640. ret ;03d8
  641. ld de,03000h ;03d9
  642. rst 10h ;03dc
  643. defb 01dh ;03dd count 29
  644. defb 052h ;03de R3-00C Ready For System Disk
  645. defb 033h ;03df
  646. defb 02dh ;03e0
  647. defb 030h ;03e1
  648. defb 030h ;03e2
  649. defb 043h ;03e3
  650. defb 020h ;03e4
  651. defb 052h ;03e5
  652. defb 065h ;03e6
  653. defb 061h ;03e7
  654. defb 064h ;03e8
  655. defb 079h ;03e9
  656. defb 020h ;03ea
  657. defb 046h ;03eb
  658. defb 06fh ;03ec
  659. defb 072h ;03ed
  660. defb 020h ;03ee
  661. defb 053h ;03ef
  662. defb 079h ;03f0
  663. defb 073h ;03f1
  664. defb 074h ;03f2
  665. defb 065h ;03f3
  666. defb 06dh ;03f4
  667. defb 020h ;03f5
  668. defb 044h ;03f6
  669. defb 069h ;03f7
  670. defb 073h ;03f8
  671. defb 06bh ;03f9
  672. defb 020h ;03fa
  673. call 0057dh ;03fb
  674. ret ;03fe
  675. ld b,00ah ;03ff
  676. ld hl,00000h ;0401
  677. inc hl ;0404
  678. ld a,l ;0405
  679. or h ;0406
  680. jr nz,$-3 ;0407
  681. djnz $-5 ;0409
  682. jp 00133h ;040b
  683. ld de,00100h ;040e
  684. ld hl,04000h ;0411
  685. push bc ;0414
  686. push ix ;0415
  687. pop bc ;0417
  688. ld a,c ;0418
  689. pop bc ;0419
  690. cp 010h ;041a
  691. jp nc,006c1h ;041c
  692. ld a,005h ;041f
  693. ex af,af' ;0421
  694. push bc ;0422
  695. ex (sp),hl ;0423
  696. ld a,l ;0424
  697. and 00fh ;0425
  698. push bc ;0427
  699. push af ;0428
  700. ld a,(0ff81h) ;0429
  701. and a ;042c
  702. ld b,000h ;042d
  703. jr z,$+4 ;042f
  704. ld b,010h ;0431
  705. pop af ;0433
  706. add a,b ;0434
  707. inc a ;0435
  708. out (0b2h),a ;0436 Floppy sector register
  709. add hl,hl ;0438
  710. add hl,hl ;0439
  711. add hl,hl ;043a
  712. add hl,hl ;043b
  713. cp 011h ;043c
  714. ld a,h ;043e
  715. out (0b3h),a ;043f Floppy data register
  716. jr c,$+18 ;0441
  717. rra ;0443
  718. out (0b3h),a ;0444 Floppy data register
  719. push ix ;0446
  720. pop bc ;0448
  721. ld a,b ;0449
  722. jr nc,$+4 ;044a
  723. or 010h ;044c
  724. ld (0ff82h),a ;044e
  725. out (0c0h),a ;0451 Floppy external control
  726. pop bc ;0453
  727. pop hl ;0454
  728. ld a,01dh ;0455
  729. call 004b6h ;0457
  730. and 098h ;045a
  731. jr nz,$+42 ;045c
  732. call 004c1h ;045e
  733. ld a,(0ff82h) ;0461
  734. bit 4,a ;0464
  735. ld a,082h ;0466
  736. jr z,$+4 ;0468
  737. ld a,08ah ;046a
  738. call 004b6h ;046c
  739. and 09ch ;046f
  740. jr nz,$+21 ;0471
  741. inc h ;0473
  742. inc bc ;0474
  743. dec d ;0475
  744. ret z ;0476
  745. ld a,c ;0477
  746. and 00fh ;0478
  747. jr z,$-91 ;047a
  748. in a,(0b2h) ;047c
  749. inc a ;047e
  750. out (0b2h),a ;047f Floppy sector register
  751. ld a,005h ;0481
  752. ex af,af' ;0483
  753. jr $-35 ;0484
  754. scf ;0486
  755. bit 7,a ;0487
  756. ret nz ;0489
  757. ex af,af' ;048a
  758. dec a ;048b
  759. jr nz,$-107 ;048c
  760. ex af,af' ;048e
  761. bit 4,a ;048f
  762. jr z,$+14 ;0491
  763. ld a,(0ff81h) ;0493
  764. and a ;0496
  765. jr nz,$+8 ;0497
  766. cpl ;0499
  767. ld (0ff81h),a ;049a
  768. jr $-126 ;049d
  769. scf ;049f
  770. ret ;04a0
  771. push bc ;04a1
  772. push ix ;04a2
  773. pop bc ;04a4
  774. ld a,c ;04a5
  775. pop bc ;04a6
  776. cp 010h ;04a7
  777. jp nc,00788h ;04a9
  778. ld a,001h ;04ac
  779. call 004b6h ;04ae
  780. and 004h ;04b1
  781. ret nz ;04b3
  782. scf ;04b4
  783. ret ;04b5
  784. out (0b0h),a ;04b6 Floppy status
  785. in a,(0b4h) ;04b8
  786. bit 4,a ;04ba
  787. jr z,$-4 ;04bc
  788. in a,(0b0h) ;04be
  789. ret ;04c0
  790. push bc ;04c1
  791. ld bc,0b301h ;04c2
  792. jr $+6 ;04c5
  793. push bc ;04c7
  794. ld bc,07803h ;04c8
  795. ld a,b ;04cb
  796. ld (0ff8ch),a ;04cc
  797. ld a,c ;04cf
  798. out (0b4h),a ;04d0 PIO A data
  799. ld bc,006ach ;04d2
  800. ld a,0c3h ;04d5
  801. out (c),a ;04d7
  802. djnz $-2 ;04d9
  803. ld a,07dh ;04db
  804. out (c),a ;04dd
  805. out (c),l ;04df
  806. out (c),h ;04e1
  807. out (c),e ;04e3
  808. out (c),d ;04e5
  809. push hl ;04e7
  810. ld hl,004fbh ;04e8
  811. ld b,003h ;04eb
  812. otir ;04ed
  813. ld a,(0ff8ch) ;04ef
  814. out (c),a ;04f2
  815. ld b,005h ;04f4
  816. otir ;04f6
  817. pop hl ;04f8
  818. pop bc ;04f9
  819. ret ;04fa
  820. inc d ;04fb
  821. jr z,$-121 ;04fc
  822. adc a,d ;04fe
  823. rst 8 ;04ff
  824. ld bc,087cfh ;0500
  825. pop ix ;0503
  826. setupclearscreen:
  827. ;entry during initiation with IX=0092
  828. xor a ;0505 start A=0
  829. ld bc,00eb9h ;0506 C=B9 B=14
  830. ld hl,0054fh ;0509
  831. out (0b8h),a ;050c CRT register select
  832. inc a ;050e A++
  833. outi ;050f C)=(HL++) and B--
  834. jr nz,$-5 ;0511 loop until B==0 (14 bytes to write)
  835. ld de,03002h ;0513
  836. ld hl,03000h ;0516
  837. ld bc,00ffeh ;0519
  838. ;RST 08 jump in here HL=300C DE=300E BC=4E IX=032F
  839. ld a,004h ;051c Select display memory
  840. out (0c8h),a ;051e Output to screen out C8,04 Map and system control
  841. xor a ;0520
  842. ld (hl),a ;0521 put 00h at 3000h or 300Ch
  843. inc hl ;0522 bump
  844. ld (hl),020h ;0523 put 20h at 3001h or 300Dh
  845. dec hl ;0525 go back point to original
  846. ldir ;0526 copy 00 20 through 4K or 80 words
  847. xor a ;0528 Reset map A=0
  848. out (0c8h),a ;0529 out C8,00 Map and system control
  849. jp (ix) ;052b continue
  850. cleartopline:
  851. ;process RST 08 entry DE=300C
  852. push de ;052d save old DE
  853. ld l,e ;052e HL=DE
  854. ld h,d ;052f
  855. inc de ;0530 DE+=2
  856. inc de ;0531
  857. ld bc,0004eh ;0532 80-2
  858. push ix ;0535 save old IX
  859. ld ix,0053dh ;0537 exit addr
  860. jr $-31 ;053b clear line 300C 80char
  861. ;clear line returns here
  862. pop ix ;053d restore old IX
  863. pop de ;053f restore old DE
  864. ret ;0540
  865. printroutine:
  866. ;print routine
  867. ;BC count
  868. ;HL message source
  869. ;DE screen target
  870. ld a,004h ;0541 Select display memory
  871. out (0c8h),a ;0543 Output to screen Map and system control
  872. inc de ;0545 do every other addr
  873. ldi ;0546 (DE++)=(HL++) and BC--
  874. jp pe,00545h ;0548 repeat while BC not 0
  875. xor a ;054b Reset map
  876. out (0c8h),a ;054c Reset to memory Map and system control
  877. jp (hl) ;054e
  878. ;data to be output to io port B9 14 byte CRT data register
  879. defb 069h ;054f
  880. defb 050h ;0550
  881. defb 056h ;0551
  882. defb 00bh ;0552
  883. defb 019h ;0553
  884. defb 003h ;0554
  885. defb 018h ;0555
  886. defb 018h ;0556
  887. defb 000h ;0557
  888. defb 00bh ;0558
  889. defb 020h ;0559
  890. defb 000h ;055a
  891. defb 000h ;055b
  892. defb 000h ;055c
  893. ;
  894. pop hl ;055d
  895. jr $+4 ;055e
  896. ;
  897. otir ;0560 out B bytes from (HL) to (C)
  898. ;
  899. otirloop:
  900. ld c,(hl) ;0562 get register
  901. inc hl ;0563 bump
  902. ld b,(hl) ;0564 get count
  903. inc hl ;0565 bump
  904. ld a,b ;0566 evaluate count
  905. and a ;0567
  906. jr nz,$-8 ;0568 if count not 0 loop
  907. jp (hl) ;056a
  908. ld de,03100h ;056b
  909. ld a,00fh ;056e
  910. out (0b8h),a ;0570 CRT register select
  911. xor a ;0572
  912. out (0b9h),a ;0573 CRT data register
  913. in a,(0bbh) ;0575
  914. or a ;0577
  915. ret nz ;0578
  916. ld de,030a0h ;0579
  917. ret ;057c
  918. ;
  919. ld hl,04600h ;057d
  920. dec hl ;0580
  921. ex (sp),hl ;0581
  922. ex (sp),hl ;0582
  923. ex (sp),hl ;0583
  924. ex (sp),hl ;0584
  925. ld a,l ;0585
  926. or h ;0586
  927. jr nz,$-7 ;0587
  928. ret ;0589
  929. pop ix ;058a
  930. ld a,00fh ;058c
  931. out (0b8h),a ;058e CRT register select
  932. xor a ;0590
  933. out (0b9h),a ;0591 CRT data register
  934. in a,(0bbh) ;0593 ????
  935. and a ;0595
  936. jr nz,$+6 ;0596
  937. ld a,081h ;0598
  938. out (0d4h),a ;059a Hi-res color
  939. ld bc,006cch ;059c
  940. ld hl,005b8h ;059f
  941. otir ;05a2
  942. ld bc,00000h ;05a4
  943. ex (sp),hl ;05a7
  944. ex (sp),hl ;05a8
  945. dec bc ;05a9
  946. ld a,b ;05aa
  947. or c ;05ab
  948. jr nz,$-5 ;05ac
  949. ld a,080h ;05ae
  950. out (0d4h),a ;05b0 Hi-res color
  951. ld a,09fh ;05b2
  952. out (0cch),a ;05b4 ?????
  953. jp (ix) ;05b6
  954. adc a,(hl) ;05b8
  955. inc b ;05b9
  956. sub d ;05ba
  957. cp a ;05bb
  958. rst 18h ;05bc
  959. rst 38h ;05bd
  960. ld a,001h ;05be
  961. out (0c8h),a ;05c0 Map and system control
  962. ex af,af' ;05c2
  963. adc a,(hl) ;05c3
  964. ex af,af' ;05c4
  965. inc hl ;05c5
  966. dec de ;05c6
  967. ld a,e ;05c7
  968. or d ;05c8
  969. jr nz,$-7 ;05c9
  970. out (0c8h),a ;05cb Map and system control
  971. jp 002ech ;05cd
  972. cp 002h ;05d0
  973. ld a,001h ;05d2
  974. out (0c8h),a ;05d4 Map and system control
  975. jr nz,$+31 ;05d6
  976. ld a,(0ff81h) ;05d8
  977. ld (00022h),a ;05db
  978. ld a,c ;05de
  979. sub 010h ;05df
  980. jr c,$+20 ;05e1
  981. ld c,a ;05e3
  982. jr z,$+10 ;05e4
  983. ld a,(0ff8fh) ;05e6
  984. cp 095h ;05e9
  985. jr nz,$+3 ;05eb
  986. inc c ;05ed
  987. ld a,004h ;05ee
  988. add a,c ;05f0
  989. ld c,a ;05f1
  990. push bc ;05f2
  991. pop ix ;05f3
  992. ld a,(0ff80h) ;05f5
  993. or c ;05f8
  994. ld c,a ;05f9
  995. ld a,(0ff91h) ;05fa
  996. ld (de),a ;05fd
  997. inc de ;05fe
  998. push bc ;05ff
  999. ld bc,00004h ;0600
  1000. ldir ;0603
  1001. ld de,00023h ;0605
  1002. ld hl,0ff8dh ;0608
  1003. ld a,(0ff92h) ;060b
  1004. ld (de),a ;060e
  1005. inc de ;060f
  1006. ld bc,00004h ;0610
  1007. ldir ;0613
  1008. pop bc ;0615
  1009. jp (iy) ;0616
  1010. dec b ;0618
  1011. add a,b ;0619
  1012. dec b ;061a
  1013. nop ;061b
  1014. ld bc,002a3h ;061c
  1015. ld hl,00618h ;061f
  1016. otir ;0622
  1017. ld b,0ffh ;0624
  1018. in a,(079h) ;0626
  1019. cp 0c7h ;0628
  1020. jr z,$+6 ;062a
  1021. djnz $-6 ;062c
  1022. scf ;062e
  1023. ret ;062f
  1024. call 00723h ;0630
  1025. ret c ;0633
  1026. in a,(0ffh) ;0634
  1027. rra ;0636
  1028. rra ;0637
  1029. and 007h ;0638
  1030. ld hl,007e2h ;063a
  1031. jr z,$+18 ;063d
  1032. ld hl,007d6h ;063f
  1033. dec a ;0642
  1034. jr z,$+5 ;0643
  1035. ld hl,007cah ;0645
  1036. call 0076bh ;0648
  1037. call 00723h ;064b
  1038. ret c ;064e
  1039. ld de,0ff8dh ;064f
  1040. ld bc,00004h ;0652
  1041. ldir ;0655
  1042. jp 0077fh ;0657
  1043. push bc ;065a
  1044. pop ix ;065b
  1045. ld a,010h ;065d
  1046. sub c ;065f
  1047. jr z,$+4 ;0660
  1048. ld a,020h ;0662
  1049. ld hl,0ff83h ;0664
  1050. ld b,004h ;0667
  1051. ld (hl),008h ;0669
  1052. inc hl ;066b
  1053. ld (hl),a ;066c
  1054. inc hl ;066d
  1055. ld (hl),000h ;066e
  1056. djnz $-3 ;0670
  1057. call 00723h ;0672
  1058. ret c ;0675
  1059. call 0074bh ;0676
  1060. call 00738h ;0679
  1061. and 002h ;067c
  1062. ret z ;067e
  1063. scf ;067f
  1064. ret ;0680
  1065. push bc ;0681
  1066. call 0056bh ;0682
  1067. rst 10h ;0685
  1068. defb 028h ;0686 sount 40
  1069. defb 045h ;0687 Error 1: Disk system error, Call Service
  1070. defb 072h ;0688
  1071. defb 072h ;0689
  1072. defb 06fh ;068a
  1073. defb 072h ;068b
  1074. defb 020h ;068c
  1075. defb 031h ;068d
  1076. defb 03ah ;068e
  1077. defb 020h ;068f
  1078. defb 044h ;0690
  1079. defb 069h ;0691
  1080. defb 073h ;0692
  1081. defb 06bh ;0693
  1082. defb 020h ;0694
  1083. defb 073h ;0695
  1084. defb 079h ;0696
  1085. defb 073h ;0697
  1086. defb 074h ;0698
  1087. defb 065h ;0699
  1088. defb 06dh ;069a
  1089. defb 020h ;069b
  1090. defb 065h ;069c
  1091. defb 072h ;069d
  1092. defb 072h ;069e
  1093. defb 06fh ;069f
  1094. defb 072h ;06a0
  1095. defb 02ch ;06a1
  1096. defb 020h ;06a2
  1097. defb 043h ;06a3
  1098. defb 061h ;06a4
  1099. defb 06ch ;06a5
  1100. defb 06ch ;06a6
  1101. defb 020h ;06a7
  1102. defb 053h ;06a8
  1103. defb 065h ;06a9
  1104. defb 072h ;06aa
  1105. defb 076h ;06ab
  1106. defb 069h ;06ac
  1107. defb 063h ;06ad
  1108. defb 065h ;06ae
  1109. call 0057dh ;06af
  1110. call 0057dh ;06b2
  1111. call 0057dh ;06b5
  1112. call 00503h ;06b8
  1113. call 003d9h ;06bb
  1114. pop bc ;06be
  1115. scf ;06bf
  1116. ret ;06c0
  1117. call 004c7h ;06c1
  1118. ld a,b ;06c4
  1119. ld (0ff85h),a ;06c5
  1120. ld a,c ;06c8
  1121. ld (0ff86h),a ;06c9
  1122. ld a,d ;06cc
  1123. ld (0ff87h),a ;06cd
  1124. push bc ;06d0
  1125. push hl ;06d1
  1126. call 00723h ;06d2
  1127. jp c,006fbh ;06d5
  1128. ld hl,0ff83h ;06d8
  1129. ld bc,00678h ;06db
  1130. in a,(079h) ;06de
  1131. and 041h ;06e0
  1132. jr nz,$-4 ;06e2
  1133. outi ;06e4
  1134. jr nz,$-8 ;06e6
  1135. out (07ah),a ;06e8 ?????
  1136. nop ;06ea
  1137. in a,(079h) ;06eb
  1138. and 044h ;06ed
  1139. jr nz,$-4 ;06ef
  1140. out (07bh),a ;06f1 ????
  1141. call 00738h ;06f3
  1142. and 002h ;06f6
  1143. call nz,006ffh ;06f8
  1144. pop hl ;06fb
  1145. pop bc ;06fc
  1146. inc bc ;06fd
  1147. ret ;06fe
  1148. call 00723h ;06ff
  1149. ret c ;0702
  1150. ld a,003h ;0703
  1151. call 0074dh ;0705
  1152. ld bc,00478h ;0708
  1153. ld hl,0ff89h ;070b
  1154. in a,(079h) ;070e
  1155. cp 00fh ;0710
  1156. jr nz,$-4 ;0712
  1157. ini ;0714
  1158. jr nz,$-8 ;0716
  1159. call 00738h ;0718
  1160. ld a,(0ff89h) ;071b
  1161. sub 098h ;071e
  1162. ret z ;0720
  1163. scf ;0721
  1164. ret ;0722
  1165. in a,(079h) ;0723
  1166. and 080h ;0725
  1167. scf ;0727
  1168. ret z ;0728
  1169. ld a,001h ;0729
  1170. out (079h),a ;072b ????
  1171. ld b,0ffh ;072d
  1172. in a,(079h) ;072f
  1173. and 080h ;0731
  1174. ret z ;0733
  1175. djnz $-5 ;0734
  1176. scf ;0736
  1177. ret ;0737
  1178. in a,(079h) ;0738
  1179. and 044h ;073a
  1180. jr nz,$-4 ;073c
  1181. in a,(078h) ;073e
  1182. ld b,a ;0740
  1183. in a,(079h) ;0741
  1184. and 042h ;0743
  1185. jr nz,$-4 ;0745
  1186. in a,(078h) ;0747
  1187. ld a,b ;0749
  1188. ret ;074a
  1189. ld a,000h ;074b
  1190. call 00760h ;074d
  1191. ld a,(0ff84h) ;0750
  1192. call 00760h ;0753
  1193. ld a,000h ;0756
  1194. ld b,004h ;0758
  1195. call 00760h ;075a
  1196. djnz $-3 ;075d
  1197. ret ;075f
  1198. push af ;0760
  1199. in a,(079h) ;0761
  1200. and 041h ;0763
  1201. jr nz,$-4 ;0765
  1202. pop af ;0767
  1203. out (078h),a ;0768 Step out
  1204. ret ;076a
  1205. ld a,00ch ;076b
  1206. call 0074dh ;076d
  1207. ld bc,00878h ;0770
  1208. in a,(079h) ;0773
  1209. cp 007h ;0775
  1210. jr nz,$-4 ;0777
  1211. outi ;0779
  1212. jr nz,$-8 ;077b
  1213. jr $-69 ;077d
  1214. ld a,0e4h ;077f
  1215. call 00794h ;0781
  1216. ret z ;0784
  1217. jp 00681h ;0785
  1218. call 00723h ;0788
  1219. ret c ;078b
  1220. ld a,001h ;078c
  1221. call 00794h ;078e
  1222. ret z ;0791
  1223. jr $+11 ;0792
  1224. call 0074dh ;0794
  1225. call 00738h ;0797
  1226. and 002h ;079a
  1227. ret ;079c
  1228. call 0056bh ;079d
  1229. rst 10h ;07a0
  1230. defb 027h ;07a1 count 39
  1231. defb 045h ;07a2 Error 3: Disk Malfunction, Call Service
  1232. defb 072h ;07a3
  1233. defb 072h ;07a4
  1234. defb 06fh ;07a5
  1235. defb 072h ;07a6
  1236. defb 020h ;07a7
  1237. defb 033h ;07a8
  1238. defb 03ah ;07a9
  1239. defb 020h ;07aa
  1240. defb 044h ;07ab
  1241. defb 069h ;07ac
  1242. defb 073h ;07ad
  1243. defb 06bh ;07ae
  1244. defb 020h ;07af
  1245. defb 04dh ;07b0
  1246. defb 061h ;07b1
  1247. defb 06ch ;07b2
  1248. defb 066h ;07b3
  1249. defb 075h ;07b4
  1250. defb 06eh ;07b5
  1251. defb 063h ;07b6
  1252. defb 074h ;07b7
  1253. defb 069h ;07b8
  1254. defb 06fh ;07b9
  1255. defb 06eh ;07ba
  1256. defb 02ch ;07bb
  1257. defb 020h ;07bc
  1258. defb 043h ;07bd
  1259. defb 061h ;07be
  1260. defb 06ch ;07bf
  1261. defb 06ch ;07c0
  1262. defb 020h ;07c1
  1263. defb 053h ;07c2
  1264. defb 065h ;07c3
  1265. defb 072h ;07c4
  1266. defb 076h ;07c5
  1267. defb 069h ;07c6
  1268. defb 063h ;07c7
  1269. defb 065h ;07c8
  1270. halt ;07c9
  1271. ld bc,00432h ;07ca
  1272. ld bc,00031h ;07cd
  1273. ld b,b ;07d0
  1274. dec bc ;07d1
  1275. ld b,000h ;07d2
  1276. sub l ;07d4
  1277. rst 38h ;07d5
  1278. ld bc,00232h ;07d6
  1279. ld bc,00031h ;07d9
  1280. ld b,b ;07dc
  1281. dec bc ;07dd
  1282. ld b,000h ;07de
  1283. ld c,d ;07e0
  1284. rst 38h ;07e1
  1285. nop ;07e2
  1286. nop ;07e3
  1287. ld c,d ;07e4
  1288. rst 38h ;07e5
  1289. rst 38h ;07e6
  1290. rst 38h ;07e7
  1291. rst 38h ;07e8
  1292. rst 38h ;07e9
  1293. rst 38h ;07ea
  1294. rst 38h ;07eb
  1295. rst 38h ;07ec
  1296. rst 38h ;07ed
  1297. rst 38h ;07ee
  1298. rst 38h ;07ef
  1299. rst 38h ;07f0
  1300. rst 38h ;07f1
  1301. rst 38h ;07f2
  1302. rst 38h ;07f3
  1303. rst 38h ;07f4
  1304. rst 38h ;07f5
  1305. rst 38h ;07f6
  1306. rst 38h ;07f7
  1307. rst 38h ;07f8
  1308. rst 38h ;07f9
  1309. rst 38h ;07fa
  1310. rst 38h ;07fb
  1311. rst 38h ;07fc
  1312. rst 38h ;07fd
  1313. rst 38h ;07fe
  1314. rst 38h ;07ff