-
Notifications
You must be signed in to change notification settings - Fork 78
/
c64mem_sta.txt
894 lines (526 loc) · 32.3 KB
/
c64mem_sta.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
- C64 RAM Map (STA)
-
- Joe Forster/STA:
- Commodore 64 memory map
- http://sta.c64.org/cbm64mem.html
-
- edited by awsm.de // @awsm9000
- http://www.awsm.de/mem64/
-
- Corrections (typos as well as content), translations etc.
- welcome at: https://github.com/mist64/c64ref
-
------------------------------------------------------------
-
# This plain text file is formatted so that it can be automatically
# parsed in order to create cross-references etc.
# * Lines starting with "-" is top-level information. The first line
# is the title. Lines starting with "--" are separators.
# * Lines starting with "#" are internal comments.
# * Hex addresses start at column 0.
# * Symbols start at column 13.
# * The description starts at column 21.
# * All lines of the description until the first blank line are
# combined into the heading.
# * A '.' character at the end of a heading line represents a hard
# line break.
# * The remaining text is in MarkDown format.
# * All addresses are 4 digits and have a leading '$'.
# The encoding is UTF-8.
$0000 D6510 Processor port data direction register
Bits:
* Bit #x: 0 = Bit #x in processor port can only be read; 1 = Bit #x in processor port can be read and written.
Default: $2F, %00101111.
$0001 R6510 Processor port
Bits:
* Bits #0-#2: Configuration for memory areas $A000-$BFFF, $D000-$DFFF and $E000-$FFFF. Values:
* %x00: RAM visible in all three areas.
* %x01: RAM visible at $A000-$BFFF and $E000-$FFFF.
* %x10: RAM visible at $A000-$BFFF; KERNAL ROM visible at $E000-$FFFF.
* %x11: BASIC ROM visible at $A000-$BFFF; KERNAL ROM visible at $E000-$FFFF.
* %0xx: Character ROM visible at $D000-$DFFF. (Except for the value %000, see above.)
* %1xx: I/O area visible at $D000-$DFFF. (Except for the value %100, see above.)
* Bit #3: Datasette output signal level.
* Bit #4: Datasette button status; 0 = One or more of PLAY, RECORD, F.FWD or REW pressed; 1 = No button is pressed.
* Bit #5: Datasette motor control; 0 = On; 1 = Off.
Default: $37, %00110111.
$0002 Unused
$0003-$0004 ADRAY1 Unused.
Default: $B1AA, execution address of routine converting floating point to integer.
$0005-$0006 ADRAY2 Unused.
Default: $B391, execution address of routine converting integer to floating point.
$0007 CHARAC Byte being searched for during various operations.
Current digit of number being input.
$0007 INTEGR Low byte of first integer operand during AND and OR.
Low byte of integer-format FAC during INT().
$0008 ENDCHR Byte being search for during various operations.
Current byte of BASIC line during tokenization.
High byte of first integer operand during AND and OR.
$0009 TRMPOS Current column number during SPC() and TAB().
$000A VERCK LOAD/VERIFY switch
Values:
* $00: LOAD.
* $01-$FF: VERIFY.
$000B COUNT Current token during tokenization.
Length of BASIC line during insertion of line.
AND/OR switch; $00 = AND; $FF = OR.
Number of dimensions during array operations.
$000C DIMFLG Switch for array operations
Values:
* $00: Operation was not called by DIM.
* $40-$7F: Operation was called by DIM.
$000D VALTYP Current expression type
Values:
* $00: Numerical.
* $FF: String.
$000E INTFLG Current numerical expression type
Bits:
* Bit #7: 0 = Floating point; 1 = Integer.
$000F GARBFL Garbage collection indicator during memory allocation for string variable; $00-$7F = There was no garbage collection yet; $80 = Garbage collection already took place.
$000F DORES Quotation mode switch during tokenization; Bit #6: 0 = Normal mode; 1 = Quotation mode.
Quotation mode switch during LIST; $01 = Normal mode; $FE = Quotation mode.
$0010 SUBFLG Switch during fetch of variable name
Values:
* $00: Integer variables are accepted.
* $01-$FF: Integer variables are not accepted.
$0011 INPFLG GET/INPUT/READ switch
Values:
* $00: INPUT.
* $40: GET.
* $98: READ.
$0012 TANSGN Sign during SIN() and TAN()
Values:
* $00: Positive.
* $FF: Negative.
$0013 CHANNL Current I/O device number.
Default: $00, keyboard for input and screen for output.
$0014-$0015 LINNUM Line number during GOSUB, GOTO and RUN.
Second line number during LIST.
$0014-$0015 POKER Memory address during PEEK, POKE, SYS and WAIT.
$0016 TEMPPT Pointer to next expression in string stack
Values: $19; $1C; $1F; $22.
Default: $19.
$0017-$0018 LASTPT Pointer to previous expression in string stack.
$0019-$0021 TEMPST String stack, temporary area for processing string expressions (9 bytes, 3 entries).
$0022-$0025 INDEX Temporary area for various operations (4 bytes).
$0026-$002A RES Auxiliary arithmetical register for division and multiplication (4 bytes).
$002B-$002C TXTTAB Pointer to beginning of BASIC area.
Default: $0801, 2049.
$002D-$002E VARTAB Pointer to beginning of variable area.
(End of program plus 1.)
$002F-$0030 ARYTAB Pointer to beginning of array variable area.
$0031-$0032 STREND Pointer to end of array variable area.
$0033-$0034 FRETOP Pointer to beginning of string variable area.
(Grows downwards from end of BASIC area.)
$0035-$0036 FRESPC Pointer to memory allocated for current string variable.
$0037-$0038 MEMSIZ Pointer to end of BASIC area.
Default: $A000, 40960.
$0039-$003A CURLIN Current BASIC line number
Values:
* $0000-$F9FF, 0-63999: Line number.
* $FF00-$FFFF: Direct mode, no BASIC program is being executed.
$003B-$003C OLDLIN Current BASIC line number for CONT.
$003D-$003E OLDTXT Pointer to next BASIC instruction for CONT
Values:
* $0000-$00FF: CONT'ing is not possible.
* $0100-$FFFF: Pointer to next BASIC instruction.
$003F-$0040 DATLIN BASIC line number of current DATA item for READ.
$0041-$0042 DATPTR Pointer to next DATA item for READ.
$0043-$0044 INPPTR Pointer to input result during GET, INPUT and READ.
$0045-$0046 VARNAM Name and type of current variable
Bits:
* $0045 bits #0-#6: First character of variable name.
* $0046 bits #0-#6: Second character of variable name; $00 = Variable name consists of only one character.
* $0045 bit #7 and $0046 bit #7:
* %00: Floating-point variable.
* %01: String variable.
* %10: FN function, created with DEF FN.
* %11: Integer variable.
$0047-$0048 VARPNT Pointer to value of current variable or FN function.
$0049-$004A FORPNT Pointer to value of current variable during LET.
$0049 ANDMSK Value of second parameter during WAIT.
Logical number during CLOSE and CLOSE
Device number of LOAD, SAVE and VERIFY.
$004A EORMSK Value of third parameter during WAIT.
Device number during OPEN.
$004B-$004C VARTXT Temporary area for saving original pointer to current BASIC instruction during GET, INPUT and READ.
$004D OPMASK Comparison operator indicator
Bits:
* Bit #1: 1 = ">" (greater than) is present in expression.
* Bit #2: 1 = "=" (equal to) is present in expression.
* Bit #3: 1 = "<" (less than) is present in expression.
$004E-$004F Pointer to current FN function.
$0050-$0052 DSCPNT Pointer to current string variable during memory allocation.
$0053 FOUR6 Step size of garbage collection
Values: $03; $07.
$0054-$0056 JMPER JMP ABS machine instruction, jump to current BASIC function.
$0055-$0056 Execution address of current BASIC function.
$0057-$005B TEMPF1 Arithmetic register #3 (5 bytes).
$005C-$0060 TEMPF2 Arithmetic register #4 (5 bytes).
$0061-$0066 FAC FAC, arithmetic register #1 (5 bytes).
$0066 FACSGN Sign of FAC
Bits:
* Bit #7: 0 = Positive; 1 = Negative.
$0067 SGNFLG Number of degrees during polynomial evaluation.
$0068 BITS Temporary area for various operations.
$0069-$006E ARG, arithmetic register #2 (5 bytes).
$006E ARGSGN Sign of ARG
Bits:
* Bit #7: 0 = Positive; 1 = Negative.
$006F-$0070 STRNG1 Pointer to first string expression during string comparison.
$0071-$0072 STRNG2 Temporary area for saving original pointer to current BASIC instruction during VAL().
$0071-$0072 POLYPT Pointer to current item of polynomial table during polynomial evaluation.
$0071-$0072 CURTOL Auxiliary pointer during array operations.
$0073-$008A CHRGET CHRGET. Machine code routine to read next byte from BASIC program or direct command (24 bytes).
$0079 CHRGOT CHRGOT. Read current byte from BASIC program or direct command.
007A-$007B Pointer to current byte in BASIC program or direct command.
$008B-$008F RNDX Previous result of RND().
$0090 STATUS Value of ST variable, device status for serial bus and datasette input/output
Serial bus bits:
* Bit #0: Transfer direction during which the timeout occured; 0 = Input; 1 = Output.
* Bit #1: 1 = Timeout occurred.
* Bit #4: 1 = VERIFY error occurred (only during VERIFY), the file read from the device did not match that in the memory.
* Bit #6: 1 = End of file has been reached.
* Bit #7: 1 = Device is not present.
Datasette bits:
* Bit #2: 1 = Block is too short (shorter than 192 bytes).
* Bit #3: 1 = Block is too long (longer than 192 bytes).
* Bit #4: 1 = Not all bytes read with error during pass 1 could be corrected during pass 2, or a VERIFY error occurred, the file read from the device did not match that in the memory.
* Bit #5: 1 = Checksum error occurred.
* Bit #6: 1 = End of file has been reached (only during reading data files).
$0091 STKEY Stop key indicator
Values:
* $7F: Stop key is pressed.
* $FF: Stop key is not pressed.
$0092 SVXT Unknown. (Timing constant during datasette input.)
$0093 VERCK LOAD/VERIFY switch
Values:
* $00: LOAD.
* $01-$FF: VERIFY.
$0094 C3P0 Serial bus output cache status
Bits:
* Bit #7: 1 = Output cache dirty, must transfer cache contents upon next output to serial bus.
$0095 BSOUR Serial bus output cache, previous byte to be sent to serial bus.
$0096 SYNO Unknown. (End of tape indicator during datasette input/output.)
$0097 XSAV Temporary area for saving original value of Y register during input from RS232.
Temporary area for saving original value of X register during input from datasette.
$0098 LDTND Number of files currently open
Values: $00-$0A, 0-10.
$0099 DFLTN Current input device number.
Default: $00, keyboard.
$009A DFLTO Current output device number.
Default: $03, screen.
$009B PRTY Unknown. (Parity bit during datasette input/output.)
$009C DPSW Unknown. (Byte ready indicator during datasette input/output.)
$009D MSGFLG System error display switch
Bits:
* Bit #6: 0 = Suppress I/O error messages; 1 = Display them.
* Bit #7: 0 = Suppress system messages; 1 = Display them.
$009E PTR1 Error counter during LOAD from datasette.
Values: $00-$3E, 0-62.
$009E T1 Block header type during datasette input/output.
Length of file name during datasette input/output.
Byte to be put into output buffer during RS232 and datasette output.
$009F PTR2 Error correction counter during LOAD from datasette.
Values: $00-$3E, 0-62.
$009F T2 Auxiliary counter for writing file name into datasette buffer.
Auxiliary counter for comparing requested file name with file name read from datasette during datasette input.
$00A0-$00A2 TIME Value of TI variable, time of day, increased by 1 every 1/60 second (on PAL machines)
Values: $000000-$4F19FF, 0-518399 (on PAL machines).
$00A3 R2D2 EOI switch during serial bus output
Bits:
* Bit #7: 0 = Send byte right after handshake; 1 = Do EOI delay first.
Bit counter during datasette output.
$00A4 FIRT Byte buffer during serial bus input.
Parity during datasette input/output.
$00A5 CNTDN Bit counter during serial bus input/output.
Counter for sync mark during datasette output.
$00A6 BUFPT Offset of current byte in datasette buffer.
$00A7 INBIT Bit buffer during RS232 input.
$00A8 BITCI Bit counter during RS232 input.
$00A9 RINONE Stop bit switch during RS232 input
Values:
* $00: Data bit.
* $01-$FF: Stop bit.
$00AA RIDATA Byte buffer during RS232 input.
$00AB RIPRTY Parity during RS232 input.
Computed block checksum during datasette input.
$00AC-$00AD Start address for SAVE to serial bus.
Pointer to current byte during SAVE to serial bus or datasette.
Pointer to line in screen memory to be scrolled during scrolling the screen.
$00AE-$00AF Load address read from input file and pointer to current byte during LOAD/VERIFY from serial bus.
End address after LOAD/VERIFY from serial bus or datasette.
End address for SAVE to serial bus or datasette.
Pointer to line in Color RAM to be scrolled during scrolling the screen.
$00B0-$00B1 Unknown.
$00B2-$00B3 TAPE1 Pointer to datasette buffer.
Default: $033C, 828.
$00B4 BITTS Bit counter and stop bit switch during RS232 output
Bits:
* Bits #0-#6: Bit count.
* Bit #7: 0 = Data bit; 1 = Stop bit.
Bit counter during datasette input/output.
$00B5 NXTBIT Bit buffer (in bit #2) during RS232 output.
$00B6 RODATA Byte buffer during RS232 output.
$00B7 FNLEN Length of file name or disk command; first parameter of LOAD, SAVE and VERIFY or fourth parameter of OPEN
Values:
* $00: No parameter.
* $01-$FF: Parameter length.
$00B8 LA Logical number of current file.
$00B9 SA Secondary address of current file.
$00BA FA Device number of current file.
$00BB-$00BC FNADR Pointer to current file name or disk command; first parameter of LOAD, SAVE and VERIFY or fourth parameter of OPEN.
$00BD ROPRTY Parity during RS232 output.
Byte buffer during datasette input/output.
$00BE FSBLK Block counter during datasette input/output.
$00BF MYCH Unknown.
$00C0 CAS1 Datasette motor switch
Values:
* $00: No button was pressed, motor has been switched off. If a button is pressed on the datasette, must switch motor on.
* $01-$FF: Motor is on.
$00C1-$00C2 STAL Start address during SAVE to serial bus, LOAD and VERIFY from datasette and SAVE to datasette.
Pointer to current byte during memory test.
$00C3-$00C4 MEMUSS Start address for a secondary address of 0 for LOAD and VERIFY from serial bus or datasette.
Pointer to ROM table of default vectors during initialization of I/O vectors.
$00C5 LSTX Matrix code of key previously pressed
Values:
* $00-$3F: Keyboard matrix code.
* $40: No key was pressed at the time of previous check.
$00C6 NDX Length of keyboard buffer
Values:
* $00, 0: Buffer is empty.
* $01-$0A, 1-10: Buffer length.
$00C7 RVS Reverse mode switch
Values:
* $00: Normal mode.
* $12: Reverse mode.
$00C8 INDX Length of line minus 1 during screen input. Values: $27, 39; $4F, 79.
$00C9 LSXP Cursor row during screen input. Values: $00-$18, 0-24.
$00CA Cursor column during screen input. Values: $00-$27, 0-39.
$00CB SFDX Matrix code of key currently being pressed
Values:
* $00-$3F: Keyboard matrix code.
* $40: No key is currently pressed.
$00CC BLNSW Cursor visibility switch
Values:
* $00: Cursor is on.
* $01-$FF: Cursor is off.
$00CD BLNCT Delay counter for changing cursor phase
Values:
* $00, 0: Must change cursor phase.
* $01-$14, 1-20: Delay.
$00CE GDBLN Screen code of character under cursor.
$00CF BLNON Cursor phase switch
Values:
* $00: Cursor off phase, original character visible.
* $01: Cursor on phase, reverse character visible.
$00D0 CRSW End of line switch during screen input
Values:
* $00: Return character reached, end of line.
* $01-$FF: Still reading characters from line.
$00D1-$00D2 PNT Pointer to current line in screen memory.
$00D3 PNTR Current cursor column. Values: $00-$27, 0-39.
$00D4 QTSW Quotation mode switch
Values:
* $00: Normal mode.
* $01: Quotation mode.
$00D5 LNMX Length of current screen line minus 1. Values: $27, 39; $4F, 79.
$00D6 TBLX Current cursor row. Values: $00-$18, 0-24.
$00D7 DATA PETSCII code of character during screen input/output.
Bit buffer during datasette input.
Block checksum during datasette output.
$00D8 INSRT Number of insertions
Values:
* $00: No insertions made, normal mode, control codes change screen layout or behavior.
* $01-$FF: Number of insertions, when inputting this many character next, those must be turned into control codes, similarly to quotation mode.
$00D9-$00F2 LDTB1 High byte of pointers to each line in screen memory (25 bytes)
Values:
* $00-$7F: Pointer high byte.
* $80-$FF: No pointer, line is an extension of previous line on screen.
$00F3-$00F4 USER Pointer to current line in Color RAM.
$00F5-$00F6 KEYTAB Pointer to current conversion table during conversion from keyboard matrix codes to PETSCII codes.
$00F7-$00F8 RIBUF Pointer to RS232 input buffer
Values:
* $0000-$00FF: No buffer defined, a new buffer must be allocated upon RS232 input.
* $0100-$FFFF: Buffer pointer.
$00F9-$00FA ROBUF Pointer to RS232 output buffer
Values:
* $0000-$00FF: No buffer defined, a new buffer must be allocated upon RS232 output.
* $0100-$FFFF: Buffer pointer.
$00FB-$00FE FREKZP Unused (4 bytes).
$00FF-$010A BASZPT Buffer for conversion from floating point to string (12 bytes.)
$0100-$01FF Processor stack. Also used for storing data related to FOR and GOSUB.
$0100-$013D BAD Pointers to bytes read with error during datasette input (62 bytes, 31 entries).
$0200-$0258 BUF Input buffer, storage area for data read from screen (89 bytes).
$0259-$0262 LAT Logical numbers assigned to files (10 bytes, 10 entries).
$0263-$026C FAT Device numbers assigned to files (10 bytes, 10 entries).
$026D-$0276 SAT Secondary addresses assigned to files (10 bytes, 10 entries).
$0277-$0280 KEYD Keyboard buffer (10 bytes, 10 entries).
$0281-$0282 MEMSTR Pointer to beginning of BASIC area after memory test.
Default: $0800, 2048.
$0283-$0284 MEMSIZ Pointer to end of BASIC area after memory test.
Default: $A000, 40960.
$0285 TIMOUT Unused. (Serial bus timeout.)
$0286 COLOR Current color, cursor color
Values: $00-$0F, 0-15.
$0287 GDCOL Color of character under cursor
Values: $00-$0F, 0-15.
$0288 HIBASE High byte of pointer to screen memory for screen input/output.
Default: $04, $0400, 1024.
$0289 XMAX Maximum length of keyboard buffer
Values:
* $00, 0: No buffer.
* $01-$0F, 1-15: Buffer size.
$028A RPTFLG Keyboard repeat switch
Bits:
* Bits #6-#7:
* %00 = Only cursor up/down, cursor left/right, Insert/Delete and Space repeat
* %01 = No key repeats
* %1x = All keys repeat.
$028B KOUNT Delay counter during repeat sequence, for delaying between successive repeats
Values:
* $00, 0: Must repeat key.
* $01-$04, 1-4: Delay repetition.
$028C DELAY Repeat sequence delay counter, for delaying before first repetition
Values:
* $00, 0: Must start repeat sequence.
* $01-$10, 1-16: Delay repeat sequence.
$028D SHFLAG Shift key indicator
Bits:
* Bit #0: 1 = One or more of left Shift, right Shift or Shift Lock is currently being pressed or locked.
* Bit #1: 1 = Commodore is currently being pressed.
* Bit #2: 1 = Control is currently being pressed.
$028E LSTSHF Previous value of shift key indicator
Bits:
* Bit #0: 1 = One or more of left Shift, right Shift or Shift Lock was pressed or locked at the time of previous check.
* Bit #1: 1 = Commodore was pressed at the time of previous check.
* Bit #2: 1 = Control was pressed at the time of previous check.
$028F-$0290 KEYLOG Execution address of routine that, based on the status of shift keys, sets the pointer at memory address $00F5-$00F6 to the appropriate conversion table for converting keyboard matrix codes to PETSCII codes.
Default: $EB48.
$0291 MODE Commodore-Shift switch
Bits:
* Bit #7: 0 = Commodore-Shift is disabled; 1 = Commodore-Shift is enabled, the key combination will toggle between the uppercase/graphics and lowercase/uppercase character set.
$0292 AUTODN Scroll direction switch during scrolling the screen
Values:
* $00: Insertion of line before current line, current line and all lines below it must be scrolled 1 line downwards.
* $01-$FF: Bottom of screen reached, complete screen must be scrolled 1 line upwards.
$0293 M51CTR RS232 control register
Bits:
* Bits #0-#3: Baud rate, transfer speed. Values:
* %0000: User specified.
* %0001: 50 bit/s.
* %0010: 75 bit/s.
* %0011: 110 bit/s.
* %0100: 150 bit/s.
* %0101: 300 bit/s.
* %0110: 600 bit/s.
* %0111: 1200 bit/s.
* %1000: 2400 bit/s.
* %1001: 1800 bit/s.
* %1010: 2400 bit/s.
* %1011: 3600 bit/s.
* %1100: 4800 bit/s.
* %1101: 7200 bit/s.
* %1110: 9600 bit/s.
* %1111: 19200 bit/s.
* Bits #5-#6: Byte size, number of data bits per byte; %00 = 8; %01 = 7, %10 = 6; %11 = 5.
* Bit #7: Number of stop bits; 0 = 1 stop bit; 1 = 2 stop bits.
$0294 M51CDR RS232 command register
Bits:
* Bit #0: Synchronization type; 0 = 3 lines; 1 = X lines.
* Bit #4: Transmission type; 0 = Duplex; 1 = Half duplex.
* Bits #5-#7: Parity mode. Values:
* %xx0: No parity check, bit #7 does not exist.
* %001: Odd parity.
* %011: Even parity.
* %101: No parity check, bit #7 is always 1.
* %111: No parity check, bit #7 is always 0.
$0295-$0296 M51AJB Default value of RS232 output timer, based on baud rate
(Must be filled with actual value before RS232 input/output if baud rate is "user specified" in RS232 control register, memory address $0293.)
$0297 RSSTAT Value of ST variable, device status for RS232 input/output
Bits:
* Bit #0: 1 = Parity error occurred.
* Bit #1: 1 = Frame error, a stop bit with the value of 0, occurred.
* Bit #2: 1 = Input buffer underflow occurred, too much data has arrived but it has not been read from the buffer in time.
* Bit #3: 1 = Input buffer is empty, nothing to read.
* Bit #4: 0 = Sender is Clear To Send; 1 = Sender is not ready to send data to receiver.
* Bit #6: 0 = Receiver reports Data Set Ready; 1 = Receiver is not ready to receive data.
* Bit #7: 1 = Carrier loss, a stop bit and a data byte both with the value of 0, detected.
$0298 BITNUM RS232 byte size, number of data bits per data byte, default value for bit counters.
$0299-$029A BAUDOF Default value of RS232 input timer, based on baud rate
(Calculated automatically from default value of RS232 output timer, at memory address $0295-$0296.)
$029B RIDBE Offset of byte received in RS232 input buffer.
$029C RIDBS Offset of current byte in RS232 input buffer.
$029D RODBS Offset of byte to send in RS232 output buffer.
$029E RODBE Offset of current byte in RS232 output buffer.
$029F-$02A0 IRQTMP Temporary area for saving pointer to original interrupt service routine during datasette input output
Values:
* $0000-$00FF: No datasette input/output took place yet or original pointer has been already restored.
* $0100-$FFFF: Original pointer, datasette input/output currently in progress.
$02A1 ENABL Temporary area for saving original value of CIA#2 interrupt control register, at memory address $DD0D, during RS232 input/output.
$02A2 CASTON Temporary area for saving original value of CIA#1 timer #1 control register, at memory address $DC0E, during datasette input/output.
$02A3-$02A4 Unknown.
$02A5 LINTMP Number of line currently being scrolled during scrolling the screen.
$02A6 PALNTS PAL/NTSC switch, for selecting RS232 baud rate from the proper table
Values:
* $00: NTSC.
* $01: PAL.
$02A7-$02FF Unused (89 bytes).
$0300-$0301 IERROR Execution address of warm reset, displaying optional BASIC error message and entering BASIC idle loop.
Default: $E38B.
$0302-$0303 IMAIN Execution address of BASIC idle loop.
Default: $A483.
$0304-$0305 ICRNCH Execution address of BASIC line tokenizater routine.
Default: $A57C.
$0306-$0307 IQPLOP Execution address of BASIC token decoder routine.
Default: $A71A.
$0308-$0309 IGONE Execution address of BASIC instruction executor routine.
Default: $A7E4.
$030A-$030B IEVAL Execution address of routine reading next item of BASIC expression.
Default: $AE86.
$030C SAREG Default value of register A for SYS.
Value of register A after SYS.
$030D SXREG Default value of register X for SYS.
Value of register X after SYS.
$030E SYREG Default value of register Y for SYS.
Value of register Y after SYS.
$030F SPREG Default value of status register for SYS.
Value of status register after SYS.
$0310-$0312 USRPOK JMP ABS machine instruction, jump to USR() function.
$0311-$0312 USRADD Execution address of USR() function.
$0313 Unused.
$0314-$0315 CINV Execution address of interrupt service routine.
Default: $EA31.
$0316-$0317 CBINV Execution address of BRK service routine.
Default: $FE66.
$0318-$0319 NMINV Execution address of non-maskable interrupt service routine.
Default: $FE47.
$031A-$031B IOPEN Execution address of OPEN, routine opening files.
Default: $F34A.
$031C-$031D ICLOSE Execution address of CLOSE, routine closing files.
Default: $F291.
$031E-$031F ICHKIN Execution address of CHKIN, routine defining file as default input.
Default: $F20E.
$0320-$0321 ICKOUT Execution address of CHKOUT, routine defining file as default output.
Default: $F250.
$0322-$0323 ICLRCH Execution address of CLRCHN, routine initializating input/output.
Default: $F333.
$0324-$0325 IBASIN Execution address of CHRIN, data input routine, except for keyboard and RS232 input.
Default: $F157.
$0326-$0327 IBSOUT Execution address of CHROUT, general purpose data output routine.
Default: $F1CA.
$0328-$0329 ISTOP Execution address of STOP, routine checking the status of Stop key indicator, at memory address $0091.
Default: $F6ED.
$032A-$032B IGETIN Execution address of GETIN, general purpose data input routine.
Default: $F13E.
$032C-$032D ICLALL Execution address of CLALL, routine initializing input/output and clearing all file assignment tables.
Default: $F32F.
$032E-$032F USRCMD Unused.
Default: $FE66.
$0330-$0331 ILOAD Execution address of LOAD, routine loading files.
Default: $F4A5.
$0332-$0333 ISAVE Execution address of SAVE, routine saving files.
Default: $F5ED.
$0334-$033B Unused (8 bytes).
$033C-$03FB TBUFFR Datasette buffer (192 bytes).
$03FC-$03FF Unused (4 bytes).