@nataliapc/mcp-openmsx 1.1.4 → 1.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/README.md +46 -2
  2. package/dist/openmsx.js +11 -1
  3. package/dist/server.js +343 -123
  4. package/dist/utils.js +43 -0
  5. package/package.json +4 -1
  6. package/resources/audio/toc.json +31 -0
  7. package/resources/bios/Calling_BIOS_from_MSX-DOS.md +75 -0
  8. package/resources/bios/MSX2_SUBROM_BIOS_calls.md +734 -0
  9. package/resources/bios/MSX_BIOS_calls.md +1046 -0
  10. package/resources/bios/toc.json +24 -0
  11. package/resources/book--msx2-technical-handbook/Appendix1__BIOS_Listing.md +1464 -0
  12. package/resources/book--msx2-technical-handbook/Appendix2__Math-Pack.md +427 -0
  13. package/resources/book--msx2-technical-handbook/Appendix3__Bit_Block_Transfer.md +182 -0
  14. package/resources/book--msx2-technical-handbook/Appendix4__Work_Area_Listing.md +1637 -0
  15. package/resources/book--msx2-technical-handbook/Appendix5__VRAM_Map.md +145 -0
  16. package/resources/book--msx2-technical-handbook/Appendix6__IO_Map.md +128 -0
  17. package/resources/book--msx2-technical-handbook/Appendix8_10__Control_Codes_and_Escape_Sequences.md +76 -0
  18. package/resources/book--msx2-technical-handbook/Chapter1__MSX_System_Overview.md +402 -0
  19. package/resources/book--msx2-technical-handbook/Chapter2__BASIC.md +2148 -0
  20. package/resources/book--msx2-technical-handbook/Chapter3__MSX-DOS.md +2577 -0
  21. package/resources/book--msx2-technical-handbook/Chapter4a__VDP_and_Display_Screen.md +2052 -0
  22. package/resources/book--msx2-technical-handbook/Chapter4b__VDP_and_Display_Screen.md +3311 -0
  23. package/resources/book--msx2-technical-handbook/Chapter5a__Access_to_Peripherals_through_BIOS.md +2714 -0
  24. package/resources/book--msx2-technical-handbook/Chapter5b__Access_to_Peripherals_through_BIOS.md +1263 -0
  25. package/resources/book--msx2-technical-handbook/MSX_Kun_BASIC_Compiler.md +220 -0
  26. package/resources/book--msx2-technical-handbook/toc.json +82 -0
  27. package/resources/book--the-msx-red-book/the_msx_red_book.md +10349 -0
  28. package/resources/book--the-msx-red-book/toc.json +12 -0
  29. package/resources/msx-dos/MSX-DOS_2_Function_Specifications.md +1366 -0
  30. package/resources/msx-dos/MSX-DOS_2_Program_Interface_Specification.md +963 -0
  31. package/resources/msx-dos/toc.json +18 -0
  32. package/resources/msx-unapi/Ethernet_UNAPI_specification_1.1.md +369 -0
  33. package/resources/msx-unapi/Introduction_to_MSX-UNAPI.md +132 -0
  34. package/resources/msx-unapi/MSX_UNAPI_specification_1.1.md +679 -0
  35. package/resources/msx-unapi/TCP-IP_UNAPI_specification.md +2361 -0
  36. package/resources/msx-unapi/toc.json +27 -0
  37. package/resources/others/toc.json +11 -0
  38. package/resources/processors/Z80_R800_instruction_set.md +482 -0
  39. package/resources/processors/toc.json +24 -0
  40. package/resources/processors/z80-undocumented.tex +5617 -0
  41. package/resources/processors/z80_detailed_instruction_set.md +2025 -0
  42. package/resources/programming/toc.json +121 -0
  43. package/resources/system/MSX_IO_ports_overview.md +554 -0
  44. package/resources/system/toc.json +18 -0
  45. package/resources/video/V9938_Technical_Data_Book.md +3623 -0
  46. package/resources/video/V9958_Technical_Data_Book.md +417 -0
  47. package/resources/video/V9990_Programmers_Manual_Banzai.html +1582 -0
  48. package/resources/video/VDP_TMS9918A.txt +709 -0
  49. package/resources/video/toc.json +28 -0
@@ -0,0 +1,734 @@
1
+ # MSX 2 SUBROM BIOS Entries
2
+
3
+ ## MSX 2 SUBROM BIOS Entries
4
+
5
+ These are additional BIOS routines which are available in the MSX 2 standard. No new subrom calls were introduced on the MSX 2+ / turbo R. They are located in the so-called SUBROM, which is an alternate BIOS page, switched when necessary. You can call the SUBROM by putting the jump address in register IX and then calling the BIOS routine `EXTROM` (#15F) or `SUBROM` (#15C). Please note that officially it is illegal to call the SUBROM using `CALSLT` because this will cause trouble with some DiskROMs. Therefore, it cannot be called directly from MSX-DOS environment. There is a workaround for that though, which is described in [this article](#msxdocs://bios/Calling_BIOS_from_MSX-DOS).
6
+
7
+ * [Basic calls](#basic-calls)
8
+ * [Double BIOS calls](#double-bios-calls)
9
+ * [MSX 2 specific calls](#msx-2-specific-calls)
10
+ * [Palette-functions](#palette-functions)
11
+ * [BIT-BLIT routines](#bit-blit-routines)
12
+
13
+ ### BASIC calls
14
+
15
+ #### PAINT (Basic!)
16
+ ```
17
+ Address : #0069
18
+ Function : Paints graphical screen
19
+ Input : HL - Basic textpointer
20
+ Output : HL - Adapted Basic textpointer
21
+ Registers: All
22
+ ```
23
+ #### PSET (Basic!)
24
+ ```
25
+ Address : #006D
26
+ Function : Sets a point
27
+ Input : HL - Basic textpointer
28
+ Output : HL - Adapted Basic textpointer
29
+ Registers: All
30
+ ```
31
+ #### ATRSCN (Basic!)
32
+ ```
33
+ Address : #0071
34
+ Function : Scans color attribute
35
+ Input : HL - Basic textpointer
36
+ Output : HL - Adapted Basic textpointer
37
+ Registers: All
38
+ ```
39
+ #### GLINE (Basic!)
40
+ ```
41
+ Address : #0075
42
+ Function : Draws a line
43
+ Input : HL - Basic textpointer
44
+ Output : HL - Adapted Basic textpointer
45
+ Registers: All
46
+ ```
47
+ #### DOBOXF (Basic!)
48
+ ```
49
+ Address : #0079
50
+ Function : Draws a filled box
51
+ Input : HL - Basic textpointer
52
+ Output : HL - Adapted Basic textpointer
53
+ Registers: All
54
+ ```
55
+ #### DOLINE (Basic!)
56
+ ```
57
+ Address : #007D
58
+ Function : Draws a line
59
+ Input : HL - Basic textpointer
60
+ Output : HL - Adapted Basic textpointer
61
+ Registers: All
62
+ ```
63
+ #### BOXLIN (Basic!)
64
+ ```
65
+ Address : #0081
66
+ Function : Draws a box
67
+ Input : HL - Basic textpointer
68
+ Output : HL - Adapted Basic textpointer
69
+ Registers: All
70
+ ```
71
+ #### DOGRPH
72
+ ```
73
+ Address : #0085
74
+ Function : Draws a line
75
+ Input : BC, HL are start coordinates
76
+ GXPOS, GYPOS are end-coordinates
77
+ ATRBYT for attribute
78
+ LOGOPR for logical operator
79
+ Registers: AF
80
+ ```
81
+ #### GRPPRT
82
+ ```
83
+ Address : #0089
84
+ Function : Places a character on graphic screen
85
+ Input : A - Character
86
+ ATRBYT for attribute
87
+ LOGOPR for logical operator
88
+ ```
89
+ #### SCALXY
90
+ ```
91
+ Address : #008D
92
+ Function : Clip coordinates (till border of screen)
93
+ Input : BC - X-position
94
+ DE - Y-position
95
+ Output : BC - X-position bordered
96
+ DE - Y-position bordered
97
+ Registers: AF
98
+ ```
99
+ #### MAPXYC
100
+ ```
101
+ Address : #0091
102
+ Function : Converts an X,Y position to an address: and mask in CLOC and CMASK
103
+ Input : BC - X-position
104
+ DE - Y-position
105
+ Output : HL - VRAM address: In SCREEN 3 (in CLOC too)
106
+ A - Mask In SCREEN 3 (in CMASK too)
107
+ HL - X-position In SCREEN 5->8 (in CLOC too)
108
+ A - Y-position In SCREEN 5->8 (in CMASK too)
109
+ Registers: F
110
+ ```
111
+ #### READC
112
+ ```
113
+ Address : #0095
114
+ Function : Reads attribute of pixel
115
+ Input : X-position in CLOC
116
+ Y-position in CMASK
117
+ Output : A - the attribute
118
+ Registers: AF
119
+ ```
120
+ #### SETATR
121
+ ```
122
+ Address : #0099
123
+ Function : Set attribute in ATRBYT
124
+ Input : A - attribute
125
+ Output : C-flag set if attribute is wrong
126
+ Registers: F
127
+ ```
128
+ #### SETC
129
+ ```
130
+ Address : #009D
131
+ Function : Set attribute of pixel
132
+ Input : X-position in CLOC
133
+ Y-position in CMASK
134
+ Attribute-byte in ATRBYT
135
+ Registers: AF
136
+ ```
137
+ #### TRIGHT
138
+ ```
139
+ Address : #00A1
140
+ Function : Moves pixel to the right
141
+ Input : X-position in CLOC
142
+ Yposition in CMASK
143
+ Output : New X-position in CLOC
144
+ New Y-position in CMASK
145
+ C-flag set if border of screen is reached
146
+ Registers: AF
147
+ Remark : SCREEN 3 only
148
+ ```
149
+ #### RIGHTC
150
+ ```
151
+ Address : #00A5
152
+ Function : Moves pixel to the right
153
+ Input : See TRIGHT
154
+ Output : See TRIGHT (except for the C-flag remark)
155
+ Registers: AF
156
+ Remark : SCREEN 3 only
157
+ ```
158
+ #### TLEFTC
159
+ ```
160
+ Address : #00A9
161
+ Function : Moves pixel to the left
162
+ Input : See TRIGHT
163
+ Output : See TRIGHT
164
+ Registers: AF
165
+ ```
166
+ #### LEFTC
167
+ ```
168
+ Address : #00AD
169
+ Function : Moves pixel to the left
170
+ Input : See RIGHTC
171
+ Output : See RIGHTC
172
+ Registers: AF
173
+ Remark : SCREEN 3 only
174
+ ```
175
+ #### TDOWNC
176
+ ```
177
+ Address : #00B1
178
+ Function : Moves pixel down
179
+ Input : See TRIGHT
180
+ Output : See TRIGHT
181
+ Registers: AF
182
+ ```
183
+ #### DOWNC
184
+ ```
185
+ Address : #00B5
186
+ Function : Moves pixel down
187
+ Input : See RIGHTC
188
+ Output : See RIGHTC
189
+ Registers: AF
190
+ Remark : SCREEN 3 only
191
+ ```
192
+ #### TUPC
193
+ ```
194
+ Address : #00B9
195
+ Function : Moves pixel up
196
+ Input : See TRIGHT
197
+ Output : See TRIGHT
198
+ Registers: AF
199
+ ```
200
+ #### UPC
201
+ ```
202
+ Address : #00BD
203
+ Function : Moves pixel up
204
+ Input : See RIGHTC
205
+ Output : See RIGHTC
206
+ Registers: AF
207
+ Remark : SCREEN 3 only
208
+ ```
209
+ #### SCANR
210
+ ```
211
+ Address : #00C1
212
+ Function : Scans pixels to the right
213
+ Input : B - 'Suspend'-flag
214
+ C - Border-counting
215
+ Output : DE - Border-counting
216
+ C - 'Pixel-changed'-flag
217
+ Registers: All
218
+ ```
219
+ #### SCANL
220
+ ```
221
+ Address : #00C5
222
+ Function : Scans pixels to the left
223
+ Input : DE - Border-counting
224
+ Output : DE - Border-counting
225
+ C - 'Pixel-changed'-flag
226
+ Registers: All
227
+ ```
228
+ #### NVBXLN
229
+ ```
230
+ Address : #00C9
231
+ Function : Draws a box
232
+ Input : BC - X start-position
233
+ DE - Y-start-position
234
+ X end-position in GXPOS
235
+ Y-end-position in GYPOS
236
+ Attribute in ATRBYT
237
+ Logical operator in LOGOPR
238
+ Registers: All
239
+ ```
240
+ #### NVBXFL
241
+ ```
242
+ Address : #00CD
243
+ Function : Draws a filled box
244
+ Input : See NVBXLN
245
+ Registers: All
246
+ ```
247
+
248
+ ### Double BIOS calls
249
+
250
+ The following routines are called from the equally named calls in the MAIN ROM, and therefor the input and results will not be shown, nor will the register changes. For that, refer to the corresponding call in the MSX1-BIOS.
251
+
252
+ #### CHGMOD
253
+ ```
254
+ Address : #00D1
255
+ Function : Switches to given screenmode
256
+ ```
257
+ #### INITXT
258
+ ```
259
+ Address : #00D5
260
+ Function : Switches to SCREEN 0
261
+ ```
262
+ #### INIT32
263
+ ```
264
+ Address : #00D9
265
+ Function : Switches to SCREEN 1
266
+ ```
267
+ #### INIGRP
268
+ ```
269
+ Address : #00DD
270
+ Function : Switches to SCREEN 2
271
+ ```
272
+ #### INIMLT
273
+ ```
274
+ Address : #00E1
275
+ Function : Switches to SCREEN 3
276
+ ```
277
+ #### SETTXT
278
+ ```
279
+ Address : #00E5
280
+ Function : Switches VDP in SCREEN 0
281
+ ```
282
+ #### SETT32
283
+ ```
284
+ Address : #00E9
285
+ Function : Switches VDP in SCREEN 1
286
+ ```
287
+ #### SETGRP
288
+ ```
289
+ Address : #00ED
290
+ Function : Switches VDP in SCREEN 2
291
+ ```
292
+ #### SETMLT
293
+ ```
294
+ Address : #00F1
295
+ Function : Switches VDP in SCREEN 3
296
+ ```
297
+ #### CLRSPR
298
+ ```
299
+ Address : #00F5
300
+ Function : Initialises sprite tables
301
+ ```
302
+ #### CALPAT
303
+ ```
304
+ Address : #00F9
305
+ Function : Returns address of sprite pattern-table
306
+ ```
307
+ #### CALATR
308
+ ```
309
+ Address : #00FD
310
+ Function : Returns address of sprite attribute-table
311
+ ```
312
+ #### GSPSIZ
313
+ ```
314
+ Address : #0101
315
+ Function : Returns current sprite-size
316
+ ```
317
+
318
+ ### MSX 2 specific calls
319
+
320
+ #### GETPAT
321
+ ```
322
+ Address : #0105
323
+ Function : Returns current pattern of a character
324
+ Input : A - ASCII code of character
325
+ Output : Pattern in PATWRK starting from address #FC40
326
+ Registers: All
327
+ Remark : Same as routine in MSX1-BIOS, but there is doesn't exist as
328
+ a BIOS-call
329
+ ```
330
+ #### WTRVRM
331
+ ```
332
+ Address : #0109
333
+ Function : Writes data in VRAM (#0000 - #ffff)
334
+ Input : HL - Address
335
+ A - Value
336
+ Registers: AF
337
+ ```
338
+ #### RDVRM
339
+ ```
340
+ Address : #010D
341
+ Function : Reads content in VRAM (#0000 - #ffff)
342
+ Input : HL - Address
343
+ Output : A - Read value
344
+ Registers: AF
345
+ ```
346
+ #### CHGCLR
347
+ ```
348
+ Address : #0111
349
+ Function : Changes screen colors
350
+ Input : A - Screenmode
351
+ See MSX1BIOS.HTM (CHGCLR)
352
+ Registers: All
353
+ ```
354
+ #### CLS
355
+ ```
356
+ Address : #0115
357
+ Function : Clear screen
358
+ Registers: All
359
+ ```
360
+ #### CLRTXT
361
+ ```
362
+ Address : #0119
363
+ Function : Clear Text-screen
364
+ Registers: All
365
+ ```
366
+ #### DSPFNK
367
+ ```
368
+ Address : #011D
369
+ Function : Display the function keys
370
+ Registers: All
371
+ ```
372
+ #### DELLNO
373
+ ```
374
+ Address : #0121
375
+ Function : Remove line in text screen
376
+ Input : L - Line Number
377
+ Registers: All
378
+ ```
379
+ #### INSLNO
380
+ ```
381
+ Address : #0125
382
+ Function : Add line to text screen
383
+ Input : L - Line Number
384
+ Registers: All
385
+ ```
386
+ #### PUTVRM
387
+ ```
388
+ Address : #0129
389
+ Function : Put character on text screen
390
+ Input : H - Y-position
391
+ L - X-position
392
+ Registers: AF
393
+ ```
394
+ #### WRTVDP
395
+ ```
396
+ Address : #012D
397
+ Function : Write to VDP-register
398
+ Input : B - Value to write
399
+ C - Register number
400
+ Registers: AF, BC
401
+ ```
402
+ #### VDPSTA
403
+ ```
404
+ Address : #0131
405
+ Function : Read VDP-status
406
+ Input : A - Status register
407
+ Output : A - Read value
408
+ Registers: F
409
+ ```
410
+ #### KYKLOK
411
+ ```
412
+ Address : #0135
413
+ Function : Control KANA-key and KANA-lamp (Japan)
414
+ Registers: AF
415
+ ```
416
+ #### PUTCHR
417
+ ```
418
+ Address : #0139
419
+ Function : Gets a key-code of keyboard, conversion to KANA and in
420
+ buffer (Japan)
421
+ Input : Z-flag set if not in conversion mode
422
+ Registers: All
423
+ ```
424
+ #### SETPAG
425
+ ```
426
+ Address : #013D
427
+ Function : Switches the page
428
+ Input : ACPAGE - Active page
429
+ DPPAGE - display page number
430
+ Registers: AF
431
+ ```
432
+
433
+ ### Palette-functions
434
+
435
+ #### INIPLT
436
+ ```
437
+ Address : #0141
438
+ Function : Initialises the palette (current palet is save in VRAM)
439
+ Registers: AF, BC, DE
440
+ ```
441
+ #### RSTPLT
442
+ ```
443
+ Address : #0145
444
+ Function : Restores palette from VRAM
445
+ Registers: AF, BC, DE
446
+ ```
447
+ #### GETPLT
448
+ ```
449
+ Address : #0149
450
+ Function : Obtains the colorcodes from the palette
451
+ Input : A - Colorcode
452
+ Output : B - RRRRBBBB
453
+ C - xxxxGGGG
454
+ Registers: AF, DE
455
+ ```
456
+ #### SETPLT
457
+ ```
458
+ Address : #014D
459
+ Function : Sets the color code to the palette
460
+ Input : D - Colorcode
461
+ E - xxxxGGGG
462
+ A - RRRRBBBB
463
+ Registers: AF
464
+ ```
465
+ #### PUTSPRT (Basic!)
466
+ ```
467
+ Address : #0151
468
+ Function : Set sprites
469
+ Input : HL - Basic textpointer
470
+ Output : HL - Adapted Basic textpointer
471
+ Registers: All
472
+ ```
473
+ #### COLOR (Basic!)
474
+ ```
475
+ Address : #0155
476
+ Function : Changes Screen- or spritecolor, or palettevalues
477
+ Input : HL - Basic textpointer
478
+ Output : HL - Adapted Basic textpointer
479
+ Registers: All
480
+ ```
481
+ #### SCREEN (Basic!)
482
+ ```
483
+ Address : #0159
484
+ Function : Changes screenmode
485
+ Input : HL - Basic textpointer
486
+ Output : HL - Adapted Basic textpointer
487
+ Registers: All
488
+ ```
489
+ #### WIDTHS (Basic!)
490
+ ```
491
+ Address : #015D
492
+ Function : Changes textscreen-width
493
+ Input : HL - Basic textpointer
494
+ Output : HL - Adapted Basic textpointer
495
+ Registers: All
496
+ ```
497
+ #### VDP (Basic!)
498
+ ```
499
+ Address : #0161
500
+ Function : Sets VDP-register
501
+ Input : HL - Basic textpointer
502
+ Output : HL - Adapted Basic textpointer
503
+ Registers: All
504
+ ```
505
+ #### VDPF (Basic!)
506
+ ```
507
+ Address : #0165
508
+ Function : Reads VDP-register
509
+ Input : HL - Basic textpointer
510
+ Output : HL - Adapted Basic textpointer
511
+ Registers: All
512
+ ```
513
+ #### BASE (Basic!)
514
+ ```
515
+ Address : #0169
516
+ Function : Sets VDP base-register
517
+ Input : HL - Basic textpointer
518
+ Output : HL - Adapted Basic textpointer
519
+ Registers: All
520
+ ```
521
+ #### BASEF (Basic!)
522
+ ```
523
+ Address : #016D
524
+ Function : Reads VDP base-register
525
+ Input : HL - Basic textpointer
526
+ Output : HL - Adapted Basic textpointer
527
+ Registers: All
528
+ ```
529
+ #### VPOKE (Basic!)
530
+ ```
531
+ Address : #0171
532
+ Function : Writes a byte to VRAM
533
+ Input : HL - Basic textpointer
534
+ Output : HL - Adapted Basic textpointer
535
+ Registers: All
536
+ ```
537
+ #### VPEEK (Basic!)
538
+ ```
539
+ Address : #0175
540
+ Function : Reads a byte from VRAM
541
+ Input : HL - Basic textpointer
542
+ Output : HL - Adapted Basic textpointer
543
+ Registers: All
544
+ ```
545
+ #### SETS (Basic!)
546
+ ```
547
+ Address : #0179
548
+ Function : Sets BEEP, ADJUST, TIME and DATE
549
+ Input : HL - Basic textpointer
550
+ Output : HL - Adapted Basic textpointer
551
+ Registers: All
552
+ ```
553
+ #### BEEP
554
+ ```
555
+ Address : #017D
556
+ Function : Generates beep
557
+ Registers: All
558
+ ```
559
+ #### PROMPT
560
+ ```
561
+ Address : #0181
562
+ Function : Shows prompt (default: “Ok”)
563
+ Registers: All
564
+ ```
565
+ #### SDFSCR
566
+ ```
567
+ Address : #0185
568
+ Function : Recovers screen-parameters of clock-chip. When C-flag is set
569
+ function-key text will be displayd
570
+ Input : C-flag reset after MSX-DOS call
571
+ Registers: All
572
+ ```
573
+ #### SETSCR
574
+ ```
575
+ Address : #0189
576
+ Function : Recovers screen-parameter and prints Welcome message
577
+ Registers: All
578
+ ```
579
+ #### SCOPY (Basic!)
580
+ ```
581
+ Address : #018D
582
+ Function : Copy's VRAM, array and disk-file
583
+ Input : HL - Basic textpointer
584
+ Output : HL - Adapted Basic textpointer
585
+ Registers: All
586
+ ```
587
+
588
+ ### BIT-BLIT routines
589
+
590
+ From here on the so-called BIT-BLIT routines are listed, which are mostly executed by the VDP. The parameters must be passed through the system RAM at #F562. See the MSX 2 system variables documentation for more details. HL must always contain the value #F562 when calling.
591
+
592
+ #### BLTVV
593
+ ```
594
+ Address : #0191
595
+ Function : Copy VRAM to VRAM
596
+ Input : SX, SY, DX, DY, NX, NY, ARG, L\_OP
597
+ Registers: All
598
+ ```
599
+ #### BLTVM
600
+ ```
601
+ Address : #0195
602
+ Function : Copy Main-RAM to VRAM
603
+ Input : SX - Address of screendata in RAM
604
+ DX, DY, ARG, L\_OP. NX and NY must be in screendata
605
+ Output : C-flag set if data failure in RAM
606
+ Registers: All
607
+ ```
608
+ #### BLTMV
609
+ ```
610
+ Address : #0199
611
+ Function : Copy VRAM to Main-RAM
612
+ Input : DX - Address of screendata in RAM
613
+ SX, SY, ARG, L\_OP. NX and NY must be in screendata
614
+ Registers: All
615
+ ```
616
+ #### BLTVD
617
+ ```
618
+ Address : #019D
619
+ Function : Copy Diskfile to VRAM
620
+ Input : SX -Address of filename.
621
+ SX, SY, ARG, L\_OP. NX and NY must be in diskfile
622
+ Registers: All
623
+ ```
624
+ #### BLTDV
625
+ ```
626
+ Address : #01A1
627
+ Function : Copy VRAM to Diskfile
628
+ Input : DX - Address of filenaam.
629
+ SX, SY, NX, NY,ARG
630
+ Registers: All
631
+ ```
632
+ #### BLTMD
633
+ ```
634
+ Address : #01A5
635
+ Function : Copy Diskfile to Main-RAM
636
+ Input : SX - Address of filenaam.
637
+ DX - start-address
638
+ DY - end-address (in Main-RAM)
639
+ Registers: All
640
+ ```
641
+ #### BLTDM
642
+ ```
643
+ Address : #01A9
644
+ Function : Copy Main-RAM to Diskfile
645
+ Input : DX - Address of filenaam.
646
+ SX - start-address
647
+ SY - end-address (in Main-RAM)
648
+ Registers: All
649
+ ```
650
+ #### NEWPAD
651
+ ```
652
+ Address : #01AD
653
+ Function : Read light pen, mouse and trackball
654
+ Input : A - Function call number. Fetch device data first, then read.
655
+
656
+ [ 8] Fetch light pen (#FF if available; touching screen)
657
+ [ 9] Read X-position
658
+ [10] Read Y-position
659
+ [11] Read lightpen-status (#FF if pressed)
660
+
661
+ [12] Fetch mouse/trackball in port 1
662
+ [13] Read X-offset
663
+ [14] Read Y-offset
664
+ [15] No function (always #00)
665
+
666
+ [16] Fetch mouse/trackball in port 2
667
+ [17] Read X-offset
668
+ [18] Read Y-offset
669
+ [19] No function (always #00)
670
+
671
+ [20] Fetch 2nd light pen (#FF if available; touching screen)
672
+ [21] Read X-position
673
+ [22] Read Y-position
674
+ [23] Read light-pen status (#FF if pressed)
675
+
676
+ Output : A - Read value
677
+ Registers: All
678
+ Remark : Access via [GTPAD](msxbios.php#GTPAD) in the main BIOS, function call numbers 8 and up
679
+ will be forwarded to this call.
680
+ ```
681
+ #### GETPUT (Basic!)
682
+ ```
683
+ Address : #01B1
684
+ Function : GET TIME, GET DATE and PUT KANJI
685
+ Input : HL - Basic textpointer
686
+ Output : HL - Adapted Basic textpointer
687
+ Registers: All
688
+ ```
689
+ #### CHGMDP
690
+ ```
691
+ Address : #01B5
692
+ Function : sets SCREEN-mode
693
+ Input : A - SCREEN-mode
694
+ Registers: All
695
+ ```
696
+ #### RESVI
697
+ ```
698
+ Address : #01B9
699
+ Function : Not used... Reserve entry
700
+ ```
701
+ #### KNJPRT
702
+ ```
703
+ Address : #01BD
704
+ Function : Puts Kanji-character on graphical screen (5-8)
705
+ Input : BC - JIS Kanji-character code
706
+ A - Display-mode (0=full, 1=even, 2=odd)
707
+ Registers: AF
708
+ ```
709
+ #### REDCLK
710
+ ```
711
+ Address : #01F5
712
+ Function : Read clock-RAM
713
+ Input : C - clock-RAM address
714
+ xxBBAAAA
715
+ ||++++-- address
716
+ ++------ Block-number
717
+ Output : A - Read value in lowest four bits
718
+ Registers: F
719
+ ```
720
+ #### WRTCLK
721
+ ```
722
+ Address : #01F9
723
+ Function : Write clock-RAM
724
+ Input : C - clock-RAM address
725
+ xxBBAAAA
726
+ ||++++-- address :
727
+ ++------ Block-number
728
+ A - Value to write
729
+ Registers: F
730
+ ```
731
+
732
+ ~BiFi
733
+
734
+ © 2025 MSX Assembly Page. MSX is a trademark of MSX Licensing Corporation.