Rev 1067 | Details | Compare with Previous | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 801 | savelij | 1 | |
| 1186 | savelij | 2 | ; LAST UPDATE: 16.02.2025 savelij |
| 801 | savelij | 3 | |
| 4 | PAGE |
||
| 5 | TITLE "main.a80" |
||
| 6 | |||
| 1186 | savelij | 7 | include macros.a80 |
| 8 | include define.a80 |
||
| 9 | include global_vars.a80 |
||
| 10 | include ports_ide.a80 |
||
| 11 | include basic_tokens.a80 |
||
| 12 | include bas_trd_vars.a80 |
||
| 13 | include tmpkeys.a80 |
||
| 14 | include version.a80 |
||
| 15 | include nums_devices.a80 |
||
| 16 | include ports_ngs.a80 |
||
| 17 | include fat_dir.a80 |
||
| 801 | savelij | 18 | |
| 1026 | savelij | 19 | TO_DOS EQU 0x3D2F |
| 801 | savelij | 20 | |
| 1026 | savelij | 21 | INIT_VAR 0xC000 |
| 22 | SETVAR ADR_CAT, 0xC00 ; ᪥ ࠧ |
||
| 23 | SETVAR ADR_CAT_FAT, 0x800 ; 䠩 FAT |
||
| 24 | SETVAR ADR_CAT_SCRH, 0x1000 ; ᪠ 䠩 |
||
| 25 | SETVAR BUFTSC, 0x180 ; 180 ⠡ ᮢ ப ࠭ F700 |
||
| 26 | SETVAR MOUSE_BUFF, 0x10 ; 10 ࠭ |
||
| 27 | SETVAR COLBUF, 0x20 ; 20 ࠭ 梥 |
||
| 28 | SETVAR BUF_FILEITEM, 0x20 ; 20 ⥫ 䠩 |
||
| 29 | SETVAR BUF_RDSEC, 0x200 ; 200 ᥪ થ 䠩 F900 |
||
| 30 | SETVAR BUF_RDPATH, 0x100 ; 100 ⥪饣 FB00 |
||
| 31 | SETVAR BUF_LEVDIR, 0x400 ; 400 䠩 FC00 |
||
| 32 | SETVAR BUF_LINESWIN, 0x200 ; 200 ⥫ |
||
| 801 | savelij | 33 | |
| 1026 | savelij | 34 | H_FILE EQU 16 ; ਭ 뢮 䠩 c TR-DOS |
| 35 | V_FILE EQU 24 ; 뢮 䠩 c TR-DOS |
||
| 36 | FV_FILE EQU 26 ; ਭ 뢮 䠩 c FAT |
||
| 37 | FV_FILE6 EQU ((FV_FILE-3)*8)/6 ; ਭ 뢮 䠩 FAT 68 |
||
| 38 | FH_FILE EQU 24 ; 뢮 䠩 FAT |
||
| 39 | WIDE EQU 1 ; |
||
| 801 | savelij | 40 | |
| 1026 | savelij | 41 | CMOS_ON EQU 0x80 |
| 801 | savelij | 42 | CMOS_OFF EQU 0 |
| 43 | |||
| 1026 | savelij | 44 | ORG 0x6000 |
| 801 | savelij | 45 | DI |
| 46 | CALL CLEAR_128K |
||
| 1026 | savelij | 47 | LD A,0x10 |
| 48 | CALL SET_7FFD ; 祭 ᨪ48 ࠭ 0 |
||
| 49 | CALL ADRTSC ; ᮧ ⠡ ᮢ ப ࠭ |
||
| 50 | RST8 _MOUNTER,_GET_VIRT_BITS |
||
| 999 | savelij | 51 | RST8 _COM_DEV,_DEVFIND |
| 801 | savelij | 52 | JR C,START3 |
| 999 | savelij | 53 | RST8 _MOUNTER,_FIND_MOUNTED |
| 54 | START3 |
||
| 55 | RST8 _COM_DEV,_CONTROL_SD |
||
| 801 | savelij | 56 | EI |
| 57 | HALT |
||
| 58 | DI |
||
| 1186 | savelij | 59 | LD H,CMOS.SECOND |
| 1026 | savelij | 60 | CALL READCMOS ; ⥭ ᥪ㭤 । |
| 801 | savelij | 61 | INC L |
| 62 | LD HL,ERS_FLAGS |
||
| 1026 | savelij | 63 | JR NZ,START2 ; ⠫ 0xFF, |
| 64 | RES B_CLOCK_ON,(HL) ; |
||
| 801 | savelij | 65 | JR START1 |
| 66 | |||
| 1026 | savelij | 67 | START2 SET 2,(HL) ; |
| 801 | savelij | 68 | START4 CALL SET_MODES |
| 1026 | savelij | 69 | START1 CALL DETECTMOUSE ; । |
| 70 | CALL GLUDIN ; 㬪㫨 AY |
||
| 71 | CALL MOUSE ; |
||
| 72 | LD HL,0x807C |
||
| 73 | LD (ARXY),HL ; ⠭ 䮫⭮ 樨 |
||
| 801 | savelij | 74 | CALL DISK_NONE |
| 75 | CALL SYSTEM |
||
| 1026 | savelij | 76 | CALL RESET_VG ; 誨 ⠭ 墠稪 訡 dos |
| 801 | savelij | 77 | RESTART DI |
| 1186 | savelij | 78 | XOR A |
| 79 | RST8 _NMI_FB_BLOCK ; ࠧ File Browser NMI |
||
| 1026 | savelij | 80 | LD A,0x10 |
| 81 | CALL SET_7FFD ; 稫 ᨪ48 ࠭ 0 |
||
| 801 | savelij | 82 | CALL TURBO_7MHZ |
| 83 | CALL SYSTEM |
||
| 84 | RES 3,(IY+55) |
||
| 1026 | savelij | 85 | LD SP,0x6000 |
| 86 | LD HL,0x3E00 |
||
| 801 | savelij | 87 | PUSH HL |
| 1026 | savelij | 88 | LD HL,0x1303 |
| 89 | PUSH HL ; ନ ⥪ |
||
| 90 | LD (ERR_SP),SP ; ⥪騩 ६ ᨪ |
||
| 801 | savelij | 91 | LD (TEK_SP),SP |
| 1026 | savelij | 92 | CALL S_FACE ; 뢮 ࠭ ᭮ |
| 801 | savelij | 93 | LD IX,MAINMENU |
| 999 | savelij | 94 | RST8 _WINW |
| 1026 | savelij | 95 | RES 5,(IY+1) ; 祣 |
| 1186 | savelij | 96 | LD H,CMOS.HDD_TIMEOUT |
| 1026 | savelij | 97 | CALL READCMOS |
| 98 | RRCA |
||
| 99 | RRCA |
||
| 100 | RRCA |
||
| 101 | RRCA |
||
| 102 | AND 0x0F |
||
| 103 | LD (SCRSAV.TIMEOUT),A |
||
| 104 | CALL RESET_SCREENSAVER |
||
| 952 | savelij | 105 | |
| 106 | IFDEF TESTEMUFDD |
||
| 107 | ; test |
||
| 999 | savelij | 108 | PEC_ON M_SHADOW_BF |
| 109 | EVOPORT WIN_P2,RAM_DATARAMD |
||
| 110 | EVOPORT WIN_P2,ZXSTD_CPU2 |
||
| 1026 | savelij | 111 | PEC_OFF M_SHADOW_BF!0xFF |
| 952 | savelij | 112 | |
| 1186 | savelij | 113 | LD HL,CMOS.VIRT_REAL_DRIVE << 8 |
| 952 | savelij | 114 | CALL WRITECMOS |
| 115 | LD HL,ADR_TXT_BOOT |
||
| 116 | JP RUNFILE1 |
||
| 117 | |||
| 118 | ADR_TXT_BOOT DB "boot " |
||
| 119 | ; test |
||
| 120 | ENDIF |
||
| 121 | |||
| 1026 | savelij | 122 | ; 室 横 ࠢ |
| 801 | savelij | 123 | _RULILKA EI |
| 124 | LD A,(ERS_FLAGS) |
||
| 1026 | savelij | 125 | AND M_MOUSE_ON ; ઠ |
| 801 | savelij | 126 | JR Z,_RULNMO |
| 1026 | savelij | 127 | ; FIX |
| 801 | savelij | 128 | MKEYPR EI |
| 129 | HALT |
||
| 130 | LD A,HIGH (MOUSE_KEYS) |
||
| 131 | IN A,(LOW (MOUSE_KEYS)) |
||
| 132 | CPL |
||
| 133 | AND 7 |
||
| 134 | JR NZ,MKEYPR |
||
| 1026 | savelij | 135 | CALL SAVE2X2 ; ⠫ ५ |
| 136 | _RULNMO CALL SET_ADR_ATR ; ⠭ 梥⭮ ᪨ |
||
| 801 | savelij | 137 | JR MAINLOP |
| 138 | |||
| 1026 | savelij | 139 | ; ५ |
| 140 | UP CALL CURSOR_UP ; ᬥ ⥪騩 㭪 -1 |
||
| 801 | savelij | 141 | JR SET_POS1 |
| 142 | |||
| 1026 | savelij | 143 | ; ५ ࠢ |
| 144 | RIGHT BIT 1,(IX+_FLAGS) ; ઠ 䠩 |
||
| 145 | PUSH AF ; ࠭ १ ન |
||
| 146 | CALL NZ,PAGEDN ; 䠩, ⠭ ࠭筮 |
||
| 147 | POP AF ; ⠭ १ ન |
||
| 148 | JR NZ,SET_POS1 ; 䠩 த |
||
| 801 | savelij | 149 | LD A,(IX+_NUM_KOL_L) |
| 150 | AND A |
||
| 151 | JR Z,SET_POS |
||
| 1026 | savelij | 152 | DEC A ; 室 㭪 |
| 153 | JR SET_POS ; 塞 த |
||
| 801 | savelij | 154 | |
| 1026 | savelij | 155 | ; ५ |
| 156 | DOWN CALL CURSOR_DOWN ; ᬥ ⥪騩 㭪 +1 |
||
| 801 | savelij | 157 | JR SET_POS1 |
| 158 | |||
| 1026 | savelij | 159 | ; ५ |
| 160 | LEFT BIT 1,(IX+_FLAGS) ; ઠ 䠩 |
||
| 161 | PUSH AF ; ࠭ १ ન |
||
| 162 | CALL NZ,PAGEUP ; 䠩, ⠭ ࠭筮 |
||
| 163 | POP AF ; ⠭ १ ન |
||
| 164 | JR NZ,SET_POS1 ; 䠩 த |
||
| 165 | XOR A ; 室 㭪 |
||
| 166 | SET_POS LD (IX+_NUM_PKT),A ; |
||
| 801 | savelij | 167 | LD (IX+_TEK_PKT_L),A |
| 1026 | savelij | 168 | LD (IX+_TEK_PKT_H),0 ; ࠭ 㭪 |
| 169 | SET_POS1 CALL COLOR_CURSOR ; ᮢ 梥⭮ ᪨ |
||
| 170 | SET_POS2 CALL GLUDIN ; 㬪㫨 AY |
||
| 801 | savelij | 171 | MAINLOP |
| 1026 | savelij | 172 | CALL CHECK_SCREENSAVER |
| 173 | RST8 _COM_DEV,_CONTROL_SD ; ઠ SD |
||
| 801 | savelij | 174 | LD A,(ERS_FLAGS) |
| 1026 | savelij | 175 | AND M_MOUSE_ON ; ઠ |
| 801 | savelij | 176 | JP Z,MAINNMO |
| 1026 | savelij | 177 | LD HL,(ARXY) ; न |
| 801 | savelij | 178 | PUSH HL |
| 1026 | savelij | 179 | CALL MOUSE ; ⮢ |
| 801 | savelij | 180 | POP BC |
| 181 | AND A |
||
| 182 | SBC HL,BC |
||
| 1026 | savelij | 183 | JR Z,NO_SELECT ; 뫮 |
| 184 | CALL RESTORE_KOSHAK ; 뫮 , 稪 蠪 |
||
| 185 | CALL MOUOPT ; ઠ |
||
| 801 | savelij | 186 | NO_SELECT LD BC,MOUSE_KEYS |
| 1026 | savelij | 187 | IN A,(C) ; |
| 801 | savelij | 188 | AND 7 |
| 189 | CP 6 |
||
| 1026 | savelij | 190 | JR Z,PRESS_MOUSE ; |
| 801 | savelij | 191 | CP 5 |
| 1026 | savelij | 192 | JP Z,RESTART ; ࠢ |
| 193 | CALL PRINTTIME ; ६ |
||
| 801 | savelij | 194 | EI |
| 195 | HALT |
||
| 1026 | savelij | 196 | CALL REST2X2 ; ⠭ ᮪ ࠭ |
| 197 | CALL DRAW_MOUSE ; ᮢ |
||
| 198 | JR MAINQMO ; த |
||
| 801 | savelij | 199 | |
| 200 | PRESS_MOUSE CALL OPMSPL |
||
| 201 | AND A |
||
| 202 | JR Z,CP_MOUSE4 |
||
| 203 | LD (LAST_K),A |
||
| 204 | CALL TIMELP |
||
| 205 | JR SELECT_KEY |
||
| 206 | |||
| 1026 | savelij | 207 | CP_MOUSE4 CALL MOUOPT ; ઠ । ⥪饣 |
| 208 | JR C,MAINNMO ; |
||
| 801 | savelij | 209 | LD L,(IX+_ADR_HOTKEY_L) |
| 210 | LD H,(IX+_ADR_HOTKEY_H) |
||
| 211 | LD A,H |
||
| 212 | OR L |
||
| 1026 | savelij | 213 | JR Z,ENTER ; ᯨ᪠ ⪥ , 室 㭪 |
| 214 | LD E,(IX+_NUM_PKT) ; 㭪 㤠 |
||
| 801 | savelij | 215 | LD D,0 |
| 1026 | savelij | 216 | ADD HL,DE ; ⪥ ࠭ 㭪 |
| 801 | savelij | 217 | LD DE,LAST_K |
| 1026 | savelij | 218 | LDI ; |
| 801 | savelij | 219 | JR ENTER |
| 220 | |||
| 1026 | savelij | 221 | MAINNMO CALL PRINTTIME ; ६, |
| 801 | savelij | 222 | EI |
| 223 | HALT |
||
| 1026 | savelij | 224 | MAINQMO BIT 5,(IY+1) ; ઠ |
| 225 | CALL Z,CP_TIME_KOSHAK ; 祣, 塞 稪 蠪 |
||
| 226 | JP Z,MAINLOP ; த ࠢ |
||
| 227 | CALL 0x1F54 ; ઠ BREAK |
||
| 228 | JP NC,RESTART ; BREAK १᪠ |
||
| 1030 | savelij | 229 | SELECT_KEY CALL GLUDIN |
| 230 | CALL RESTORE_KOSHAK ; , 稪 蠪 |
||
| 1026 | savelij | 231 | CALL RESET_SCREENSAVER |
| 232 | RES 5,(IY+1) ; 祣 |
||
| 801 | savelij | 233 | LD HL,LAST_K |
| 1026 | savelij | 234 | LD A,(HL) ; |
| 801 | savelij | 235 | LD B,0 |
| 236 | LD HL,MAIN_KEYS |
||
| 1026 | savelij | 237 | LD C,(HL) ; ⢮ 㯭 |
| 801 | savelij | 238 | LD D,C |
| 239 | INC HL |
||
| 240 | CPIR |
||
| 1026 | savelij | 241 | JR NZ,NOMAINKEYS ; 祣 諨, ᬮਬ ⥪饣 |
| 242 | ; - , 㯭 ᥣ |
||
| 801 | savelij | 243 | LD HL,ADREXEKEYS |
| 1026 | savelij | 244 | LD A,D ; ⢮ ⠡ -1 |
| 245 | SUB C ; 稫 ࠭ |
||
| 801 | savelij | 246 | DEC A |
| 247 | JR JUMP2HL |
||
| 248 | |||
| 1026 | savelij | 249 | ; ઠ ⪥ ⥪饬 |
| 801 | savelij | 250 | NOMAINKEYS LD L,(IX+_ADR_HOTKEY_L) |
| 251 | LD H,(IX+_ADR_HOTKEY_H) |
||
| 252 | LD C,A |
||
| 253 | LD A,H |
||
| 254 | OR L |
||
| 1026 | savelij | 255 | JP Z,MAINLOP ; ᯨ᪠ , த |
| 801 | savelij | 256 | LD A,C |
| 257 | LD C,(IX+_V_SIZE) |
||
| 258 | LD E,(HL) |
||
| 259 | INC HL |
||
| 1026 | savelij | 260 | DEC C ; ⢮ |
| 261 | DEC C ; -2 |
||
| 801 | savelij | 262 | LD D,C |
| 263 | LD B,0 |
||
| 1026 | savelij | 264 | CPIR ; ᪠ ᯨ᪠ |
| 801 | savelij | 265 | JR NZ,OSTAT_KEYS |
| 1026 | savelij | 266 | LD A,D ; |
| 801 | savelij | 267 | SUB C |
| 1026 | savelij | 268 | DEC A ; 稫 ⮩ -1 |
| 269 | LD (IX+_NUM_PKT),A ; 㭪 |
||
| 270 | LD (IX+_TEK_PKT_L),A ; ⮩ 㪠 ᯨ |
||
| 801 | savelij | 271 | ENTER LD A,(ERS_FLAGS) |
| 272 | AND M_MOUSE_ON |
||
| 1026 | savelij | 273 | CALL NZ,TIMELP ; ६ |
| 274 | CALL REST2X2 ; ૨ |
||
| 275 | CALL GLUDIN ; 㬪㫨 AY |
||
| 276 | LD A,(IX+_NUM_PKT) ; ᯨ᪠ 맢 |
||
| 801 | savelij | 277 | JUMP2HL1 LD L,(IX+_ADR_PRG_L) |
| 1026 | savelij | 278 | LD H,(IX+_ADR_PRG_H) ; ᯨ᮪ ᮢ 1 㤥 뢠 |
| 801 | savelij | 279 | JUMP2HL ADD A,A |
| 280 | ADD A,L |
||
| 281 | LD L,A |
||
| 282 | ADC A,H |
||
| 283 | SUB L |
||
| 284 | LD H,A |
||
| 285 | LD A,(HL) |
||
| 286 | INC HL |
||
| 287 | LD H,(HL) |
||
| 288 | LD L,A |
||
| 289 | JP (HL) |
||
| 290 | |||
| 291 | OSTAT_KEYS EX AF,AF' |
||
| 292 | LD A,E |
||
| 293 | SUB D |
||
| 294 | JP Z,MAINLOP |
||
| 295 | LD C,A |
||
| 296 | EX AF,AF' |
||
| 297 | CPIR |
||
| 298 | JP NZ,MAINLOP |
||
| 299 | LD A,E |
||
| 300 | SUB C |
||
| 301 | DEC A |
||
| 302 | JR JUMP2HL1 |
||
| 303 | |||
| 1026 | savelij | 304 | ; ० |
| 801 | savelij | 305 | CHNGMODE LD HL,MEMMODE |
| 1026 | savelij | 306 | DEC (HL) ; ᬥ ० |
| 801 | savelij | 307 | JP P,CHNGMODEY |
| 1026 | savelij | 308 | LD (HL),2 ; 諨 १ 0, ⠢ ० 48 |
| 801 | savelij | 309 | CHNGMODEY LD A,(ERS_FLAGS) |
| 1026 | savelij | 310 | AND M_CLOCK_ON ; ઠ |
| 801 | savelij | 311 | RET Z |
| 312 | LD A,(ERS_FLAGS) |
||
| 313 | AND M_EMU_TAPE |
||
| 314 | RLCA |
||
| 315 | RLCA |
||
| 316 | LD L,A |
||
| 317 | LD A,(MEMMODE) |
||
| 318 | OR L |
||
| 319 | LD L,A |
||
| 320 | CHNGMODEY1 LD A,(SYSREG1) |
||
| 1026 | savelij | 321 | AND 0x10 |
| 801 | savelij | 322 | RLCA |
| 323 | RLCA |
||
| 324 | RLCA |
||
| 325 | OR L |
||
| 326 | LD C,A |
||
| 1186 | savelij | 327 | LD H,CMOS.BYTE_01 |
| 801 | savelij | 328 | CALL READCMOS |
| 329 | AND %01111100 |
||
| 330 | OR C |
||
| 331 | CHANGE_MODES LD L,A |
||
| 1026 | savelij | 332 | CALL WRITECMOS ; ࠭ ० |
| 801 | savelij | 333 | CALL REST2X2 |
| 334 | CALL SET_MODES |
||
| 335 | CALL PRT_MODES |
||
| 336 | LD A,(ERS_FLAGS) |
||
| 337 | AND M_MOUSE_ON |
||
| 338 | JP Z,MAINLOP |
||
| 339 | CALL DRAW_MOUSE |
||
| 340 | CALL TIMELP |
||
| 341 | JP MAINLOP |
||
| 342 | |||
| 1026 | savelij | 343 | ; ० 0=3,5MHZ, 1=7MHZ, 2-14MHZ |
| 801 | savelij | 344 | CHNGTURBO LD HL,TURBO_NUM |
| 1026 | savelij | 345 | INC (HL) ; ᬥ turbo ० |
| 801 | savelij | 346 | LD A,(HL) |
| 347 | CP 3 |
||
| 348 | JR C,CHNGTURBO1 |
||
| 1026 | savelij | 349 | LD (HL),0 ; 諨 १ 0, ⠢ ० 14MHZ |
| 801 | savelij | 350 | CHNGTURBO1 LD A,(HL) |
| 351 | AND A |
||
| 1026 | savelij | 352 | LD DE,0x1000 |
| 801 | savelij | 353 | JR Z,CHNGTURBO2 |
| 354 | DEC A |
||
| 355 | LD DE,0 |
||
| 356 | JR Z,CHNGTURBO2 |
||
| 1186 | savelij | 357 | LD DE,0x10 << 8 + CMOS_ED.M_TURBO14 |
| 801 | savelij | 358 | CHNGTURBO2 LD A,D |
| 359 | LD HL,SYSREG1 |
||
| 360 | LD A,(HL) |
||
| 1026 | savelij | 361 | AND %11101111 ; ० |
| 801 | savelij | 362 | OR D |
| 363 | LD (HL),A |
||
| 1186 | savelij | 364 | LD H,CMOS.BYTE_00 |
| 801 | savelij | 365 | CALL READCMOS |
| 1186 | savelij | 366 | AND CMOS_ED.M_TURBO14 ! 0xFF |
| 801 | savelij | 367 | OR E |
| 368 | LD L,A |
||
| 1186 | savelij | 369 | LD H,CMOS.BYTE_00 |
| 801 | savelij | 370 | CALL WRITECMOS |
| 371 | JP CHNGMODEY |
||
| 372 | |||
| 1186 | savelij | 373 | CHNGTAPMODE LD H,CMOS.BYTE_00 |
| 801 | savelij | 374 | CALL READCMOS |
| 1186 | savelij | 375 | XOR CMOS_ED.M_EMUL_TAPE |
| 801 | savelij | 376 | JR CHANGE_MODES |
| 377 | |||
| 1186 | savelij | 378 | CHNGGLUKMOD LD H,CMOS.BYTE_00 |
| 801 | savelij | 379 | CALL READCMOS |
| 1186 | savelij | 380 | AND CMOS_EC.MKOL_MODES ! 0xFF |
| 801 | savelij | 381 | LD C,A |
| 382 | LD A,L |
||
| 1186 | savelij | 383 | AND CMOS_EC.MKOL_MODES |
| 801 | savelij | 384 | INC A |
| 1186 | savelij | 385 | CP CMOS_EC.KOL_MODES |
| 801 | savelij | 386 | JR C,CHNGGLUKMOD1 |
| 387 | XOR A |
||
| 388 | CHNGGLUKMOD1 OR C |
||
| 389 | LD L,A |
||
| 390 | JR CHANGE_MODES |
||
| 391 | |||
| 1186 | savelij | 392 | EN_AUTOMNT LD H,CMOS.BYTE_01 |
| 801 | savelij | 393 | CALL READCMOS |
| 1186 | savelij | 394 | XOR CMOS_EC.M_AUTOMOUNT |
| 801 | savelij | 395 | JP CHANGE_MODES |
| 396 | |||
| 1186 | savelij | 397 | EN_LOADFONT LD H,CMOS.BYTE_00 |
| 801 | savelij | 398 | CALL READCMOS |
| 1186 | savelij | 399 | XOR CMOS_ED.M_RELOAD_FONT |
| 801 | savelij | 400 | JP CHANGE_MODES |
| 401 | |||
| 1186 | savelij | 402 | SET_TYPEFONT LD H,CMOS.BYTE_00 |
| 801 | savelij | 403 | CALL READCMOS |
| 1186 | savelij | 404 | XOR CMOS_ED.M_TYPE_FONT |
| 801 | savelij | 405 | PUSH AF |
| 406 | PUSH HL |
||
| 1186 | savelij | 407 | AND CMOS_ED.M_TYPE_FONT |
| 801 | savelij | 408 | JR Z,SETTYPEFONT |
| 409 | LD A,1 |
||
| 999 | savelij | 410 | SETTYPEFONT |
| 411 | RST8 _SETUP_FONT |
||
| 801 | savelij | 412 | POP HL |
| 413 | POP AF |
||
| 414 | JP CHANGE_MODES |
||
| 415 | |||
| 1026 | savelij | 416 | ; 祭/몫祭e ⮡ࠦ ᮢ |
| 801 | savelij | 417 | CMOS_ONOFF LD A,(ERS_FLAGS) |
| 1026 | savelij | 418 | AND M_CLOCK_ON ; ઠ |
| 801 | savelij | 419 | JP Z,MAINLOP |
| 1186 | savelij | 420 | LD H,CMOS.BYTE_01 |
| 801 | savelij | 421 | CALL READCMOS |
| 1186 | savelij | 422 | XOR CMOS_EC.M_CLOCK_VIEW |
| 801 | savelij | 423 | LD L,A |
| 424 | PUSH AF |
||
| 1186 | savelij | 425 | LD H,CMOS.BYTE_01 |
| 801 | savelij | 426 | CALL WRITECMOS |
| 427 | POP AF |
||
| 1186 | savelij | 428 | AND CMOS_EC.M_CLOCK_VIEW |
| 801 | savelij | 429 | JP Z,MAINLOP |
| 430 | LD HL,TIME_OFF |
||
| 999 | savelij | 431 | RST8 _PRINT_MESSAGE |
| 801 | savelij | 432 | JP MAINLOP |
| 433 | |||
| 1026 | savelij | 434 | ;祭/몫祭 |
| 801 | savelij | 435 | MOUSE_ONOFF LD HL,ERS_FLAGS |
| 436 | LD A,(HL) |
||
| 1026 | savelij | 437 | XOR M_MOUSE_ON ; ⮡ࠦ |
| 801 | savelij | 438 | LD (HL),A |
| 439 | AND M_MOUSE_ON |
||
| 1026 | savelij | 440 | CALL NZ,DETECTMOUSE ; 稫, 塞 稥 |
| 441 | CALL NC,REST2X2 ; , 몫砥 ⮡ࠦ |
||
| 801 | savelij | 442 | JP MAINLOP |
| 443 | |||
| 1026 | savelij | 444 | ; 祣- 訡 |
| 445 | EXIT4ERROR RES 5,(IY+1) ; 祣 |
||
| 801 | savelij | 446 | LD BC,MOUSE_KEYS |
| 447 | IN D,(C) |
||
| 448 | E4E1 CALL PRINTTIME |
||
| 449 | EI |
||
| 450 | HALT |
||
| 451 | BIT 5,(IY+1) |
||
| 452 | JR NZ,E4E3 |
||
| 453 | LD A,(ERS_FLAGS) |
||
| 454 | AND M_MOUSE_ON |
||
| 455 | JR NZ,E4E1 |
||
| 456 | LD A,HIGH (MOUSE_KEYS) |
||
| 457 | IN A,(LOW (MOUSE_KEYS)) |
||
| 458 | CP D |
||
| 459 | JR Z,E4E1 |
||
| 460 | E4E2 EX AF,AF' |
||
| 461 | CALL TIMELP |
||
| 462 | EX AF,AF' |
||
| 463 | RRA |
||
| 464 | RET |
||
| 465 | |||
| 466 | E4E3 XOR A |
||
| 1186 | savelij | 467 | IN A,(0xFE) |
| 801 | savelij | 468 | CPL |
| 1026 | savelij | 469 | AND 0x1F |
| 801 | savelij | 470 | JR NZ,E4E3 |
| 471 | LD (LAST_K),A |
||
| 1026 | savelij | 472 | RES 5,(IY+1) ; 祣 |
| 801 | savelij | 473 | RET |
| 474 | |||
| 1026 | savelij | 475 | ; ⥪饣 ࠭ |
| 801 | savelij | 476 | PRT_DRV_SYM LD A,(TRD_5CF8) |
| 477 | ADD A,"A" |
||
| 478 | LD (TXT_DRIVE),A |
||
| 479 | LD HL,TRDDRV_MODE |
||
| 999 | savelij | 480 | RST8 _PRINT_MESSAGE |
| 801 | savelij | 481 | RET |
| 482 | |||
| 1026 | savelij | 483 | ; ᯥ⪠ ⥪饣 ० |
| 801 | savelij | 484 | PRT_MODES LD HL,SPEED_MODE |
| 999 | savelij | 485 | RST8 _PRINT_MESSAGE |
| 801 | savelij | 486 | LD HL,MEM_MODE |
| 999 | savelij | 487 | RST8 _PRINT_MESSAGE |
| 801 | savelij | 488 | LD HL,EMUTAPLOAD |
| 999 | savelij | 489 | RST8 _PRINT_MESSAGE |
| 801 | savelij | 490 | LD HL,SET_RESET |
| 999 | savelij | 491 | RST8 _PRINT_MESSAGE |
| 801 | savelij | 492 | LD HL,ROMLOADFONT |
| 999 | savelij | 493 | RST8 _PRINT_MESSAGE |
| 801 | savelij | 494 | LD HL,TYPESFONT |
| 999 | savelij | 495 | RST8 _PRINT_MESSAGE |
| 801 | savelij | 496 | LD HL,TXT_AUTOMOUNT |
| 999 | savelij | 497 | RST8 _PRINT_MESSAGE |
| 801 | savelij | 498 | RET |
| 499 | |||
| 1026 | savelij | 500 | ; ᯥ⪠ ⥪饣 㠫쭮 |
| 999 | savelij | 501 | PRT_VIRTDRV |
| 502 | RST8 _MOUNTER,_GET_VIRT_BITS |
||
| 888 | savelij | 503 | LD D,A |
| 1186 | savelij | 504 | LD H,CMOS.VIRT_REAL_DRIVE |
| 888 | savelij | 505 | CALL READCMOS |
| 801 | savelij | 506 | AND 3 |
| 834 | savelij | 507 | LD B,A |
| 508 | INC B |
||
| 835 | savelij | 509 | ADD A,'A' |
| 510 | LD C,A |
||
| 888 | savelij | 511 | LD A,%10000000 |
| 834 | savelij | 512 | .L1 RLCA |
| 513 | DJNZ .L1 |
||
| 888 | savelij | 514 | AND D |
| 801 | savelij | 515 | LD HL,VIRT_DRIVE |
| 516 | JR NZ,PRTVIRTDRV2 |
||
| 517 | LD (HL)," " |
||
| 518 | INC HL |
||
| 519 | LD (HL),C |
||
| 520 | INC HL |
||
| 521 | LD (HL)," " |
||
| 522 | JR PRTVIRTDRV1 |
||
| 523 | |||
| 524 | PRTVIRTDRV2 LD (HL),"o" |
||
| 525 | INC HL |
||
| 526 | LD (HL),"f" |
||
| 527 | INC HL |
||
| 528 | LD (HL),"f" |
||
| 529 | PRTVIRTDRV1 LD HL,VIRTUAL_DRV |
||
| 999 | savelij | 530 | RST8 _PRINT_MESSAGE |
| 801 | savelij | 531 | LD HL,ADR_CAT |
| 999 | savelij | 532 | RST8 _MOUNTER,_GET_MOUNTED |
| 801 | savelij | 533 | LD HL,ADR_CAT |
| 534 | LD DE,MNT_DRV_A |
||
| 535 | CALL COPY_MNTNAME |
||
| 1026 | savelij | 536 | LD L,0x40 |
| 801 | savelij | 537 | LD DE,MNT_DRV_B |
| 538 | CALL COPY_MNTNAME |
||
| 1026 | savelij | 539 | LD L,0x80 |
| 801 | savelij | 540 | LD DE,MNT_DRV_C |
| 541 | CALL COPY_MNTNAME |
||
| 1026 | savelij | 542 | LD L,0xC0 |
| 801 | savelij | 543 | LD DE,MNT_DRV_D |
| 544 | CALL COPY_MNTNAME |
||
| 545 | CALL GET_RAMD_NAME |
||
| 546 | LD HL,MOUNTED_DRV |
||
| 999 | savelij | 547 | RST8 _PRINT_MESSAGE |
| 801 | savelij | 548 | RET |
| 549 | |||
| 550 | COPY_MNTNAME PUSH HL |
||
| 551 | LD A,(HL) |
||
| 552 | AND A |
||
| 553 | JR NZ,COPY_MNTNAME1 |
||
| 554 | LD HL,TXT_NONE |
||
| 1026 | savelij | 555 | LD BC,0x0C |
| 801 | savelij | 556 | JR COPY_MNTNAME3 |
| 557 | |||
| 558 | COPY_MNTNAME1 LD BC,8 |
||
| 559 | LDIR |
||
| 560 | LD A,"." |
||
| 561 | LD (DE),A |
||
| 562 | INC DE |
||
| 563 | LD C,3 |
||
| 564 | COPY_MNTNAME3 LDIR |
||
| 565 | POP HL |
||
| 566 | RET |
||
| 567 | |||
| 1026 | savelij | 568 | ; 祭 䠩 㦥 ࠬ |
| 999 | savelij | 569 | GET_RAMD_NAME |
| 570 | PEC_ON M_SHADOW_BF |
||
| 801 | savelij | 571 | LD BC,WIN_P2 |
| 572 | LD A,RAM_RAMDISK |
||
| 573 | OUT (C),A |
||
| 1026 | savelij | 574 | LD DE,CPU2+0x3DFF |
| 801 | savelij | 575 | LD A,(DE) |
| 576 | AND A |
||
| 577 | JR Z,GRN1 |
||
| 578 | LD HL,GRN1 |
||
| 579 | PUSH HL |
||
| 580 | LD HL,IN_RAMDISK |
||
| 581 | LD B,8 |
||
| 582 | CALL GRN2 |
||
| 583 | LD B,3 |
||
| 584 | LD (HL),"." |
||
| 585 | INC HL |
||
| 586 | GRN2 LD A,(DE) |
||
| 587 | LD (HL),A |
||
| 588 | DEC D |
||
| 589 | INC HL |
||
| 590 | DJNZ GRN2 |
||
| 591 | RET |
||
| 592 | |||
| 593 | GRN1 LD BC,WIN_P2 |
||
| 1026 | savelij | 594 | LD A,ZXSTD_CPU2 |
| 801 | savelij | 595 | OUT (C),A |
| 999 | savelij | 596 | PEC_OFF M_SHADOW_BF |
| 801 | savelij | 597 | RET |
| 598 | |||
| 1026 | savelij | 599 | ; 뢮 ᭮ ᥩ |
| 801 | savelij | 600 | S_FACE LD A,7 |
| 601 | CALL CLS |
||
| 602 | LD HL,TXTFULLSCR |
||
| 999 | savelij | 603 | RST8 _PRINT_MESSAGE |
| 604 | RST8 _VERSION |
||
| 977 | savelij | 605 | BIT B_INCORRECTFPGA,A |
| 606 | JR Z,.L1 |
||
| 607 | RES B_INCORRECTFPGA,A |
||
| 608 | AND A |
||
| 609 | JR Z,.L1 |
||
| 610 | LD HL,INCORRECTFPGA |
||
| 999 | savelij | 611 | RST8 _PRINT_MESSAGE |
| 1026 | savelij | 612 | .L1 CALL PRT_DRV_SYM ; ⥪饣 |
| 613 | CALL PRT_MODES ; ⥪饣 ० |
||
| 614 | CALL PRT_VIRTDRV ; ⥪饣 㠫쭮 |
||
| 801 | savelij | 615 | XOR A |
| 1026 | savelij | 616 | JP DRAW_KOSHAK ; 뢮 0 䠧 蠪 |
| 801 | savelij | 617 | |
| 618 | SET_EFF7_A_ LD A,(SYSREG1) |
||
| 619 | SET_EFF7 LD BC,PENT_CONF |
||
| 620 | OUT (C),A |
||
| 621 | RET |
||
| 622 | |||
| 1026 | savelij | 623 | SET_7FFD_0 LD A,0x10 |
| 801 | savelij | 624 | SET_7FFD PUSH BC |
| 625 | LD BC,CONF_128 |
||
| 626 | OUT (C),A |
||
| 627 | POP BC |
||
| 628 | RET |
||
| 629 | |||
| 630 | MEMSET CALL CLEAR_128K |
||
| 1026 | savelij | 631 | LD A,(TURBO_NUM) ; ⠭ TURBO ० |
| 801 | savelij | 632 | AND A |
| 1026 | savelij | 633 | LD DE,0x10A3 ; 3,5MHZ ports EFF7 BIT4=1 xx77 BIT3=0 |
| 801 | savelij | 634 | JR Z,MEMSET01 |
| 635 | DEC A |
||
| 1026 | savelij | 636 | LD DE,0xA3 ; 7MHZ ports EFF7 BIT4=0 xx77 BIT3=0 |
| 801 | savelij | 637 | JR Z,MEMSET01 |
| 1026 | savelij | 638 | LD DE,0x10AB ; 14MHZ ports EFF7 BIT4=1 xx77 BIT3=1 |
| 639 | MEMSET01 LD BC,0xFF77 |
||
| 999 | savelij | 640 | PEC_ON M_SHADOW_BF |
| 801 | savelij | 641 | OUT (C),E |
| 999 | savelij | 642 | PEC_OFF M_SHADOW_BF |
| 801 | savelij | 643 | LD A,D |
| 644 | CALL SET_EFF7 |
||
| 645 | LD A,(MEMMODE) |
||
| 646 | AND A |
||
| 1026 | savelij | 647 | RET Z ; ० |
| 801 | savelij | 648 | MEMSET1 DEC A |
| 649 | JR Z,MEMORY48 |
||
| 1026 | savelij | 650 | ; 祭 ० BASIC128 |
| 801 | savelij | 651 | ON_BIT128 LD A,(SYSREG1) |
| 1026 | savelij | 652 | AND 0x10 |
| 801 | savelij | 653 | ADD A,4 |
| 654 | CALL SET_EFF7 |
||
| 655 | JR SET_7FFD_0 |
||
| 656 | |||
| 1026 | savelij | 657 | ; 祭 ० BASI48 |
| 801 | savelij | 658 | MEMORY48 CALL ON_BIT128 |
| 1026 | savelij | 659 | LD A,0x30 |
| 801 | savelij | 660 | JR SET_7FFD |
| 661 | |||
| 1026 | savelij | 662 | ; ⥭ CMOS ᮮ饭 뢮 ࠭ ⠭ ० |
| 1186 | savelij | 663 | SET_MODES LD H,CMOS.REG_B ; ० ᮢ |
| 801 | savelij | 664 | CALL READCMOS |
| 1186 | savelij | 665 | RES CMOSREG.B_B_RW_DM,L ; ਭ㤨⥫쭮 砥 |
| 1026 | savelij | 666 | CALL WRITECMOS ; ࠭塞 |
| 1186 | savelij | 667 | LD H,CMOS.BYTE_01 ; ⠥ ⠭ |
| 801 | savelij | 668 | CALL READCMOS |
| 1186 | savelij | 669 | AND CMOS_EC.M_TURBO357 |
| 801 | savelij | 670 | RRCA |
| 671 | RRCA |
||
| 672 | RRCA |
||
| 1026 | savelij | 673 | LD (SYSREG1),A ; ᮤন EFF7 |
| 801 | savelij | 674 | LD B,A |
| 675 | LD A,L |
||
| 1186 | savelij | 676 | AND CMOS_EC._128K | CMOS_EC._48K | CMOS_EC._1MB |
| 1026 | savelij | 677 | LD (MEMMODE),A ; ࠭ ० |
| 1186 | savelij | 678 | LD H,CMOS.BYTE_00 |
| 1026 | savelij | 679 | CALL READCMOS ; ⠥ ᭮ ⠭ |
| 801 | savelij | 680 | LD C,A |
| 1186 | savelij | 681 | AND CMOS_ED.M_TURBO14 |
| 1026 | savelij | 682 | LD HL,TURBO_NUM ; ० |
| 683 | LD (HL),2 ; ० 14 |
||
| 801 | savelij | 684 | JR NZ,SETMODES04 |
| 685 | LD A,B |
||
| 1026 | savelij | 686 | DEC (HL) ; ० 7 |
| 687 | AND 0x10 |
||
| 801 | savelij | 688 | JR Z,SETMODES04 |
| 1026 | savelij | 689 | DEC (HL) ; ० 3,5 |
| 690 | SETMODES04 LD A,(HL) ; ⥪騩 ० |
||
| 801 | savelij | 691 | ADD A,A |
| 692 | ADD A,A |
||
| 693 | LD E,A |
||
| 694 | LD D,0 |
||
| 1026 | savelij | 695 | LD HL,TXTTURBOMODE ; ⥪ ० |
| 696 | ADD HL,DE ; 諨 㦭 ⥪ |
||
| 801 | savelij | 697 | LD DE,TXT_SPEED |
| 698 | LD A,C |
||
| 699 | LDI |
||
| 700 | LDI |
||
| 701 | LDI |
||
| 1026 | savelij | 702 | LDI ; ७ 뢮 ࠭ |
| 801 | savelij | 703 | LD C,A |
| 1186 | savelij | 704 | AND CMOS_ED.M_EMUL_TAPE |
| 801 | savelij | 705 | LD HL,EMTAPLOAD |
| 1026 | savelij | 706 | CALL SET_ONOFF ; ७ ᨬ 뢮 ࠭, ON OFF |
| 801 | savelij | 707 | LD A,C |
| 1186 | savelij | 708 | AND CMOS_ED.M_RELOAD_FONT |
| 709 | XOR CMOS_ED.M_RELOAD_FONT |
||
| 801 | savelij | 710 | LD HL,EROMLOADFONT |
| 1026 | savelij | 711 | CALL SET_ONOFF ; ७ ᨬ 뢮 ࠭, ON OFF |
| 801 | savelij | 712 | LD A,C |
| 1186 | savelij | 713 | AND CMOS_ED.M_TYPE_FONT |
| 801 | savelij | 714 | PUSH BC |
| 715 | LD HL,TXTMODTYPE |
||
| 716 | LD BC,5 |
||
| 717 | JR Z,SET_FONT2 |
||
| 718 | ADD HL,BC |
||
| 719 | SET_FONT2 LD DE,ETYPESFONT |
||
| 720 | LDIR |
||
| 721 | POP BC |
||
| 722 | LD A,C |
||
| 1186 | savelij | 723 | AND CMOS_EC.MKOL_MODES |
| 724 | CP CMOS_EC.KOL_MODES |
||
| 801 | savelij | 725 | JR C,SETMODES03 |
| 726 | XOR A |
||
| 727 | SETMODES03 LD L,A |
||
| 728 | ADD A,A |
||
| 729 | ADD A,L |
||
| 730 | ADD A,A |
||
| 731 | ADD A,A |
||
| 732 | LD H,0 |
||
| 733 | LD L,A |
||
| 734 | LD DE,TXT_RESETTO |
||
| 735 | ADD HL,DE |
||
| 736 | LD DE,TXT_RESET |
||
| 737 | LD A,C |
||
| 1026 | savelij | 738 | LD BC,0x0C |
| 801 | savelij | 739 | LDIR |
| 740 | LD C,A |
||
| 1186 | savelij | 741 | AND CMOS_ED.M_PRINTER_AY |
| 801 | savelij | 742 | LD HL,ETXT_AYPRINTER |
| 1026 | savelij | 743 | CALL SET_ONOFF ; ७ ᨬ 뢮 ࠭, ON OFF |
| 801 | savelij | 744 | SETMODES02 LD A,(MEMMODE) |
| 745 | AND A |
||
| 746 | LD HL,T_ALL |
||
| 1026 | savelij | 747 | JR Z,SETMODES01 ; all memory |
| 801 | savelij | 748 | LD HL,T_48 |
| 749 | DEC A |
||
| 1026 | savelij | 750 | JR Z,SETMODES01 ; 48K |
| 751 | LD HL,T_128 ; 128K |
||
| 752 | SETMODES01 LD DE,TXT_MEM ; ० |
||
| 801 | savelij | 753 | LD A,C |
| 754 | LD BC,3 |
||
| 755 | LDIR |
||
| 1186 | savelij | 756 | LD H,CMOS.BYTE_01 |
| 801 | savelij | 757 | CALL READCMOS |
| 758 | PUSH AF |
||
| 1186 | savelij | 759 | AND CMOS_EC.M_AUTOMOUNT |
| 801 | savelij | 760 | LD HL,ETXT_AUTOMOUNT |
| 761 | CALL SET_ONOFF |
||
| 762 | POP AF |
||
| 1026 | savelij | 763 | ; १ HONEY COMANDER |
| 1186 | savelij | 764 | AND CMOS_EC.M_REZIDENT |
| 801 | savelij | 765 | LD HL,TXT_REZIDENT |
| 766 | CALL SET_ONOFF |
||
| 1186 | savelij | 767 | LD H,CMOS.BYTE_03 |
| 838 | savelij | 768 | CALL READCMOS |
| 1186 | savelij | 769 | AND CMOS_E9.M_KILL_REZIDENT |
| 838 | savelij | 770 | LD HL,TXT_KILLREZID |
| 771 | CALL SET_ONOFF |
||
| 801 | savelij | 772 | LD A,(ERS_FLAGS) |
| 773 | AND M_CLOCK_ON |
||
| 774 | RET Z |
||
| 775 | LD DE,VERS_CONF |
||
| 776 | LD L,0 |
||
| 1026 | savelij | 777 | CALL GET_VERS_EVO ; 䨣樨 |
| 801 | savelij | 778 | LD DE,VERS_BOOT |
| 779 | LD L,1 |
||
| 1026 | savelij | 780 | JP GET_VERS_EVO ; AVRBOOT |
| 801 | savelij | 781 | |
| 1026 | savelij | 782 | ; ७ ᨬ 뢮 ࠭, ON OFF |
| 801 | savelij | 783 | SET_ONOFF LD DE,"n " |
| 784 | JR NZ,SET_ONOFF1 |
||
| 785 | LD DE,"ff" |
||
| 786 | SET_ONOFF1 LD (HL),D |
||
| 787 | INC HL |
||
| 788 | LD (HL),E |
||
| 789 | RET |
||
| 790 | |||
| 1026 | savelij | 791 | TURBO_7MHZ LD E,0xA3 |
| 792 | LD BC,0xFF77 |
||
| 999 | savelij | 793 | PEC_ON M_SHADOW_BF |
| 801 | savelij | 794 | OUT (C),E |
| 999 | savelij | 795 | PEC_OFF M_SHADOW_BF |
| 801 | savelij | 796 | XOR A |
| 797 | JP SET_EFF7 |
||
| 798 | |||
| 1026 | savelij | 799 | IF 1 |
| 800 | ; BC=BC/DE |
||
| 801 | DIVIDE16 LD HL,0 |
||
| 802 | LD A,0x11 |
||
| 803 | .L1 RL C |
||
| 804 | RL B |
||
| 805 | DEC A |
||
| 806 | RET Z |
||
| 807 | ADC HL,HL |
||
| 808 | JR NC,.L2 |
||
| 809 | OR A |
||
| 810 | SBC HL,DE |
||
| 811 | JR .L1 |
||
| 812 | |||
| 813 | .L2 SBC HL,DE |
||
| 814 | JR NC,.L3 |
||
| 815 | ADD HL,DE |
||
| 816 | .L3 CCF |
||
| 817 | JR .L1 |
||
| 818 | |||
| 819 | MULT PUSH BC |
||
| 820 | LD A,B |
||
| 821 | LD HL,0 |
||
| 822 | LD B,0x10 |
||
| 823 | .L1 ADD HL,HL |
||
| 824 | RL C |
||
| 825 | RLA |
||
| 826 | JR NC,.L2 |
||
| 827 | ADD HL,DE |
||
| 828 | JR NC,.L2 |
||
| 829 | INC C |
||
| 830 | JR NZ,.L2 |
||
| 831 | INC A |
||
| 832 | .L2 DJNZ .L1 |
||
| 833 | EX DE,HL |
||
| 834 | LD L,C |
||
| 835 | LD H,A |
||
| 836 | POP BC |
||
| 837 | RET |
||
| 838 | ENDIF |
||
| 839 | |||
| 840 | IF 0 |
||
| 841 | ;============================= |
||
| 842 | ; 16-bit multiply |
||
| 843 | ; Tim Paterson |
||
| 844 | ;============================= |
||
| 845 | MULTIPLY16 ld hl,0 |
||
| 846 | MUL_HLBC_DE ld a,b |
||
| 847 | ld b,0x11 |
||
| 848 | jr .l1 |
||
| 849 | |||
| 850 | .l2 jr nc,.l3 |
||
| 851 | add hl,de |
||
| 852 | .l3 rr h |
||
| 853 | rr l |
||
| 854 | .l1 rra |
||
| 855 | rr c |
||
| 856 | djnz .l2 |
||
| 857 | ld b,a |
||
| 858 | ret |
||
| 859 | |||
| 860 | ;============================= |
||
| 861 | ; 16-bit divide |
||
| 862 | ; Tim Paterson |
||
| 863 | ;============================= |
||
| 864 | ; HLBC DE |
||
| 865 | ; 室 HL - ⮪, BC - ⭮ |
||
| 866 | DIVIDE16 ld hl,0 |
||
| 867 | DIV_HLBC_DE ld a,b |
||
| 868 | ld b,0x10 |
||
| 869 | rl c |
||
| 870 | rla |
||
| 871 | .l1 rl l |
||
| 872 | rl h |
||
| 873 | jr c,.l2 |
||
| 874 | sbc hl,de |
||
| 875 | jr nc,.l3 |
||
| 876 | add hl,de |
||
| 877 | .l3 ccf |
||
| 878 | .l4 rl c |
||
| 879 | rla |
||
| 880 | djnz .l1 |
||
| 881 | ld b,a |
||
| 882 | ret |
||
| 883 | |||
| 884 | .l2 or a |
||
| 885 | sbc hl,de |
||
| 886 | jr .l4 |
||
| 887 | ENDIF |
||
| 888 | |||
| 1047 | savelij | 889 | include conf_down.a80 |
| 1026 | savelij | 890 | include menu_execute.a80 |
| 891 | include call_cmos.a80 |
||
| 801 | savelij | 892 | include menu_data.a80 |
| 1026 | savelij | 893 | include fat_boot.a80 |
| 801 | savelij | 894 | include mouse.a80 |
| 895 | include window.a80 |
||
| 896 | include call_trdos.a80 |
||
| 897 | include koshak.a80 |
||
| 898 | include pc_keys_test.a80 |
||
| 899 | include bmp_view.a80 |
||
| 1047 | savelij | 900 | include conf_up.a80 |
| 1067 | savelij | 901 | include flasher.a80 |
| 801 | savelij | 902 | |
| 1026 | savelij | 903 | KOSHAK binclude kot_anim.bin,9 |
| 904 | ICON binclude icon.bin,9 |
||
| 905 | |||
| 906 | BAS_VAR binclude bas_var.bin |
||
| 907 | EBAS_VAR |
||
| 908 | |||
| 801 | savelij | 909 | CLEAR_128K DI |
| 910 | LD HL,0 |
||
| 1026 | savelij | 911 | LD A,0x17 |
| 801 | savelij | 912 | CALL CLEAR128K0 |
| 1026 | savelij | 913 | LD A,0x16 |
| 801 | savelij | 914 | CALL CLEAR128K0 |
| 1026 | savelij | 915 | LD A,0x14 |
| 801 | savelij | 916 | CALL CLEAR128K0 |
| 1026 | savelij | 917 | LD A,0x13 |
| 801 | savelij | 918 | CALL CLEAR128K0 |
| 1026 | savelij | 919 | LD A,0x11 |
| 801 | savelij | 920 | CALL CLEAR128K0 |
| 1026 | savelij | 921 | LD A,0x10 |
| 801 | savelij | 922 | CLEAR128K0 LD (TEMP_SAVE_SP),SP |
| 923 | LD BC,CONF_128 |
||
| 924 | OUT (C),A |
||
| 925 | LD SP,0 |
||
| 1026 | savelij | 926 | LD B,0x80 |
| 801 | savelij | 927 | CLEAR128K1 REPT 64 |
| 928 | PUSH HL |
||
| 929 | ENDM |
||
| 930 | DJNZ CLEAR128K1 |
||
| 931 | LD SP,0 |
||
| 932 | TEMP_SAVE_SP EQU $-2 |
||
| 933 | RET |
||
| 934 | |||
| 1026 | savelij | 935 | ; ⠭ ६ ᨪ म, ⠭ ࠭ |
| 801 | savelij | 936 | SYSTEM LD HL,BAS_VAR |
| 937 | LD DE,KSTATE0 |
||
| 938 | LD BC,EBAS_VAR-BAS_VAR |
||
| 1026 | savelij | 939 | LDIR ; ⠭ ⠭ ६ BASIC TR-DOS |
| 940 | GET_DRV_SYM LD A,(ERS_FLAGS) ; 塞 稥 |
||
| 801 | savelij | 941 | AND M_CLOCK_ON |
| 942 | JR Z,SET_DRIVE |
||
| 1186 | savelij | 943 | LD H,CMOS.VIRT_REAL_DRIVE |
| 801 | savelij | 944 | CALL READCMOS |
| 945 | RRCA |
||
| 946 | RRCA |
||
| 947 | AND 3 |
||
| 1026 | savelij | 948 | SETUP_DRIVE LD (DRV_SYM),A ; ⠭ ࠭ ॠ쭮 |
| 949 | SET_DRIVE LD A,(DRV_SYM) ; ⥬ ६ ᪠ |
||
| 801 | savelij | 950 | LD (TRD_5D19),A |
| 951 | LD (TRD_5CF6),A |
||
| 952 | LD L,A |
||
| 953 | LD H,A |
||
| 954 | LD (TRD_5CF8),HL |
||
| 1026 | savelij | 955 | OR 0x3C |
| 801 | savelij | 956 | LD (TRD_5D16),A |
| 957 | RET |
||
| 958 | |||
| 1186 | savelij | 959 | GLUDIN LD H,CMOS.BYTE_01 |
| 801 | savelij | 960 | CALL READCMOS |
| 1186 | savelij | 961 | AND CMOS_EC.M_SOUNDKEYS |
| 801 | savelij | 962 | RET Z |
| 1026 | savelij | 963 | LD HL,DIN+0x0D |
| 964 | LD A,0x0D |
||
| 965 | GLUDIN1 LD BC,0xFFFD |
||
| 801 | savelij | 966 | OUT (C),A |
| 1026 | savelij | 967 | LD B,0xBF |
| 801 | savelij | 968 | OUTD |
| 969 | SUB 1 |
||
| 970 | JR NC,GLUDIN1 |
||
| 971 | RET |
||
| 972 | |||
| 1186 | savelij | 973 | SHUT2AY LD H,CMOS.BYTE_01 |
| 801 | savelij | 974 | CALL READCMOS |
| 1186 | savelij | 975 | AND CMOS_EC.M_SOUNDKEYS |
| 801 | savelij | 976 | RET Z |
| 1026 | savelij | 977 | LD DE,0x0E00 |
| 801 | savelij | 978 | SHUT2AY1 DEC D |
| 979 | LD H,D |
||
| 980 | LD L,E |
||
| 981 | CALL SHUT2AY2 |
||
| 1026 | savelij | 982 | JR NZ,SHUT2AY1 ; |
| 983 | LD HL,0x073F |
||
| 984 | SHUT2AY2 LD BC,0xFFFD |
||
| 801 | savelij | 985 | OUT (C),H |
| 1026 | savelij | 986 | LD B,0xBF |
| 801 | savelij | 987 | OUT (C),L |
| 988 | RET |
||
| 989 | |||
| 990 | TIMELP CALL PRINTTIME |
||
| 991 | LD A,HIGH (MOUSE_KEYS) |
||
| 1026 | savelij | 992 | IN A,(LOW (MOUSE_KEYS)) ; |
| 801 | savelij | 993 | CPL |
| 994 | AND 7 |
||
| 1026 | savelij | 995 | JR NZ,TIMELP ; |
| 801 | savelij | 996 | RET |
| 997 | |||
| 1026 | savelij | 998 | ; PERFECT COMMANDER |
| 801 | savelij | 999 | PERFECT DI |
| 1026 | savelij | 1000 | LD SP,0xC000 |
| 999 | savelij | 1001 | PEC_ON M_SHADOW_BF |
| 801 | savelij | 1002 | LD BC,WIN_A0 |
| 1003 | LD A,ROM_RST81 |
||
| 1004 | OUT (C),A |
||
| 1005 | LD HL,(ADR_PERFECT) |
||
| 1026 | savelij | 1006 | LD DE,0x5B00 |
| 801 | savelij | 1007 | CALL UNPACK |
| 1008 | LD BC,WIN_A0 |
||
| 1026 | savelij | 1009 | LD A,0x83 |
| 801 | savelij | 1010 | OUT (C),A |
| 999 | savelij | 1011 | PEC_OFF M_SHADOW_BF |
| 1026 | savelij | 1012 | LD A,0xC9 |
| 1013 | LD (0x66D2),A |
||
| 1014 | LD SP,0x5FE4 |
||
| 1015 | JP 0x8A1D |
||
| 801 | savelij | 1016 | |
| 1017 | ISDOS_BOOT LD HL,ISDOS_BOOT1 |
||
| 1026 | savelij | 1018 | LD DE,0x5E00 |
| 801 | savelij | 1019 | LD BC,ISDOS_BOOT2-ISDOS_BOOT1 |
| 1020 | LDIR |
||
| 1026 | savelij | 1021 | JP 0x5E00 |
| 801 | savelij | 1022 | |
| 1023 | include hdd_detect.a80 |
||
| 1024 | |||
| 1025 | ISDOS_BOOT1 include isdos_boot.a80 |
||
| 1026 | ISDOS_BOOT2 |
||
| 1027 | |||
| 1026 | savelij | 1028 | SEL_FAT_DRV ; ᮧ ⥪, ᮢ 뢮 ᯨ᪠ 롮 ࠧ FAT |