This commit is contained in:
Anatoliy Belyanskiy committed 2023-06-17 04:36:58 +10:00
1 parent 6e1d57accc
commit 51b40b7af5
29 files changed
+60405

No files matched your search

+618
View File
@@ -0,0 +1,618 @@
; ; .LION EQU 0
; ; .FLEX EQU 1
; ; .IBMK EQU 1
; ; .PROJ1 EQU 0
; ; .PROJ2 EQU 0
; ; .PROJ3 EQU 1
; ; .PROJ4 EQU 1
; ; .PAL EQU 1
; FastRAM_ON EQU #FB ; ‚ª«î祭¨¥ ªíè  IN A,(FastRAM_ON) - ¯à¨¡¨â® £¢®§¤ï¬¨ ¢ ª®­ä¥
; FastRAM_OFF EQU #7B ; Žâª«î祭¨¥ ªíè  IN A,(FastRAM_OFF) - ¯à¨¡¨â® £¢®§¤ï¬¨ ¢ ª®­ä¥
; FastRam_BANK0 EQU #5C ; �¥à¥ª«î祭¨¥ áâà ­¨æ ªíè  ¯à¨ FastRAM_ON ¢ ­ã«¥¢®¬ ®ª­¥ (bit0..1)
; ROM_BANK0 EQU #5C ; �¥à¥ª«î祭¨¥ áâà ­¨æ �‡“ ¯à¨ FastRAM_OFF ¢ ­ã«¥¢®¬ ®ª­¥ (bit0..3)
; ; ; bit4 - Write-Enable (0 - no Write; 1 - Write)
; ;ELCOM256 EQU 1 ; ०¨¬ ELCOM-256
; ;IF ELCOM256 = 1
; Spec_Page EQU #41 ; áâà ­¨æ  ¤«ï ¯¥à¥å¢ â  à¥á¥â  ¨ ¥éñ 祣®-â®
DCP_PAGE EQU #40 ; áâà ­¨æ  ¯®à⮢
; Port_All_Mode EQU #204E
; PORT_JOYSTICK EQU 0FFh
D_TBON EQU 3 ; ¤ ­­ë¥ ¤«ï ¢ª«î祭¨ï TURBO
D_TBOFF EQU 2 ; ¤ ­­ë¥ ¤«ï ¢ª«î祭¨ï TURBO
D_ROM16ON EQU 1
D_ROM16OFF EQU 0
CNF_0 EQU 04h
CNF_1 EQU 0Ch
CNF_2 EQU 14h
; CNF_3 EQU 1Ch
CNF_512 EQU 80h ; ¢ª«î祭¨¥ Pentagon 128
CBL_DIR EQU 78 ; ¯®àâ ã¯à ¢«¥­¨ï COVOX-Blaster
; ; bit 7 - 1 ¢ª«îç¨âì CBL
; COVOX_PORT EQU 79
; ;ELSE
; ;D_TBON EQU 03h ; ¤ ­­ë¥ ¤«ï ¢ª«î祭¨ï TURBO
; ;D_TBOFF EQU 02h ; ¤ ­­ë¥ ¤«ï ¢ª«î祭¨ï TURBO
; ;D_ROM16ON EQU 40h
; ;D_ROM16OFF EQU 00h
; ;CNF_0 EQU 04h
; ;CNF_1 EQU 0Ch
; ;CNF_2 EQU 14h
; ;CNF_3 EQU 1Ch
; ;ENDIF
; SPRINTER EQU 4 ; ‚…�‘ˆŸ !!!
; ISD_WARM EQU 3
; ISD_COLD EQU 0
; IS_KEY EQU 40h ; „€��›… „‹Ÿ ‚›‚Ž„€ ‚ �Ž�’ ��ˆ ‚Š‹ž—…�ˆˆ IS-DOS
; IS_RAM_ADR EQU 5BC0h ; €„�…‘ ‡€ƒ�“‡Šˆ ��Žƒ�€ŒŒ› �…�…•Ž„€ ‚ IS-DOS
; TB_WAITES EQU 00H ; WAITë ¤«ï TURBO-MODE
; NTB_WAITES EQU 00H ; WAITë ¤«ï neTURBO-MODE
; IS_WAITES EQU 00H ; WAITë ¤«ï IS-DOS
; ;****************************************
; ;SYS_PORT_ON EQU 07DH
; ;SYS_PORT_OFF EQU 03DH
;SYS_PORT_ON EQU CNF_PORT ;07CH
SYS_PORT_ON EQU #7C
SYS_PORT_OFF EQU #3C
; Port_VSYNC EQU #BD ; #61 - 320Lines/49Hz, #41 - 312Lines/50Hz
; .SET_320L EQU #41
; .SET_312L EQU #61
; PAL_V_PAGE EQU 09EH
; PAL_SCP EQU 01EH
; ;CNF_PAGE EQU 040H
SYS_PAGE EQU 0FEH
; MODE_PAGE EQU 0FCH
; ;SCR_PAGE EQU 0FDH
; ;PAL_PAGE EQU 0FDH
; KBD_COM EQU 1Bh
; KBD_DAT EQU 1Ah
COM_B EQU 1Bh
; DAT_B EQU 1Ah
COM_A EQU 19h
; DAT_A EQU 18h
LPT1_D EQU 1CH
LPT1_C EQU 1DH
LPT2_D EQU 1EH
LPT2_C EQU 1FH
STC0_C EQU 10H
; STC1_C EQU 11H
; STC2_C EQU 12H
; STC3_C EQU 13H
; RAMD_LET EQU ('R'-'A')
; P_KBD_OUT EQU 0F8H
; P_KBD_IN EQU 0FEH
; RESET_PAGE EQU #A0
; ;----------[CMOS Registers]-------------
; CMOSREGS.ScreenSET EQU #1A
; ; %0000 1111 - COLOR STYLE For Setup
; ; %0011 0000 - Frame Int (Default/Pentagon/Scorpion/Original)
; ; %1100 0000 - Screen V-Sinc (Default/312 lines 50 HZ/320 Lines 49 Hz)
; SCREEN_HZ EQU #C0
; SCREEN_INT EQU #30
; ;---------------------------------------
; ;***************************************
; ;HD_HEADS EQU 5
; HD_CS EQU 0A0H
; ;HD_S_P_T EQU 17
; ;HD_S_X_H EQU (HD_S_P_T * HD_HEADS) ; ??? ç¨á«® ᥪâ®à®¥ ­  樫¨­¤à¥
P_DATS EQU 050H ; READ/WRITE INIR/OTIR
P_ERR EQU 051H ; READ
; P_PREC EQU 151H ; WRITE
P_S_CNT EQU 152H ;
P_S_NUM EQU 153H
P_C_LOW EQU 154H
P_C_HIG EQU 155H ;<-\
P_HD_CS EQU 4152H ;<-/
P_HDST EQU 4053H ; READ
P_CMD EQU 4153H ; WRITE
; P_HD3F6 EQU 4154H ; WRITE 3F6
; P_HD3F7 EQU 4055H ; READ 3F7
; ;***************************************
CMOS_DRD equ 0FFBDh
CMOS_DWR equ 0BFBDh
CMOS_AWR equ 0DFBDh
ISA_PORT equ 09FBDh
; ;***************************************
SEC_SIZE EQU 11
CLAST_SIZE EQU 13
RESERV_SECS EQU 14
FATS_NUM EQU 16
FLS_NUM EQU 17
; S_P_D EQU 19
FORM_CODE EQU 21
S_P_F EQU 22
S_P_T EQU 24
H_P_S EQU 26
SPECIAL_SECS EQU 28
FAT_ID EQU 36H
; ;***************************************
; SYSTEM_ID EQU 0C020H
SYS_SP EQU 0C0FEH ; „Ž�Ž‹�ˆ’…‹œ�›‰ ‘’…Š
DISK_TYPE EQU 0C100H ; ¯¥à¥ ¤à¥á æ¨ï ¤¨áª®¢
COPY_PAGE0 EQU 0C104H ; ª®¯¨¨ §­ ç¥­¨© ¯®à⮢ áâà ­¨æ
COPY_PAGE1 EQU 0C105H
COPY_PAGE2 EQU 0C106H
COPY_PAGE3 EQU 0C107H
; RAMD_VARS EQU 0C108H ; ¯¥à¥¬¥­­ë¥ RAM-¤¨áª®¢
; A_RAMD_VARS EQU 0C118H ; ⥪ã騩 RAM-Disk
SP_SAVE EQU 0C11AH ; ¬¥áâ® ¤«ï á®åà ­¥­¨ï  ¤à¥á  á⥪ 
; ERR_SAVE EQU 0C11CH
COPY_RGADR EQU 0C11DH
; RAM_MSD EQU 0C11EH ; áâà ­¨æ  ¤«ï à ¡®âë ¢ MS-DOS
MSD_SECS EQU 0C11FH ; —¨á«® ᥪâ®à®¢ ¢ MS-DOS
; MSD_NAME EQU 0C120H ; €¤à¥á ¨¬¥­¨ ­ ©¤¥­­®£® ä ©« 
; MSD_FAT_SEC EQU 0C122H ; ­ ç «ì­ë© ᥪâ®à FAT
; INT_ADRESS EQU #C124 ;  ¤à¥á ®¡à ¡®â稪  ¯à¥à뢠­¨ï
; INT_PAGE EQU #C126 ; áâà ­¨æ  á ®¡à ¡®â稪®¬ ¯à¥à뢠­¨ï
; INT_ID EQU #C127 ; ¥á«¨ = #AA - §­ ç¨âì ®¡à ¡®â稪 ãáâ ­®¢«¥­
DS_1440 EQU 0C128H ; ä« £¨ ¯¥à¥ª«î祭¨ï 720/1440
F_P_S EQU 0C129H ; ç¨á«® ä ©«®¢ëå § ¯¨á¥© ¢ ᥪâ®à¥
S_P_C EQU 0C12AH ; ç¨á«® ᥪâ®à®¢ ª â «®£ 
COUNT_FL EQU 0C12BH ; áç¥â稪 ä ©«®¢ ¢ ᥪâ®à¥
COUNT_SEC EQU 0C12CH ; áç¥â稪 ᥪâ®à®¢ ¢ ª â «®£¥
; C_P_B EQU 0C12DH ; ç¨á«® ª« áâ¥à®¢ ­  ¡«®ª އ“
; ;CLASTER_LEN EQU 0C12EH ; ¤«¨­  ª« áâ¥à  ¢ ¡ ©â å
FAT_FLAG EQU 0C130H ; FAT ä« £ + FAT sector
MSD_CONT_SEC EQU 0C132H ; ⥪ã騩 ᥪâ®à ¤«ï MS-DOS
MSD_CONT_SEC2 EQU 0C134H
S_X_H EQU 0C136H ; ª®«¨ç¥á⢮ ᥪâ®à®¢ ­  樫¨­¤à¥
CONFIG_ALL EQU 0C138H ; ®¯¨á â¥«ì ª®­ä¨£ãà æ¨¨ 2 ¡ ©â 
CONFIG_DE EQU 0C13AH ; ®¯¨á â¥«ì ª®­ä¨£ãà æ¨¨ 2 ¡ ©â 
CONFIG_BYTE EQU 0C13EH ; ¡ ©â ª®­ä¨£ãà æ¨¨
WIN_MAP_SC EQU 0C140H
; WIN_TAB_SC EQU 0C142H
; WIN_SAV_HL EQU 0C144H
; WIN_SAV_DE EQU 0C146H
; WIN_SAV_BC EQU 0C148H
WIN_ZG EQU 0C14AH
; WIN_PLACE_WIN EQU 0C14CH
; WIN_GR_MAP EQU 0C14EH
SYS_WORK1 EQU 0C150H
; SYS_WORK2 EQU 0C152H
; SYS_WORK3 EQU 0C154H
; SYS_WORK4 EQU 0C156H
; WIN_MAP_LAB1 EQU 0C158H
WIN_MODE_SH EQU 0C15CH
WIN_MODE_SC EQU 0C15EH
MSD_FAT_SEC EQU 0C160H ; ­ ç «ì­ë© ᥪâ®à FAT
MSD_FAT_SEC2 EQU 0C162H ; ­ ç «ì­ë© ᥪâ®à FAT
MSD_CAT_SEC EQU 0C164H ; ­ ç «ì­ë© ᥪâ®à CAT
MSD_CAT_SEC2 EQU 0C166H ; ­ ç «ì­ë© ᥪâ®à CAT
MSD_DAT_SEC EQU 0C168H ; ­ ç «ì­ë© ᥪâ®à DAT
MSD_DAT_SEC2 EQU 0C16AH ; ­ ç «ì­ë© ᥪâ®à DAT
CLASTER_LEN EQU 0C16CH ; ¤«¨­  ª« áâ¥à  ¢ ¡ ©â å
CLASTER_LEN2 EQU 0C16EH ; ¤«¨­  ª« áâ¥à  ¢ ¡ ©â å
; ;---------------------------------------------
; ; vsync:
; ; bit0 1 - 320L, 0 - 312L
; ; bit1 1 - no waits, 0 - original waits
; VSyncAndWaits EQU #C170
; ;---------------------------------------------
; ;CMOS_FLAG_1 EQU 0C170H
; GR_BIT_END EQU 7
; S_BIT_END EQU 7
; S_BIT_LIN EQU 6
; S_BIT_MOD EQU 5
; BIT_1440 EQU 1
BIT_MASK_1440 EQU 00000010B
RAMD_KEYS EQU 0C180H ; ª«îç¨ RAM-Disks
RAMD_KEY_NUM EQU 16
; LIB_TABLE EQU 0C1A0H ; â ¡«¨æë librares 32 ¡ ©â 
; ; +0 ¡¨¡«¨®â¥ª  DOS
; ;
; HDD_INI_TABLE EQU 0C1C0H ; â ¡«¨æë ¤«ï ide ãáâனá⢠32 ¡ ©â 
; ; 0 - ª®¯¨ï DRV_HEAD
; ; 1 - ᥪâ®à®¢ ­  ¤®à®¦ª¥
; ; 2 - ç¨á«® £®«®¢®ª
; ; 3 - ª®«¨ç¥á⢮ 樫¨­¤à®¢ ¬«.
; ; 4 - ª®«¨ç¥á⢮ 樫¨­¤à®¢ áâ à訩.
; ; 5 - ᥪâ®à®¢ ­  樫¨­¤à ¬«.
; ; 6 - ᥪâ®à®¢ ­  樫¨­¤à áâ àè.
; ; 7 - reserv - type
; ;
; FDD_INI_TABLE EQU 0C1E0H ; â ¡«¨æë ¤«ï FDD ãáâனá⢠32 ¡ ©â 
RAMD_FAT EQU 0C200H ; à á¯®«®¦¥­¨¥ ¡«®ª®¢ RAM-Disk-®¢
MS_BPB EQU 0C400H ; ¡ãä¥à BPB
MS_DIR EQU 0C800H ; ¡ãä¥à DIR sector
MS_FAT EQU 0CC00H ; ¡ãä¥à FAT sector
; MS_BUF EQU 0D000H ; ¡ãä¥à DAT sector
HD_IDF_ADR EQU #C600
; .heads EQU HD_IDF_ADR+6
; .sectors EQU HD_IDF_ADR+12
; .sec_cyl EQU HD_IDF_ADR+4
WIN_MAP_IX EQU 0E000H ; ¤ ­­ë¥ ª àâ ®ª®­
TASK_DATA EQU 0EC00H ; ¤ ­­ë¥ ¤«ï § ¤ ç
; ; ***** - Žª®­­ë¥ ¯¥à¥¬¥­­ë¥ - *****
WIN_SIZE_H EQU 0 ; £®à¨§®­â «ì­ë© à §¬¥à ¢ §­ ª®¬¥áâ å
WIN_SIZE_V EQU 1 ; ¢¥à⨪ «ì­ë© à §¬¥à ¢ §­ ª®¬¥áâ å
WIN_PLACE_H EQU 2 ; ¯®«®¦¥­¨¥ ¯® £®à¨§®­à «¨, ¢ §­ ª®¬¥áâ å
WIN_PLACE_V EQU 3 ; ¯®«®¦¥­¨¥ ¯® ¢¥à⨪ «¨ ¢ §­ ª®¬¥áâ å
WIN_MODE EQU 4 ; ०¨¬ §­ ª®¬¥áâ 
WIN_MODE_S EQU 5 ; ¤®¯®«­¨â¥«ì­ë© ०¨¬
; ; ¡¨â 0 - Sp-SCR,
WIN_GR_X EQU 6 ; ¯®«®¦¥­¨¥ ¯® X ¢ ¯®«¥ £à ä¨ª¨ (¯® §­ ª®¬¥áâ)
WIN_GR_Y EQU 7 ; ¯®«®¦¥­¨¥ ¯® Y ¢ ¯®«¥ £à ä¨ª¨ (¯® §­ ª®¬¥áâ)
WIN_HL EQU 8 ; á®åà ­¥­¨¥ HL
WIN_BC EQU 10 ; á®åà ­¥­¨¥ BC
WIN_DE EQU 12 ; á®åà ­¥­¨¥ DE
WIN_V_BEG EQU 14 ; ­ ç «® ®ª­  ¯® ¢¥à⨪ «¨
WIN_V_END EQU 15 ; ª®­¥æ ®ª­  ¯® ¢¥à⨪ «¨
WIN_H_BEG EQU 16 ; ­ ç «® ®ª­  ¯® £®à¨§®­â «¨
WIN_H_END EQU 17 ; ª®­¥æ ®ª­  ¯® £®à¨§®­â «¨
WIN_SIZE_REL EQU 18 ; ॠ«ì­ë© à §¬¥à ¢ ᨬ¢®« å
WIN_MODE_E EQU 19 ; ¤®¯®«­¨â¥«ì­ë© ०¨¬ íªà ­ 
WIN_WORK_1 EQU 20 ; à ¡®ç ï ¯¥à¥¬¥­­ ï 1
WIN_WORK_2 EQU 21 ; à ¡®ç ï ¯¥à¥¬¥­­ ï 2
WIN_GRAF_X EQU 24 ; ­ ç «ì­ ï ª®®à¤¨­ â  ¯® X
WIN_GRAF_Y EQU 26 ; ­ ç «ì­ ï ª®®à¤¨­ â  ¯® Y
; USER_VARS EQU 0F000h ; ¯¥à¥¬¥­­ë¥ ¯®«ì§®¢ â¥«¥©
; ;SW_ROM EQU 3CF9H
; ; IF .PROJ4
; ;RGADR EQU 0D0H
; ;RGSCR EQU 0D1H
; ;RGMOD EQU 0D2H
; ;RGACC EQU 0D3H
; ;PGACC EQU 0FCH
; ;PAGE0 EQU 0C0H
; ;PAGE1 EQU 0C5H
; ;PAGE2 EQU 0C2H
; ;PAGE3 EQU 0C0H
; ; ELSE
; ; ENDIF
PAGE0 EQU 082H
PAGE1 EQU 0A2H
PAGE2 EQU 0C2H
PAGE3 EQU 0E2H
; ;RGADR EQU 089H
; ;RGSCR EQU 0A9H
; ;RGMOD EQU 099H
; ;RGACC EQU 0B9H
RGADR EQU #89
; PORT_Y EQU #89
; ;RGSCR EQU 0E9H
RGMOD EQU 0C9H
; ;RGACC EQU 0A9H
; ;PGACC EQU 0FCH
CNF_PORT EQU 74h
ALTERA EQU 1400H
WG_COM EQU 00FH
WG_TRK EQU 03FH
WG_SEC EQU 05FH
WG_DATA EQU 07FH
P_DOS_FF EQU 0FFH
; BUFER_RD EQU 5D25H
PR_BUFER EQU 05B00H
AUTO_5B08 EQU 05B08H
AUTO_5B5C EQU 05B5CH
; COPY_P128 EQU 05B5CH
AUTO_5BFF EQU 05BFFH
K_STATE EQU 05C00H
KEY_TIME EQU 05C09H
REP_K_TYME EQU 05C10H
ZG EQU 05C36H
ERR_BEEP EQU 05C38H
; KEY_BEEP EQU 05C39H
ERR_NR EQU 05C3AH
FLAGS EQU 05C3BH
TV_FLAG EQU 05C3CH
ERR_SP EQU 05C3DH
; LIST_SP EQU 05C3FH
; MODE EQU 05C41H
NEW_PPC EQU 05C42H
NEW_S_PPC EQU 05C44H
PPC EQU 05C45H
; SUB_PPC EQU 05C47H
BORDER EQU 05C48H
; EDIT_PPC EQU 05C49H
BAS_VARS EQU 05C4BH
; WORK_VAR EQU 05C4DH
CHANS EQU 05C4FH
CUR_CHL EQU 05C51H
BAS_PROG EQU 05C53H
; NEXT_LINE EQU 05C55H
DATA_ADR EQU 05C57H
E_LINE EQU 05C59H
K_CUR EQU 05C5BH
CH_ADR EQU 05C5DH
; SINT_ER_AD EQU 05C5FH
WORK_SP EQU 05C61H
STK_BOT EQU 05C63H
STK_END EQU 05C65H
; B_REG EQU 05C67H
; MEM_CALC EQU 05C68H
; FLAGS_2 EQU 05C6AH
L_SCR_SIZE EQU 05C6BH
; AUTO_LST_L EQU 05C6CH
; OLD_PPC EQU 05C6EH
; OLD_S_PPC EQU 05C70H
; FLG_INPUT EQU 05C71H
; S_VAR_LEN EQU 05C72H
; SINT_TB_ADR EQU 05C74H
; RAND_SEED EQU 05C76H
; FRAMES EQU 05C78H
UDG EQU 05C7BH
; X_Y_COORD EQU 05C7DH
; PRN_POS EQU 05C7FH
; ADR_PR_BUF EQU 05C80H
; ECHO_E EQU 05C82H
; SCR_PL_M EQU 05C84H
SCR_PL_L EQU 05C86H
; SCR_POS_M EQU 05C88H
SCR_POS_L EQU 05C8AH
; SCROLL_ST EQU 05C8CH
ATTR_P EQU 05C8DH
; MASK_P EQU 05C8EH
ATTR_T EQU 05C8FH
; MASK_E EQU 05C90H
; FLAGS_ATR EQU 05C91H
MEM_BOT EQU 05C92H
AUTO_5C9A EQU 05C9AH
; NMI_ADR EQU 05CB0H
TOP_CLEAR EQU 05CB2H
P_RAMTOP EQU 05CB4H
BEG_ADRESS EQU 05CB6H
RET_INS EQU 05CC2H
AUTO_5CC3 EQU 05CC3H
DISK_A EQU 05CC8H
DISK_B EQU 05CC9H
DISK_C EQU 05CCAH
DISK_D EQU 05CCBH
CAT_SEC EQU 05CCCH
DRV_READY EQU 05CCDH
RD_WR_COM EQU 05CCEH
VAR_1 EQU 05CCFH
AUTO_5CD1 EQU 05CD1H
AUTO_5CD2 EQU 05CD2H
AUTO_5CD3 EQU 05CD3H
AUTO_5CD5 EQU 05CD5H
DOS_ERROR EQU 05CD6H
MED_START EQU 05CD7H
DOS_CH_ADR EQU 05CD9H
MED_LEN EQU 05CDBH
FL_NAME EQU 05CDDH
FL_N_2 EQU 05CDFH
FL_N_4 EQU 05CE1H
FL_N_6 EQU 05CE3H
FL_N_7 EQU 05CE4H
FL_TYPE EQU 05CE5H
FL_START EQU 05CE6H
FL_LEN EQU 05CE8H
START_CLASTER EQU FL_LEN
FL_SIZE EQU 05CEAH
FL_PLACE EQU 05CEBH
VAR_2 EQU 05CEDH
INTERF_I EQU 05CEFH
VAR_2_0 EQU 05CF1H
VAR_2_1 EQU 05CF2H
CONT_SEC EQU 05CF4H
CONT_TRK EQU 05CF5H
OPER_DISK EQU 05CF6H
DOS_FLAG EQU 05CF7H
DISK_1_FLG EQU 05CF8H
DISK_2_FLG EQU 05CF9H
TIME_A EQU 05CFAH
TIME_B EQU 05CFBH
TIME_C EQU 05CFCH
TIME_D EQU 05CFDH
COMAND_WG EQU 05CFEH
SEC_NUM EQU 05CFFH
CONT_BUF_ADR EQU 05D00H
WORK_2 EQU 05D02H
WORK_4 EQU 05D04H
S_NAME_NUM EQU 05D06H
N_DEL_FLS EQU 05D07H
FST_SYM_NAME EQU 05D08H
VAR_3 EQU 05D09H
BUF_FLAG EQU 05D0CH
BAS_DOS_FLG EQU 05D0EH
DOS_ERR_2 EQU 05D0FH
ERR_3D00 EQU 05D10H
ADR_DOS_COM EQU 05D11H
ERR_SP_COPY EQU 05D13H
MSG_FLAG EQU 05D15H
PDOS_COPY EQU 05D16H
FLAG_BOOT EQU 05D17H
INT_1_VAR EQU 05D18H
CONT_DISK EQU 05D19H
ADR_RET EQU 05D1AH
DOS_SP EQU 05D1CH
FL_NUMBER EQU 05D1EH
COM_LN_COPY EQU 05D20H
L_5D23 EQU 05D23H
BUFER EQU 05D25H
AUTO_5D33 EQU 05D33H
CLEAR_SEC EQU 05E06H
CLEAR_TRK EQU 05E07H
TYPE_DISK EQU 05E08H
N_FILES EQU 05E09H
FREE_SEC EQU 05E0AH
CODE_10H EQU 05E0CH
DISK_MRK_1 EQU 05E0FH
DISK_ALT_NM EQU 05E10H
N_DEL_FL EQU 05E19H
DISK_NAME EQU 05E1AH
; ;RET_PAGE0 MACRO
; ; LD A,0
; ; OUT (PAGE0),A
; ; ENDM
; ;RET_PAGE1 MACRO
; ; LD A,5
; ; OUT (PAGE1),A
; ; ENDM
; ;RET_PAGE2 MACRO
; ; LD A,2
; ; OUT (PAGE2),A
; ; ENDM
; ;RET_PAGE3 MACRO
; ; LD A,0
; ; OUT (PAGE3),A
; ; ENDM
; MACRO DSS adr,dt
; BLOCK adr-$,dt
; ENDM
MACRO CALL_48 adr
PUSH HL
LD HL,.ADR_R
PUSH HL
LD HL,SW_ROM
PUSH HL
LD HL,adr
JP JP_HL_48
.ADR_R:
POP HL
ENDM
MACRO CALL_48X adr
PUSH HL
LD HL,.ADR_R
EX (SP),HL
PUSH HL
LD HL,SW_ROM
EX (SP),HL
PUSH HL
LD HL,adr
EX (SP),HL
JP SW_ROM
.ADR_R:
ENDM
; MACRO RAMD_KEY
; SUB 4
; DI
; LD B,SYS_PAGE
; LD C,PAGE3
; OUT (C),B
; LD HL,RAMD_KEYS
; ADD A,L
; LD L,A
; DEC L
; LD (A_RAMD_VARS),HL
; INC L
; LD L,(HL)
; RET_PAGE3
; EI
; LD A,L
; ENDM
; ; �®pâë Sprinter. (¡ ©âë PORT_X)<<
; ; 0 - port FF<<
; ; 1 - port keyboard<<
; ; 2 - port BORDER<<
; ; 3 - port 1FFDh<<
; ; 4 - port 7FFDh<<
; ; 5 - port 3FFDh<<
; ; 6 - port Start-ROM<<
; ; 7 - port Start-ROM-ALT<<
; ; 8 - port ROM-BASIC48<<
; ; 9 - port ROM-BASIC128<<
; ; 10 - port ROM-TR-DOS<<
; ; 11 - port ROM-EXPANSION<<
; ; 12 - port ROM-BASIC48-ALT<<
; ; 13 - port ROM-BASIC128-ALT<<
; ; 14 - port ROM-TR-DOS-ALT<<
; ; 15 - port ROM-EXPANSION-ALT<<
; ; 16 Ä¿<<
; ; .. Ä´<<
; ; 31 ÄÁÄports RAM-PAGES - ¯®pâë 㪠§ë¢ î騥, ª ª ï áâp ­¨æ  އ“<<
; ;¯®¤ª«î祭  ¢ ª ç¥á⢥ áâp ­¨æë 0..F ¢ ª®­ä¨£ãp æ¨¨ Scorpion.<<
; ; 33 - port RAM-0 áâp ­¨æ  އ“ ¯®¤ª«îç ¥¬ ï ¢ ­ã«¥¢®¥ ®ª­® ¯p®æ¥áá®p <<
; ; 34 - port RAM-5 áâp ­¨æ  އ“ ¯®¤ª«îç ¥¬ ï ¢ ¯¥p¢®¥ ®ª­® ¯p®æ¥áá®p <<
; ; 35 - port RAM-2 áâp ­¨æ  އ“ ¯®¤ª«îç ¥¬ ï ¢® ¢â®p®¥ ®ª­® ¯p®æ¥áá®p <<
; ; 36 - port CONFIG<<
; ; 37 - port COVOX-1<<
; ; 38 - port COVOX-2<<
; ; 39 - port AY-3-8910-adr<<
; ; 40 - port AY-3-8910-dat<<
; ; 41 - port KEMPSTON<<
; ; 42 - port ISA-interface<<
; ; 43 Ŀreserv<<
; ; .. Ä´<<
; ; 47 ÄÙ<<
; ; 48 - 51 ¯®pâë ‚ƒ93<<
; ; 52 - ¯®pâ DOS-1<<
; ; 53 - ¯®pâ DOS-2<<
; ; 54 Ä¿ á«ã¦¥¡­ë¥ ¯®pâë<<
; ; .. Ä´<<
; ; 63 ÄÙ<<
; ; 64 Ä¿ ¯®pâë IDE interface<<
; ; .. Ä´<<
; ; 79 ÄÙ<<
; ; 80..127 - p¥§¥p¢.<<
; ; 128..143 - ¯®pâë ¨¤¥­â¨ä¨ª â®p  ¬ è¨­ë ( ⮫쪮 ¤«ï ç⥭¨ï.)<<
; ; 144..254 - p¥§¥p¢<<
; ; 255 - ­ã«ì-¯®pâ - ®âª«î祭­®¥ á®áâ®ï­¨¥.<<
; ;
+203
View File
@@ -0,0 +1,203 @@
; ZX Spectrum char codes
; By Marcos Cruz (programandala.net)
; ---------------------------------------------------------------------
; Characters (new format)
ZX_Char:
; Not used equ 0x00
; Not used equ 0x01
; Not used equ 0x02
; Not used equ 0x03
; Not used equ 0x04
; Not used equ 0x05
.caps equ 0x06 ; toggle caps lock
.print_comma equ 0x06 ; (when printed)
.edit equ 0x07 ; edit
.esc equ 0x07 ; escape
.cursor_left equ 0x08
.backspace equ 0x08
.right equ 0x09 ; cursor right
.cursor_down equ 0x0A
.cursor_up equ 0x0B
.delete_left equ 0x0C ; delete (backspace)
.form_feed equ 0x0C ; used for printing
.carriage_return equ 0x0D ; enter key
.extended_mode equ 0x0E ;
.number equ 0x0E ;
.graphics equ 0x0F ; toggle graphics mode
.ink equ 0x10
.paper equ 0x11
.flash equ 0x12
.bright equ 0x13
.inverse equ 0x14
.over equ 0x15
.at equ 0x16
.tab equ 0x17 ; tab (screen only)
; Not used equ 0x18
; Not used equ 0x19
; Not used equ 0x1A
; Not used equ 0x1B
; Not used equ 0x1C
; Not used equ 0x1D
; Not used equ 0x1E
; Not used equ 0x1F
.space equ 0x20
; Standart symbols
; #21 ! #22 " #23 # #24 $ #25 % #26 & #27 , #28 (
; #29 ) #2A * #2B + #2C , #2D - #2F . #2F / #30 0
; #31 1 #32 2 #33 3 #34 4 #35 5 #36 6 #37 7 #38 8
; #39 9 #3A : #3B ; #3C < #3D = #3E > #3F ? #40 @
; #41 A #42 B #43 C #44 D #45 E #46 F #47 G #48 H
; #49 I #4A J #4B K #4C L #4D M #4E N #4F O #50 P
; #51 Q #52 R #53 S #54 T #55 U #56 V #57 W #58 X
; #59 Y #5A Z #5B [ #5C / #5D ] #5E ^ #5F _ #60 ?
; #61 a #62 b #63 c #64 d #65 e #66 f #67 g #68 h
; #69 i #6A j #6B k #6C l #6D m #6E n #6F o #70 p
; #71 q #72 r #73 s #74 t #75 u #76 v #77 w #78 x
; #79 y #7A z #7B { #7C | #7D } #7E ~
.copyright equ 0x7F ; copyright sign
; ---------------------------------------------------------------------
; User Defined Graphics
; 0 1 2 3 4 5 6 7
;| | | #| |# | |# #| | | | #| |# | |# #|
;| | | | | | | | | #| | #| | #| | #|
; 8 9 A B C D E F
;| | | #| |# | |# #| | | | #| |# | |# #|
;|# | |# | |# | |# | |# #| |# #| |# #| |# #|
ZX_UDG:
.block_0 equ 0x80
.block_1 equ 0x81
.block_2 equ 0x82
.block_3 equ 0x83
.block_4 equ 0x84
.block_5 equ 0x85
.block_6 equ 0x86
.block_7 equ 0x87
.block_8 equ 0x88
.block_9 equ 0x89
.block_A equ 0x8A
.block_B equ 0x8B
.block_C equ 0x8C
.block_D equ 0x8D
.block_E equ 0x8E
.block_F equ 0x8F
.a equ 0x90
.b equ 0x91
.c equ 0x92
.d equ 0x93
.e equ 0x94
.f equ 0x95
.g equ 0x96
.h equ 0x97
.i equ 0x98
.j equ 0x99
.k equ 0x9A
.l equ 0x9B
.m equ 0x9C
.n equ 0x9D
.o equ 0x9E
.p equ 0x9F
.q equ 0xA0
.r equ 0xA1
.s equ 0xA2
.t equ 0xA3 ; token SPECTRUM in 128 basic
.u equ 0xA4 ; token PLAY in 128 basic
; ---------------------------------------------------------------------
; Tokens
ZX_Token
.spectrum equ 0xA3 ; UDG T in 48 basic
.play equ 0xA4 ; UDG U in 48 basic
.rnd equ 0xA5
.inkey_dollar equ 0xA6
.pi equ 0xA7
.fn equ 0xA8
.point equ 0xA9
.screen_dollar equ 0xAA
.attr equ 0xAB
.at equ 0xAC
.tab equ 0xAD
.val_dollar equ 0xAE
.code equ 0xAF
.val equ 0xB0
.len equ 0xB1
.sin equ 0xB2
.cos equ 0xB3
.tan equ 0xB4
.asn equ 0xB5
.acs equ 0xB6
.atn equ 0xB7
.ln equ 0xB8
.exp equ 0xB9
.int equ 0xBA
.sqr equ 0xBB
.sgn equ 0xBC
.abs equ 0xBD
.peek equ 0xBE
.in equ 0xBF
.usr equ 0xC0
.str_dollar equ 0xC1
.chr_dollar equ 0xC2
.not equ 0xC3
.bin equ 0xC4
.or equ 0xC5
.and equ 0xC6
.less_or_equal equ 0xC7
.greater_or_equal equ 0xC8
.not_equal equ 0xC9
.line equ 0xCA
.then equ 0xCB
.to equ 0xCC
.step equ 0xCD
.def_fn equ 0xCE
.cat equ 0xCF
.format equ 0xD0
.move equ 0xD1
.erase equ 0xD2
.open_channel equ 0xD3
.close_channel equ 0xD4
.merge equ 0xD5
.verify equ 0xD6
.beep equ 0xD7
.circle equ 0xD8
.ink equ 0xD9
.paper equ 0xDA
.flash equ 0xDB
.bright equ 0xDC
.inverse equ 0xDD
.over equ 0xDE
.out equ 0xDF
.lprint equ 0xE0
.llist equ 0xE1
.stop equ 0xE2
.read equ 0xE3
.data equ 0xE4
.restore equ 0xE5
.new equ 0xE6
.border equ 0xE7
.continue equ 0xE8
.dim equ 0xE9
.rem equ 0xEA
.for equ 0xEB
.go_to equ 0xEC
.go_sub equ 0xED
.input equ 0xEE
.load equ 0xEF
.list equ 0xF0
.let equ 0xF1
.pause equ 0xF2
.next equ 0xF3
.poke equ 0xF4
.print equ 0xF5
.plot equ 0xF6
.run equ 0xF7
.save equ 0xF8
.randomize equ 0xF9
.if equ 0xFA
.cls equ 0xFB
.draw equ 0xFC
.clear equ 0xFD
.return equ 0xFE
.copy equ 0xFF
; ---------------------------------------------------------------------
+1160
View File
File diff suppressed because it is too large. Load diff
+309
View File
@@ -0,0 +1,309 @@
; ZX Spectrum system variables
; By Marcos Cruz (programandala.net)
; Last modified: 201803231837
; See change log at the end of the file
; ==============================================================
; ZX Spectrum +3
sys_nmiadd: equ 23728 ; (2)
; The system variable at 5CB0h (23728) was documented on previous models of the
; Spectrum as 'Not used'. It is now used on the +3 as an NMI jump vector. If an
; NMI occurs, this address is checked. If it contains a 0, then no action is
; taken. However, for any other (non-zero) value, a jump will be made to the
; address given by this variable. NMIs must not occur while the disk system is
; active.
SWAP_ROM: equ 23296 ; (0x5B00) (R16)
; Paging subroutine.
sys_stoo: equ 23312 ; (0x5B10) (R17)
; Paging subroutine. Entered with
; interrupts already disabled and AF, BC
; on the stack.
sys_younger: equ 23329 ; (0x5B21) (R9)
; Paging subroutine.
sys_regnuoy: equ 23338 ; (0x5B2A) (R16)
; Paging subroutine.
sys_onerr: equ 23354 ; (0x5B3A) (R24)
; Paging subroutine.
sys_oldhl: equ 23378 ; (0x5B52) (X2)
; Temporary register store while
; switching ROMs.
sys_oldbc: equ 23380 ; (0x5B54) (X2)
; Temporary register store while
; switching ROMs.
sys_oldaf: equ 23382 ; (0x5B56) (X2)
; Temporary register store while
; switching ROMs.
sys_target: equ 23384 ; (0x5B58) (N2)
; Subroutine address in ROM 3.
sys_retaddr: equ 23386 ; (0x5B5A) (X2)
; Return address in ROM 1.
sys_bankm: equ 23388 ; (0x5B5C) (X1)
; Copy of last byte output to I/O
; port 7FFDh (32765). This port
; is used to control the RAM
; paging (bits 0..2: page 0..7),
; screen selection (bit 3:
; 0=normal, 1=shadow),
; 'horizontal' ROM switch (bit 4:
; 0=128k editor, 1=48k BASIC) and
; added I/O disabling (bit 5).
; the This byte must be kept up
; to date with the last value
; output to the port if
; interrupts are enabled.
sys_ramrst: equ 23389 ; (0x5B5D) (X1)
; RST 8 instruction. Used by ROM 1 to
; report old errors to ROM 3.
sys_ramerr: equ 23390 ; (0x5B5E) (N1)
; Error number passed from ROM 1 to ROM
; 3. Also used by SAVE/LOAD as temporary
; drive store.
sys_baud: equ 23391 ; (0x5B5F) (2)
; RS232 bit period in T states/26. Set
; by FORMAT LINE.
sys_serfl: equ 23393 ; (0x5B61) (N2)
; Second-character-received-flag, and
; data.
sys_col: equ 23395 ; (0x5B63) (N1)
; Current column from 1 to width.
sys_width: equ 23396 ; (0x5B64) (1)
; Paper column width. Defaults to 80.
sys_tvpars: equ 23397 ; (0x5B65) (1)
; Number of inline parameters expected
; by RS232
sys_flags3: equ 23398 ; (0x5B66) (1)
; Various flags. Bits 0, 1, 6 and 7
; unlikely to be useful. Bit 2 is set
; when tokens are to be expanded on
; printing. Bit 3 is set if print output
; is RS232. The default (at reset) is
; Centronics. Bit 4 is set if a disk
; interface is present. Bit 5 is set if
; drive B: is present.
sys_bank678: equ 23399 ; (0x5B67) (X1)
; Copy of last byte output to I/O port
; 1FFDh (8189). This port is used to
; control the +3 extended RAM and ROM
; switching (bits 0..2 - if bit 0 is 0
; then bit 2 controls the 'vertical' ROM
; switch 02 and 13), the disk
; motor (bit 3) and Centronics strobe
; (bit 4). This byte must be kept up to
; date with the last value output to the
; port if interrupts are enabled.
sys_xloc: equ 23400 ; (0x5B68) (N1)
; Holds X location when using the
; unexpanded COPY command.
sys_yloc: equ 23401 ; (0x5B69) (N1)
; Holds Y location when using the
; unexpanded COPY command.
sys_oldsp: equ 23402 ; (0x5B6A) (X2)
; Old SP (stack pointer) when TSTACK is
; in use.
sys_synret: equ 23404 ; (0x5B6C) (X2)
; Return address for ONERR.
sys_lastv: equ 23406 ; (0x5B6E) (5)
; Last value printed by calculator.
sys_rcline: equ 23411 ; (0x5B73) (2)
; Current line being renumbered.
sys_rcstart: equ 23413 ; (0x5B75) (2)
; Starting line number for
; renumbering. The default value is 10.
sys_rcstep: equ 23415 ; (0x5B77) (2)
; Incremental value for renumbering. The
; default is 10.
sys_loddrv: equ 23417 ; (0x5B79) (1)
; Holds 'T' if LOAD, VERIFY, MERGE are
; from tape, otherwise holds 'A', 'B'
; or 'M'.
sys_savdrv: equ 23418 ; (0x5B7A) (1)
; Holds 'T' if SAVE is to tape,
; otherwise holds 'A', 'B' or 'M'.
sys_dumplf: equ 23419 ; (0x5B7B) (1)
; Holds the number of 1/216ths user for
; line feeds in 'COPY EXP'. This is
; normally set to 9. If problems are
; experienced fitting a dump onto a
; sheet of A4 paper, POKE this
; location with 8. This will reduce the
; size of the dump and improve the
; aspect ratio slightly. (The quality of
; the dump will be marginally degraded,
; however.)
sys_strip1: equ 23420 ; (0x5B7C) (N8)
; Stripe one bitmap.
sys_strip2: equ 23428 ; (0x5B84) (N8)
; Stripe two bitmap. This extends to
; 5B8Bh (23436).
sys_tstack: equ 23551 ; (0x5BFF) (X115)
; Temporary stack grows down from
; here. Used when RAM page 7 is switched
; in at top of memory (while executing
; the editor or calling +3DOS). it may
; safely go down to 5B8Ch (and across
; STRIP1 and STRIP2 if necessary). This
; guarantees at least 115 bytes of stack
; when BASIC calls +3DOS.
; ==============================================================
; ZX Spectrum 48K
sys_printer_buffer: equ 23296 ; (0x5B00)
sys_kstate: equ 23552 ; (n8) Used in reading the keyboard.
sys_kstate.1: equ 23553
sys_kstate.2: equ 23554
sys_kstate.3: equ 23555
sys_kstate.4: equ 23556
sys_kstate.5: equ 23557
sys_kstate.6: equ 23558
sys_kstate.7: equ 23559
sys_last_k: equ 23560 ; (nl) Stores newly pressed key.
sys_last_key: equ 23560
sys_repdel: equ 23561 ; (1) Time (in 50ths of a second
; in 60ths of a second in N. America) that a key must
; be held down before it repeats.
; This starts off at 35, but you can POKE in other values.
sys_repper: equ 23562 ; (1) Delay (in 50ths of a second in 60ths of a second
; in N. America) between successive repeats
; of a key held down: initially 5.
sys_defadd: equ 23563 ; (n2) Address of arguments of user defined function
; if one is being evaluated; otherwise 0.
sys_k_data: equ 23565 ; (nl) Stores 2nd byte of colour controls
; entered from keyboard.
sys_tvdata: equ 23566 ; (n2) Stores bytes of colour, AT and TAB controls
; going to television.
sys_tvdata2: equ 23567
sys_tvdata.high: equ 23567
sys_strms: equ 23568 ; (x38) Addresses of channels attached to streams.
sys_chars: equ 23606 ; (2) 256 less than address of character set
sys_rasp: equ 23608 ; (1) Length of warning buzz.
sys_pip: equ 23609 ; (1) Length of keyboard click.
; sys_err_nr is pointed by IY
sys_err_nr: equ 23610 ; (1) 1 less than the report code.
; Starts off at 255 (for 1) so PEEK 23610 gives 255.
sys_flags: equ 23611 ; (x1) Various flags to control the BASIC system.
sys_tv_flag: equ 23612 ; (x1) Flags associated with the television.
sys_err_sp: equ 23613 ; (x2) Address of item on machine stack
; to be used as error return.
sys_list_sp: equ 23615 ; (n2) Address of return address from automatic listing.
sys_mode: equ 23617 ; (n1) Specifies K, L, C. E or G cursor.
sys_newppc: equ 23618 ; (2) Line to be jumped to.
sys_nsppc: equ 23620 ; (1) Statement number in line to be jumped to.
; Poking first NEWPPC and then NSPPC
; forces a jump to a specified statement in a line.
sys_ppc: equ 23621 ; (2) Line number of statement currently being executed.
sys_subppc: equ 23623 ; (1) Number within line of statement being executed.
sys_bordcr: equ 23624 ; (1) Border colour * 8; also contains the attributes
; normally used for the lower half of the screen.
sys_e_ppc: equ 23625 ; (2) Number of current line (with program cursor).
sys_vars: equ 23627 ; (x2) Address of variables.
sys_dest: equ 23629 ; (n2) Address of variable in assignment.
sys_chans: equ 23631 ; (x2) Address of channel data.
sys_curchl: equ 23633 ; (x2) Address of information currently being used
; for input and output.
sys_prog: equ 23635 ; (x2) Address of BASIC program.
sys_nxtlin: equ 23637 ; (x2) Address of next line in program.
sys_datadd: equ 23639 ; (x2) Address of terminator of last DATA item.
sys_e_line: equ 23641 ; (x2) Address of command being typed in.
sys_k_cur: equ 23643 ; (2) Address of cursor.
sys_ch_add: equ 23645 ; (x2) Address of the next character to be interpreted.
sys_x_ptr: equ 23647 ; (2) Address of the character after the ? marker.
sys_worksp: equ 23649 ; (x2) Address of temporary work space.
sys_stkbot: equ 23651 ; (x2) Address of bottom of calculator stack.
sys_stkend: equ 23653 ; (x2) Address of start of spare space.
sys_breg: equ 23655 ; (n1) Calculator's b register.
sys_mem: equ 23656 ; (n2) Address of area used for calculator's memory.
; (Usually MEMBOT, but not always.)
sys_flags2: equ 23658 ; (1) More flags.
sys_df_sz: equ 23659 ; (x1) The number of lines (including one blank line)
; in the lower part of the screen.
sys_s_top: equ 23660 ; (2) The number of the top program line in automatic listings.
sys_oldppc: equ 23662 ; (2) Line number to which CONTINUE jumps.
sys_ospcc: equ 23664 ; (1) Number within line of statement
; to which CONTINUE jumps.
sys_flagx: equ 23665 ; (n1) Various flags.
sys_strlen: equ 23666 ; (n2) Length of string type destination in assignment.
sys_t_addr: equ 23668 ; (n2) Address of next item in syntax table
; (very unlikely to be useful).
sys_seed: equ 23670 ; (2) The seed for RND.
; This is the variable that is set by RANDOMIZE.
sys_frames: equ 23672 ; (3) 3 byte (least significant first), frame counter.
; Incremented every 20ms.
sys_udg: equ 23675 ; (2) Address of 1st user defined graphic.
sys_coords: equ 23677 ; (2) coordinates of last point plotted.
sys_coordx: equ 23677 ; (1) x-coordinate of last point plotted.
sys_coordy: equ 23678 ; (1) y-coordinate of last point plotted.
sys_p_posn: equ 23679 ; (1) 33 column number of printer position
sys_pr_cc: equ 23680 ; (1) Less significant byte of address
; of next position for LPRINT to print at
; (in printer buffer).
sys_unused0: equ 23681 ; (1) Not used.
sys_echo_e: equ 23682 ; (2) 33 column number and 24 line number
; (in lower half) of end of input buffer.
sys_df_cc: equ 23684 ; (2) Address in display file of PRINT position.
sys_dfccl: equ 23686 ; (2) Like DF CC for lower part of screen.
sys_s_posn: equ 23688 ; (x2) 33 column and 24 line number for PRINT position
sys_s_posx: equ 23688 ; (x1) 33 column number for PRINT position
sys_s_posy: equ 23689 ; (x1) 24 line number for PRINT position.
sys_s_posn2: equ 23689
sys_sposnl: equ 23690 ; (x2) Like S POSN for lower part
sys_scr_ct: equ 23692 ; (1) Counts scrolls:
; it is always 1 more than the number of scrolls that
; will be done before stopping with scroll? If you keep
; poking this with a number bigger than 1 (say 255), the
; screen will scroll on and on without asking you.
sys_attr_p: equ 23693 ; (1) Permanent current colours, etc
; (as set up by colour statements).
sys_mask_p: equ 23694 ; (1) Used for transparent colours, etc.
; Any bit that is 1 shows that the corresponding
; attribute bit is taken not from ATTR P, but from what
; is already on the screen.
sys_attr_t: equ 23695 ; (n1) Temporary current colours, etc
; (as set up by colour items).
sys_mask_t: equ 23696 ; (n1) Like MASK P, but temporary.
sys_p_flag: equ 23697 ; (1) More flags.
sys_membot: equ 23698 ; (n30) Calculator's memory area;
; used to store numbers that cannot
; conveniently be put on the calculator stack.
sys_unused1: equ 23728 ; (1) Not used.
sys_unused2: equ 23729 ; (1) Not used.
sys_ramtop: equ 23730 ; (2) Address of last byte of BASIC system area.
sys_p_ramt: equ 23732 ; (2) Address of last byte of physical RAM.
sys_p_ramt.high: equ 23733
; ==============================================================
; Change log
; 2014-12-17: Converted from the HTML version of the ZX Spectrum manual, with
; the help of Vim. Regulary improved afterwards.
;
; 2015-01-12: New: first two ZX Spectrum +3 variables.
;
; 2015-01-15: New: 'sys_flags3'.
;
; 2015-01-16: New: all ZX Spectrum +3 variables.
;
; 2015-05-24: Changes to make the file usable as symbols input file by
; z80dasm.
;
; 2015-09-06: Offset extracted to <zx_spectrum_system_variables_offsets.z80s>,
; because the z80dasm disassembler does not accept calculations in its input
; symbols file.
;
; 2016-08-05: Remove useless comment.
;
; 2016-08-15: Add individual bytes of sys_k_state; the second one is addressed
; by TR-DOS 5.03.
;
; 2018-03-09: Add `sys_printer_buffer`.
;
; 2018-03-23: Add `sys_tvdata.high`.
+29
View File
@@ -0,0 +1,29 @@
; ZX Spectrum TR-DOS
; By Marcos Cruz (programandala.net)
; --------------------------------------------------------------
; History
; 2016-08-13: Start, from information compiled for Solo Forth
; (http://programandala.net/en.program.solo_forth.html).
;
; 2016-09-01: Add drive step rate variables.
;
; 2016-10-01: Complete the variables and entry points. Identify
; unknown variable 23817.
;
; 2017-02-05: Update name of variable 23766, which is used for
; two different things. Add symbols for error codes.
;
; 2017-02-10: Add synonymous of command 0x0E. Fix typo in
; symbol. Add first draft of sector buffer addresses.
;
; 2017-02-10: Split the file in two: addresses and codes. The
; reason is to be able to use only the addresses as input in
; the TR-DOS disassembled project.
; --------------------------------------------------------------
include "inc/zx_spectrum_trdos_addresses.z80s"
include "inc/zx_spectrum_trdos_codes.z80s"
+184
View File
@@ -0,0 +1,184 @@
; ZX Spectrum TR-DOS addresses
; By Marcos Cruz (programandala.net)
; --------------------------------------------------------------
; History
; 2017-02-10: Extract from the main file: entry points,
; variables and sector buffer addresses.
;
; 2017-03-08: Rename `trdos_variable.file_size` to
; `trdos_variable.stream_or_file_size`.
;
; 2017-03-09: Improve name of variable 23814.
; --------------------------------------------------------------
; TR-DOS entry points
trdos_entry.enter_trdos_from_basic: equ 15616 ; 0x3D00
trdos_entry.interpret_rem_command: equ 15619 ; 0x3D03
; Interpret a TR-DOS REM-command pointed by the system variable CH
; ADD (23645).
;
; XXX REMARK -- The Beta Disk and Beta 128 Disk manuals use address
; 15363 in the assembly examples, but it's a mistake. In fact 15363
; (0x3C03) is out of the range of addresses that make the TR-DOS
; memory page in (0x3D00..0x3DFF). Probably the confusion was caused
; by a typo in hex (0x3D03 and 0x3C03).
trdos_entry.execute_command_in_c: equ 15635 ; 0x3D13
; Execute a TR-DOS command, whose code is in the C register.
entry.init_dos: equ 15649 ; 0x3D21
trdos_entry.call_pushed_address: equ 15663 ; 0x3D2F
; Execute the TR-DOS routine whose address is on top of stack.
; trdos_entry.XXX equ 15622 ; 0x3D06
; trdos_entry.XXX equ 15629 ; 0x3D0D
; trdos_entry.XXX equ 15632 ; 0x3D10
; trdos_entry.XXX equ 15652 ; 0x3D24
; --------------------------------------------------------------
; TR-DOS variables
trdos_variable.interface_1_zone: equ 23734
trdos_variable.0xc9: equ 23746
trdos_variable.unknown_23747: equ 23747
trdos_variable.drive_a_mode: equ 23752
trdos_variable.drive_b_mode: equ 23753
trdos_variable.drive_c_mode: equ 23754
trdos_variable.drive_d_mode: equ 23755
trdos_variable.cat_current_sector: equ 23756
trdos_variable.disk_drive_ready: equ 23757
trdos_variable.sector_rw_flag: equ 23758
trdos_variable.stack_sp_copy: equ 23759
trdos_variable.basic_program_autostart: equ 23761
trdos_variable.basic_program_autostart.high: equ 23762
trdos_variable.unknown_23763: equ 23763
trdos_variable.move_command_deleted_files: equ 23764
trdos_variable.move_command_first_sector: equ 23765
trdos_variable.bad_sectors_or_move_command_first_track: equ 23766
trdos_variable.start_file_parameter_or_number_of_tracks: equ 23767
trdos_variable.start_file_parameter.high: equ 23768
trdos_variable.ch_add: equ 23769
trdos_variable.ch_add.high: equ 23770
trdos_variable.stream_or_file_size: equ 23771
trdos_variable.file_size.high: equ 23772
trdos_variable.filename: equ 23773
trdos_variable.filename.1: equ 23774
trdos_variable.filename.2: equ 23775
trdos_variable.filename.3: equ 23776
trdos_variable.filename.4: equ 23777
trdos_variable.filename.5: equ 23778
trdos_variable.filename.6: equ 23779
trdos_variable.filename.7: equ 23780
trdos_variable.file_type: equ 23781
trdos_variable.file_start: equ 23782
trdos_variable.file_start.high: equ 23783
trdos_variable.file_length_in_bytes: equ 23784
trdos_variable.file_length_in_bytes.high: equ 23785
trdos_variable.file_length_in_sectors: equ 23786
trdos_variable.file_first_sector: equ 23787
trdos_variable.file_first_track: equ 23788
trdos_variable.c_file_start_or_b_file_size: equ 23789
trdos_variable.file_2_length_in_bytes: equ 23791
trdos_variable.file_2_length_in_sectors: equ 23793
trdos_variable.file_2_first_sector: equ 23794
trdos_variable.file_2_first_track: equ 23795
trdos_variable.current_sector: equ 23796
trdos_variable.current_track: equ 23797
trdos_variable.current_temporary_drive: equ 23798
trdos_variable.cleared: equ 23799
trdos_variable.two_files_drive: equ 23800
trdos_variable.cat_drive_or_read_verify_flag: equ 23801
trdos_variable.drive_a_step_rate: equ 23802
trdos_variable.drive_b_step_rate: equ 23803
trdos_variable.drive_c_step_rate: equ 23804
trdos_variable.drive_d_step_rate: equ 23805
trdos_variable.last_fdc_command: equ 23806
trdos_variable.sector: equ 23807
trdos_variable.buffer: equ 23808
trdos_variable.hl_copy: equ 23810
trdos_variable.de_copy: equ 23812
trdos_variable.bytes_compared_by_find_command: equ 23814
trdos_variable.deleted_files: equ 23815
trdos_variable.filename_first_char: equ 23816
trdos_variable.data_file_mode: equ 23817
trdos_variable.buffer_flag: equ 23820
trdos_variable.file_number_for_copying: equ 23821
trdos_variable.command_mode: equ 23822
trdos_variable.error_code: equ 23823
trdos_variable.error_code_msb: equ 23824
trdos_variable.command_line_address: equ 23825
trdos_variable.err_sp_copy: equ 23827
trdos_variable.show_screen_flag: equ 23829
trdos_variable.system_register: equ 23830
trdos_variable.show_title_flag: equ 23831
trdos_variable.interface_1_flag: equ 23832
trdos_variable.default_drive: equ 23833
trdos_variable.internal_address_of_finishing_proc: equ 23834
trdos_variable.sp_copy: equ 23836
trdos_variable.find_command_found_file: equ 23838
trdos_variable.unknown_23839: equ 23839
trdos_variable.entered_line_3_first_chars: equ 23840
trdos_variable.entered_line_3_first_chars.1: equ 23841
trdos_variable.entered_line_3_first_chars.2: equ 23842
trdos_variable.move_command_blocks: equ 23843
trdos_variable.tmp_buffer_address: equ 23845
trdos_variable.k_channel.output: equ 23846
trdos_variable.k_channel.input: equ 23848
trdos_variable.k_channel.id: equ 23850
trdos_variable.s_channel.output: equ 23851
trdos_variable.s_channel.input: equ 23853
trdos_variable.s_channel.id: equ 23855
trdos_variable.r_channel.output: equ 23856
trdos_variable.r_channel.input: equ 23858
trdos_variable.r_channel.input.high: equ 23859
trdos_variable.r_channel.id: equ 23860
trdos_variable.p_channel.output: equ 23861
trdos_variable.p_channel.input: equ 23863
trdos_variable.p_channel.id: equ 23865
; --------------------------------------------------------------
; TR-DOS sector buffer
trdos_sector_buffer: equ 0x5D25
; 256-byte sector buffer
; Addresses of the 8th sector of track 0, which contains the
; disk metatada, when it's loaded in the sector buffer:
trdos_sector_buffer.sectors: equ 0x5D04
; 2 B: total number of sectors
trdos_sector_buffer.next_free_sector: equ 0x5E06
; 1 B: Next free sector (0 index, 0 default)
trdos_sector_buffer.next_free_track: equ 0x5E07
; 1 B: Next free track
trdos_sector_buffer.disk_type: equ 0x5E08
; 1 B: disk type:
; 0x16 - 80 tracks, 2 sides
; 0x17 - 40 tracks, 2 sides
; 0x18 - 80 tracks, 1 side
; 0x19 - 40 tracks, 1 side
trdos_sector_buffer.files: equ 0x5E09
; 1 B: Number of files, including the deleted files
trdos_sector_buffer.free_sectors: equ 0x5E0A
; 2 B: Number of free sectors, depending on the disk type:
; 2544 = 0x09F0 : 80 tracks, 2 sides
; 1264 = 0x04F0 - 40 tracks, 2 sides
; 1264 = 0x04F0 - 80 tracks, 1 side
; 624 = 0x0270 - 40 tracks, 1 side
; 2672 = 0x0A70 - 84 tracks, 2 sides (DCU format)
; 2736 = 0x0AB0 - 86 tracks, 2 sides (DCU format)
trdos_sector_buffer.sectors_per_track: equ 0x5E0C
; 1 B: Number of sectors per track:
; If not 0x10, the disk will not be recognized.
trdos_sector_buffer.deleted_files: equ 0x5E19
; 1 B: Number of deleted files
trdos_sector_buffer.disc_title: equ 0x5E1A
; 8 B: Disk title
+53
View File
@@ -0,0 +1,53 @@
; ZX Spectrum TR-DOS codes
; By Marcos Cruz (programandala.net)
; --------------------------------------------------------------
; History
; 2017-02-10: Extracted from the main file: command and error
; codes.
; --------------------------------------------------------------
; TR-DOS command codes
trdos_command.init_interface: equ 0x00
trdos_command.init_drive: equ 0x01
trdos_command.seek_track: equ 0x02
trdos_command.set_sector: equ 0x03
trdos_command.define_buffer: equ 0x04
trdos_command.read_sectors: equ 0x05
trdos_command.write_sectors: equ 0x06
trdos_command.cat: equ 0x07
trdos_command.read_file_descriptor: equ 0x08
trdos_command.write_file_descriptor: equ 0x09
trdos_command.find_file: equ 0x0A
trdos_command.create_file: equ 0x0B
trdos_command.save_basic_program: equ 0x0C
trdos_command.read_file: equ 0x0E
trdos_command.load_or_verify: equ 0x0E
trdos_command.delete_file: equ 0x12
trdos_command.copy_from_hl_to_descriptor: equ 0x13
trdos_command.copy_from_descriptor_to_hl: equ 0x14
trdos_command.test_track: equ 0x15
trdos_command.select_bottom_side: equ 0x16
trdos_command.select_top_side: equ 0x17
trdos_command.read_system_track: equ 0x18
; --------------------------------------------------------------
; TR-DOS error codes
trdos_error.no_errors equ 0
trdos_error.no_files equ 1
trdos_error.file_exists equ 2
trdos_error.no_space equ 3
trdos_error.directory_full equ 4
trdos_error.record_number_overflow equ 5
trdos_error.no_disk equ 6
trdos_error.disk_errors equ 7
trdos_error.syntax_errors equ 8
trdos_error.undefined_error equ 9
trdos_error.stream_already_opened equ 10
trdos_error.not_disk_file equ 11
trdos_error.stream_not_open equ 12