Racja, przecież nie da się ustawić RAMTOP-u wyżej, niż najwyższy wykryty adres. Zapomniałem.
Zobacz, jak wygląda procedura testująca w ROM:
11DA RAM-CHECK LD H,D Transfer the value in DE
LD L,E (START = +FFFF, NEW =
RAMTOP).
11DC RAM-FILL LD (HL),+02 Enter the value of +02 into
DEC HL every location above +3FFF.
CP H
JR NZ,11DC,RAM-FILL
11E2 RAM-READ AND A Prepare for true subtraction.
SBC HL,DE The carry flag will become
ADD HL,DE reset when the top is reached.
INC HL Update the pointer.
JR NC,11EF,RAM-DONE Jump when at top.
DEC (HL) +02 goes to +01.
JR Z,11EF,RAM-DONE But if zero then RAM is faulty.
Use current HL as top.
DEC (HL) +01 goes to +00.
JR Z,11E2,RAM-READ Step to the next test unless it
fails.
11EF RAM-DONE DEC HL HL points to the last actual
location in working order.
Jak masz GENS-a lub inny assembler, zasembluj to dodając wyświetlanie tego, co jest w HL (coś pamiętam, że przez PRINT USR można wyświetlić któreś ze zwracanych rejestrów - chyba BC? Wtedy trzeba by dodać przeładowanie HL do BC).