You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These locations are used as a pointer to the address of the current
12
+
byte to be written to tape or saved to disk, or the address
13
+
where the byte read from tape or from a disk boot sector is to
14
+
be stored. The Kernal has several routines to service this pointer,
15
+
including:
16
+
17
+
*[$ED51](E000#ED51) load this pointer with the operation starting address in [$C1-$C2](#C1)
18
+
*[$EEC1](E000#EEC1) increment the address here
19
+
*[$EEB7](E000#EEB7) compare the address here against the operation ending address at [$AE-$AF](#AE)
20
+
21
+
There is also a routine [$F7CC](E000#F7CC) to retrieve the character at
22
+
the pointer address from the bank specified in [$C6](#C6),
23
+
and one [$F7BC](E000#F7BC) to store the current accumulator contents at
24
+
the pointer address in the bank specified in [$C6](#C6).
25
+
26
+
<aname="AF"></a>
27
+
28
+
## 172-175 $AC-$AF
29
+
### Work area for disk booting
30
+
The Kernal BOOT_CALL routine [$F890](E000#F890) uses locations
31
+
$AC-$AD to hold the address at which the contents
32
+
of additional boot sectors are to be stored. Location $AE
33
+
holds the bank number for the additional data. Location $AF
34
+
holds the number of disk sectors to be loaded during the
35
+
boot process.
36
+
37
+
<aname="AE"></a><aname="AF"></a>
38
+
39
+
## 174-175 $AE-$AF EAL-E AH
40
+
### Kernal address pointer
41
+
This location is used during the routines which read from or
42
+
write to tape, or in saving to disk, to hold the ending address
43
+
for the operation. For loading from disk, this location is used
44
+
as a working pointer to the address where data is stored. After
45
+
all bytes have been loaded, the locations will hold the ending
46
+
address.
47
+
48
+
Actually, in all cases the pointer will hold the address
49
+
of the location immediately following the last one involved in the
50
+
operation. The Kernal SAVE routine [$F53E](E000#F53E)
51
+
initializes these locations with the contents of the X and Y registers
52
+
when the routine is called. The Kernal provides a routine
53
+
[$F7C9](E000#F7C9) to retrieve the character at the pointer address from
54
+
the bank specified in [$C6](#C6), and one [$F7BF](E000#F7BF) to store the
55
+
current accumulator contents at the pointer address in the
56
+
bank specified in [$C6](#C6).
57
+
58
+
<aname="FA"></a>
59
+
60
+
## 250 $FA Unused
61
+
This memory location is considered unused in that no Commodore 128 Kernal or BASIC routine deliberately changes it. However, due to a bug in the screen editor CINT [$C07B](C000#C07B) and SWAPPER [$CD2E](C000#CD2E) routines, it is overwritten whenever those routines run.
62
+
63
+
Since these routines are triggered during the RUN/STOP-RESTORE sequence, any value you store here will be lost whenever you press RUN/STOP-RESTORE or switch screens. For this reason, if you use this location in your programs, it should only serve as temporary working space, not for storing important data that you need to keep in the situations mentioned above.
64
+
65
+
<aname="FB"></a><aname="FE"></a>
66
+
67
+
## 251-254 $FB-$FE Unused
68
+
These memory locations are not used by any Commodore 128 ROM routines, making them available for your BASIC or machine language programs. They are not affected by the RUN/STOP-RESTORE key combination. However, keep in mind that all zero-page locations, including these, are cleared to zero during a reset—unless the RUN/STOP key is held down while resetting. For more information, refer to the reset routine at [$E000](E000#E000).
69
+
70
+
<aname="FF"></a>
71
+
72
+
## 255 $FF
73
+
This location is used as part of the assembly area for character
74
+
strings representing the digits of numeric values.
It's an entry point for the Kernal BOOT_CALL routine at $F890 which attempts to load and execute the boot sector from an auto-boot disk in the given drive and device. The BOOT protocol is as follows:
9
+
<aname="F890"></a>
10
+
11
+
## 63632 $F890 BOOT_CALL
12
+
13
+
<spanclass="badge badge-info">Has a jump table entry at [$FF53](#FF53)</span>
14
+
15
+
<aname="FF53"></a>
16
+
17
+
## 65363 $FF53 JBOOT_CALL
18
+
19
+
<spanclass="badge badge-info">Entry point for the BOOT_CALL routine, currently at [$F890](#F890)</span>
20
+
21
+
Routine needs parameter to be set:
22
+
23
+
* .X must hold device number
24
+
* .A must hold the character code corresponding to the desidered drive number (for ex. you should use $30 which corresponds to 0)
25
+
26
+
If the specified drive is not present or turned off, or the disk does not contain valid boot sectors, the routine will return carry bit set.
27
+
28
+
BOOT_CALL routine at [$F890](#F890) which attempts to load and execute the boot sector from an auto-boot disk in the given drive and device. The BOOT protocol is as follows:
11
29
12
30
* Close all open files on boot device.
13
31
* Read track 1 sector 0 into TBUFFR ($B00).
@@ -55,13 +73,13 @@ $0C -> $00 // no filename
55
73
$0D -> // code
56
74
$20, $7D, $FF, // JSR $FF7D (JPRIMM)
57
75
$0D, $53, $45, $4C, $45, // String start
58
-
$43, $54, $20, $4D, $4F,
59
-
$44, $45, $3A, $0D, $0D,
60
-
$20, $31, $2E, $20, $43,
61
-
$36, $34, $20, $20, $42,
62
-
$41, $53, $49, $43, $0D,
63
-
$20, $32, $2E, $20, $43,
64
-
$31, $32, $38, $20, $42,
76
+
$43, $54, $20, $4D, $4F,
77
+
$44, $45, $3A, $0D, $0D,
78
+
$20, $31, $2E, $20, $43,
79
+
$36, $34, $20, $20, $42,
80
+
$41, $53, $49, $43, $0D,
81
+
$20, $32, $2E, $20, $43,
82
+
$31, $32, $38, $20, $42,
65
83
$41, $53, $49, $43, $0D,
66
84
$20, $33, $2E, $20, $43,
67
85
$31, $32, $38, $20, $4D,
@@ -74,7 +92,7 @@ $0D -> // code
74
92
$EB, $4C, $00, $B0
75
93
</pre>
76
94
77
-
Starting from $0D, the first three bytes stands for
95
+
Starting from $0D, the first three bytes stands for
0 commit comments