http://www.worldofspectrum.org/ZXSpe.../sp128p09.html - использование из Бейсик-128
http://www.fruitcake.plus.com/Sincla...um128_ROM0.zip - дизасемблер ROM-0 (Бейсик-128) с комментариями (англ.)
В файле с исходным кодом ПЗУ-0 масса информации по теме. Словосочетание для поиска: RAM disk
Вот, например, оттуда:
Код:; ----------------- ; Logical RAM Banks ; ----------------- ; Throughout ROM 0, memory banks are accessed using a logical numbering scheme, which ; maps to physical RAM banks as follows: ; ; Logical Bank Physical Bank ; ------------ ------------- ; $00 $01 ; $01 $03 ; $02 $04 ; $03 $06 ; $04 $07 ; $05 $00 ; ; This scheme makes the RAM disk code simpler than having to deal directly with physical RAM bank numbers.Код:; ------------------ ; RAM Disk Catalogue ; ------------------ ; The catalogue can occupy addresses $C000-$EBFF in physical RAM bank 7, starting at $EBFF and growing downwards. ; ; Each entry contains 20 bytes: ; Bytes $00-$09: Filename. ; Bytes $0A-$0C: Start address of file in RAM disk area. ; Bytes $0D-$0F: Length of file in RAM disk area. ; Bytes $10-$12: End address of file in RAM disk area (used as current position indicator when loading/saving). ; Byte $13 : Flags: ; Bit 0 : 1=Entry requires updating. ; Bits 1-7: Not used (always hold 0). ; ; The catalogue can store up to 562 entries, and hence the RAM disk can never hold more than 562 files no matter ; how small the files themselves are. Note that filenames are case sensitive. ; ; The shadow screen (SCREEN 1) also resides in physical RAM bank 7 and so if more than 217 catalogue ; entries are created then SCREEN 1 will become corrupted [Credit: Toni Baker, ZX Computing Monthly]. ; However, since screen 1 cannot be used from BASIC, it may have been a design decision to allow the ; RAM disk to overwrite it. ; ; The actual files are stored in physical RAM banks 1, 3, 4 and 6 (logical banks 0, 1, 2, 3), ; starting from $C000 in physical RAM bank 1 and growing upwards. ; ; A file consists of a 9 byte header followed by the data for the file. The header bytes ; have the following meaning: ; Byte $00 : File type - $00=Program, $01=Numeric array, $02=Character array, $03=Code/Screen$. ; Bytes $01-$02: Length of program/code block/screen$/array ($1B00 for screen$). ; Bytes $03-$04: Start of code block/screen$ ($4000 for screen$). ; Bytes $05-$06: Offset to the variables (i.e. length of program) if a program. For an array, $05 holds the variable name. ; Bytes $07-$08: Auto-run line number for a program ($80 in high byte if no auto-run).




Ответить с цитированием