diff --git a/OperatingSystem/iictest/test.asm b/OperatingSystem/iictest/test.asm index d88e00b..590875a 100644 --- a/OperatingSystem/iictest/test.asm +++ b/OperatingSystem/iictest/test.asm @@ -53,7 +53,7 @@ TermInit_copy_loop: ld hl, TmsFont call TmsTextMode ; initialize text mode - ld a, TmsDarkGreen ; set colors + ld a, TmsDarkRed ; set colors call TmsBackground ld a, TmsWhite call TmsTextColor diff --git a/OperatingSystem/iictest/zout/test.bin b/OperatingSystem/iictest/zout/test.bin index cd9762f..dcd4542 100644 Binary files a/OperatingSystem/iictest/zout/test.bin and b/OperatingSystem/iictest/zout/test.bin differ diff --git a/OperatingSystem/iictest/zout/test.hex b/OperatingSystem/iictest/zout/test.hex index 72ba4cc..e7d4980 100644 --- a/OperatingSystem/iictest/zout/test.hex +++ b/OperatingSystem/iictest/zout/test.hex @@ -1,6 +1,6 @@ :10800000CD0880C90104000021E04001048011E492 :10801000400A770323E5ED52E1C21180CDF18121C1 -:10802000E084CD37833E0CCD9C823E0FCD4D843E07 +:10802000E084CD37833E06CD9C823E0FCD4D843E0D :10803000001E00CD6084216981CD77843E001E043E :10804000CD6084C93AE1405F3AE040CD6084C9F533 :10805000C50AF6002807CD608003C35180C1F1C96D diff --git a/OperatingSystem/iictest/zout/test.lst b/OperatingSystem/iictest/zout/test.lst index e7be74a..69becb5 100644 --- a/OperatingSystem/iictest/zout/test.lst +++ b/OperatingSystem/iictest/zout/test.lst @@ -4,27 +4,27 @@ 2: ;Do not make any changes here! 3: 4: - 00D0 ADDR_RTC equ 0xD0 - 5: - 014F A_RTS_OFF equ 0x14F - 6: - 0158 A_RTS_ON equ 0x158 + 5: - 0152 A_RTS_OFF equ 0x152 + 6: - 015B A_RTS_ON equ 0x15B 7: - 0050 BOOT_PHASE0 equ 0x50 8: - 006E BOOT_PHASE1 equ 0x6E 9: - 0077 BOOT_PHASE1_LOOP equ 0x77 10: - 0082 BOOT_PHASE2 equ 0x82 - 11: - 11CD COMMAND equ 0x11CD - 12: - 1208 COMMAND_BACKSPACE equ 0x1208 - 13: - 1166 COMMAND_LUT equ 0x1166 - 14: - 122E COMMAND_PROCESS equ 0x122E - 15: - 1269 COMMAND_PROCESS_FOUND equ 0x1269 - 16: - 1231 COMMAND_PROCESS_LOOP equ 0x1231 - 17: - 123A COMMAND_PROCESS_LOOP_STR1 equ 0x123A - 18: - 1250 COMMAND_PROCESS_LOOP_STR2 equ 0x1250 - 19: - 1255 COMMAND_PROCESS_NEXT_ENTRY equ 0x1255 - 20: - 1254 COMMAND_PROCESS_NEXT_ENTRYI equ 0x1254 - 21: - 1260 COMMAND_PROCESS_NOT_FOUND equ 0x1260 - 22: - 11D9 COMMAND_READ equ 0x11D9 - 23: - 009B CONSOLE_INIT equ 0x9B - 24: - 009B CONSOLE_INIT_CTC equ 0x9B - 25: - 00A3 CONSOLE_INIT_SIO equ 0xA3 + 11: - 17EB COMMAND equ 0x17EB + 12: - 1826 COMMAND_BACKSPACE equ 0x1826 + 13: - 176B COMMAND_LUT equ 0x176B + 14: - 184C COMMAND_PROCESS equ 0x184C + 15: - 1887 COMMAND_PROCESS_FOUND equ 0x1887 + 16: - 184F COMMAND_PROCESS_LOOP equ 0x184F + 17: - 1858 COMMAND_PROCESS_LOOP_STR1 equ 0x1858 + 18: - 186E COMMAND_PROCESS_LOOP_STR2 equ 0x186E + 19: - 1873 COMMAND_PROCESS_NEXT_ENTRY equ 0x1873 + 20: - 1872 COMMAND_PROCESS_NEXT_ENTRYI equ 0x1872 + 21: - 187E COMMAND_PROCESS_NOT_FOUND equ 0x187E + 22: - 17F7 COMMAND_READ equ 0x17F7 + 23: - 009E CONSOLE_INIT equ 0x9E + 24: - 009E CONSOLE_INIT_CTC equ 0x9E + 25: - 00A6 CONSOLE_INIT_SIO equ 0xA6 26: - 00F9 CS_APU_CTRL equ 0xF9 27: - 00F8 CS_APU_DATA equ 0xF8 28: - 0000 CS_BANK equ 0x00 @@ -45,18 +45,18 @@ 43: - 0008 CS_SIO_A_D equ 0x08 44: - 000B CS_SIO_B_C equ 0x0B 45: - 000A CS_SIO_B_D equ 0x0A - 46: - 0161 DHEX_TO_BYTE equ 0x161 - 47: - 017D DHEX_TO_BYTE_FAILED equ 0x17D - 48: - 127F ERR_SYNTAX equ 0x127F - 49: - 0D01 EXEC_RST_08 equ 0xD01 - 50: - 0D05 EXEC_RST_10 equ 0xD05 - 51: - 0D11 EXEC_RST_18 equ 0xD11 - 52: - 0181 HEX_TO_BIN equ 0x181 - 53: - 018F HEX_TO_BIN_2 equ 0x18F - 54: - 0196 HEX_TO_INVALID_2 equ 0x196 + 46: - 0164 DHEX_TO_BYTE equ 0x164 + 47: - 0180 DHEX_TO_BYTE_FAILED equ 0x180 + 48: - 189D ERR_SYNTAX equ 0x189D + 49: - 0D04 EXEC_RST_08 equ 0xD04 + 50: - 0D08 EXEC_RST_10 equ 0xD08 + 51: - 0D14 EXEC_RST_18 equ 0xD14 + 52: - 0184 HEX_TO_BIN equ 0x184 + 53: - 0192 HEX_TO_BIN_2 equ 0x192 + 54: - 0199 HEX_TO_INVALID_2 equ 0x199 55: - 00EC IDE_CMD_IDENT equ 0xEC 56: - 0020 IDE_CMD_READSEC equ 0x20 - 57: - 0E91 IDE_DEF_TABLE equ 0xE91 + 57: - 1275 IDE_DEV_TABLE equ 0x1275 58: - 0040 IDE_RD equ 0x40 59: - 0016 IDE_REG_ALTSTS equ 0x16 60: - 000F IDE_REG_CMDSTS equ 0x0F @@ -65,379 +65,413 @@ 63: - 0009 IDE_REG_ERROR equ 0x09 64: - 000D IDE_REG_HCYL equ 0x0D 65: - 000E IDE_REG_HEAD equ 0x0E - 66: - 000C IDE_REG_LCYL equ 0x0C - 67: - 000A IDE_REG_SECTOR equ 0x0A - 68: - 000B IDE_REG_SSECTOR equ 0x0B - 69: - 0080 IDE_RST equ 0x80 - 70: - 0020 IDE_WR equ 0x20 - 71: - 0001 IIC_CLK equ 0x01 - 72: - 0042 IIC_DATA equ 0x42 - 73: - 001B INT_VEC equ 0x1B - 74: - 402B IN_BUFFER equ 0x402B - 75: - 0040 IO_AY0_ADDR equ 0x40 - 76: - 0041 IO_AY0_DATA equ 0x41 - 77: - 0042 IO_AY1_ADDR equ 0x42 - 78: - 0043 IO_AY1_DATA equ 0x43 - 79: - 0020 IO_REG0 equ 0x20 - 80: - 0025 IO_RTC_AMPM equ 0x25 - 81: - 002D IO_RTC_CTR_D equ 0x2D - 82: - 002E IO_RTC_CTR_E equ 0x2E - 83: - 002F IO_RTC_CTR_F equ 0x2F - 84: - 0026 IO_RTC_DAY0 equ 0x26 - 85: - 0027 IO_RTC_DAY1 equ 0x27 - 86: - 0024 IO_RTC_HOUR equ 0x24 - 87: - 0022 IO_RTC_MIN0 equ 0x22 - 88: - 0023 IO_RTC_MIN1 equ 0x23 - 89: - 0028 IO_RTC_MON0 equ 0x28 - 90: - 0029 IO_RTC_MON1 equ 0x29 - 91: - 0020 IO_RTC_SEC0 equ 0x20 - 92: - 0021 IO_RTC_SEC1 equ 0x21 - 93: - 002C IO_RTC_WEEK equ 0x2C - 94: - 002B IO_RTC_YEAR1 equ 0x2B - 95: - 002A IO_RTC_YERR0 equ 0x2A - 96: - 5000 MEM_IDE_BASE equ 0x5000 - 97: - 5062 MEM_IDE_BUFFER equ 0x5062 - 98: - 5000 MEM_IDE_DEVICE equ 0x5000 - 99: - 5041 MEM_IDE_DEV_TABLE equ 0x5041 - 100: - 5002 MEM_IDE_PARTITION equ 0x5002 - 101: - 5006 MEM_IDE_POINTER equ 0x5006 - 102: - 5061 MEM_IDE_SELECTED equ 0x5061 - 103: - 5001 MEM_IDE_STATUS equ 0x5001 - 104: - 0147 MSG_CLEAR equ 0x147 - 105: - 1278 NOT_IMPLEMENTED equ 0x1278 - 106: - 12DA OP_CALL equ 0x12DA - 107: - 146E OP_CLR equ 0x146E - 108: - 135B OP_DASM equ 0x135B - 109: - 12FA OP_DUMP equ 0x12FA - 110: - 12C1 OP_EXEC equ 0x12C1 - 111: - 1422 OP_IIC_IN equ 0x1422 - 112: - 13C2 OP_IIC_OUT equ 0x13C2 - 113: - 138B OP_IO_IN equ 0x138B - 114: - 13A1 OP_IO_OUT equ 0x13A1 - 115: - 1472 OP_RTIME equ 0x1472 - 116: - 132A OP_SET equ 0x132A - 117: - 160A OP_STIME equ 0x160A - 118: - 16B8 POST_CHECK_APU equ 0x16B8 - 119: - 16E3 POST_CHECK_IDE_30 equ 0x16E3 - 120: - 16F7 POST_CHECK_IDE_40 equ 0x16F7 - 121: - 1693 POST_CHECK_PIO equ 0x1693 - 122: - 1683 POST_START equ 0x1683 - 123: - 1712 POST_TEST_RTC equ 0x1712 - 124: - 4110 PRG_RAM_START equ 0x4110 - 125: - FF00 PRG_RAM_TOP equ 0xFF00 - 126: - 4000 PROG_MEM_START equ 0x4000 - 127: - 0100 PROG_ROM_START equ 0x100 - 128: - 0000 RST_00 equ 0x00 - 129: - 0008 RST_08 equ 0x08 - 130: - 0010 RST_10 equ 0x10 - 131: - 0018 RST_18 equ 0x18 - 132: - FFFF STACK_RAM_TOP equ 0xFFFF - 133: - 0000 START_ROM equ 0x00 - 134: - 0198 STRCONV_BYTES_TO_HEX equ 0x198 - 135: - 01A7 STRCONV_BYTES_TO_HEX_1 equ 0x1A7 - 136: - 01B1 STRCONV_BYTES_TO_HEX_2 equ 0x1B1 - 137: - 1817 STR_Banner_Start equ 0x1817 - 138: - 111F STR_PD_HEADER equ 0x111F - 139: - 4010 SYS_BUF_START equ 0x4010 - 140: - 4000 SYS_RAM_START equ 0x4000 - 141: - 0018 VAR_CONSOLE_BAUD equ 0x18 - 142: - 000F VAR_CONSOLE_CONF equ 0x0F - 143: - 0080 VDP_MEM equ 0x80 - 144: - 0081 VDP_REG equ 0x81 - 145: - 1277 _COMMAND_PROCESS_FOUND equ 0x1277 - 146: - 12F9 _OP_CALL equ 0x12F9 - 147: - 1407 _OP_IIC_ACK_ERR equ 0x1407 - 148: - 140E _OP_IIC_ACK_ERR_str equ 0x140E - 149: - 1454 _OP_IIC_IN_LOOP equ 0x1454 - 150: - 1461 _OP_IIC_IN_LOOP_TEXT equ 0x1461 - 151: - 13D8 _OP_IIC_OUT_LOOP equ 0x13D8 - 152: - 13F4 _OP_IIC_OUT_SEND equ 0x13F4 - 153: - 1475 _OP_RTIME_NN equ 0x1475 - 154: - 152D _OP_RTIME_RD_CMD equ 0x152D - 155: - 1342 _OP_SET_LOOP equ 0x1342 - 156: - 15D0 _OP_STIME_INVALID equ 0x15D0 - 157: - 15E7 _OP_STIME_PROMPT equ 0x15E7 - 158: - 15FF _OP_STIME_PROMPT_ERR equ 0x15FF - 159: - 152E _OP_STIME_STR_DAY equ 0x152E - 160: - 157F _OP_STIME_STR_HOUR equ 0x157F - 161: - 159A _OP_STIME_STR_MIN equ 0x159A - 162: - 1549 _OP_STIME_STR_MON equ 0x1549 - 163: - 15B5 _OP_STIME_STR_SEC equ 0x15B5 - 164: - 1564 _OP_STIME_STR_YEAR equ 0x1564 - 165: - 16D7 _POST_CHECK_APU_FAILED equ 0x16D7 - 166: - 170B _POST_CHECK_IDE_FAILED equ 0x170B - 167: - 16AC _POST_CHECK_PIO_FAILED equ 0x16AC - 168: - 174C _POST_TEST_RTC_INVALID equ 0x174C - 169: - 1745 _POST_TEST_RTC_NOTFOUND equ 0x1745 - 170: - 129A _STR_NOT_FOUND equ 0x129A - 171: - 1286 _STR_NOT_IMPLEMENTED equ 0x1286 - 172: - 12AE _STR_SYNTAX equ 0x12AE - 173: - 0144 _read_bcd_invalid equ 0x144 - 174: - 167E _shift4 equ 0x167E - 175: - 0D14 beep equ 0xD14 - 176: - 0D17 beep_loop equ 0xD17 - 177: - 0D34 beep_pause equ 0xD34 - 178: - 0919 dasm_00 equ 0x919 - 179: - 0C05 dasm_01 equ 0xC05 - 180: - 099F dasm_02 equ 0x99F - 181: - 0BD7 dasm_03 equ 0xBD7 - 182: - 0A1C dasm_08 equ 0xA1C - 183: - 0BAA dasm_09 equ 0xBAA - 184: - 0981 dasm_0A equ 0x981 - 185: - 0BEE dasm_0B equ 0xBEE - 186: - 0961 dasm_10 equ 0x961 - 187: - 09AA dasm_12 equ 0x9AA - 188: - 0924 dasm_18 equ 0x924 - 189: - 098B dasm_1A equ 0x98B - 190: - 093E dasm_20 equ 0x93E - 191: - 0C4B dasm_22 equ 0xC4B - 192: - 09E4 dasm_27 equ 0x9E4 - 193: - 0937 dasm_28 equ 0x937 - 194: - 0C1C dasm_2A equ 0xC1C - 195: - 09E8 dasm_2F equ 0x9E8 - 196: - 092F dasm_30 equ 0x92F - 197: - 09B5 dasm_32 equ 0x9B5 - 198: - 09F4 dasm_37 equ 0x9F4 - 199: - 0928 dasm_38 equ 0x928 - 200: - 0995 dasm_3A equ 0x995 - 201: - 09F0 dasm_3F equ 0x9F0 - 202: - 09F8 dasm_76 equ 0x9F8 - 203: - 0A75 dasm_80C6 equ 0xA75 - 204: - 0A12 dasm_BE equ 0xA12 - 205: - 091D dasm_C3 equ 0x91D - 206: - 0A9B dasm_C88E equ 0xA9B - 207: - 096D dasm_C9 equ 0x96D - 208: - 0967 dasm_CD equ 0x967 - 209: - 0A29 dasm_D9 equ 0xA29 - 210: - 094F dasm_DD equ 0x94F - 211: - 0C0C dasm_DD_01 equ 0xC0C - 212: - 0BC5 dasm_DD_09 equ 0xBC5 - 213: - 0C61 dasm_DD_22 equ 0xC61 - 214: - 0BDC dasm_DD_23 equ 0xBDC - 215: - 0C33 dasm_DD_2A equ 0xC33 - 216: - 0BF3 dasm_DD_2B equ 0xBF3 - 217: - 0B75 dasm_DD_34 equ 0xB75 - 218: - 0B92 dasm_DD_35 equ 0xB92 - 219: - 0A7D dasm_DD_86 equ 0xA7D - 220: - 0AA3 dasm_DD_8E equ 0xAA3 - 221: - 0AC6 dasm_DD_96 equ 0xAC6 - 222: - 0AE6 dasm_DD_9E equ 0xAE6 - 223: - 0B07 dasm_DD_A6 equ 0xB07 - 224: - 0B3E dasm_DD_AE equ 0xB3E - 225: - 0B23 dasm_DD_B6 equ 0xB23 - 226: - 0B5A dasm_DD_BE equ 0xB5A - 227: - 0CB3 dasm_DD_E1 equ 0xCB3 - 228: - 0A39 dasm_DD_E3 equ 0xA39 - 229: - 0C9D dasm_DD_E5 equ 0xC9D - 230: - 0C83 dasm_DD_F9 equ 0xC83 - 231: - 0CAD dasm_E1 equ 0xCAD - 232: - 0A2D dasm_E3 equ 0xA2D - 233: - 0C97 dasm_E5 equ 0xC97 - 234: - 0946 dasm_E9 equ 0x946 - 235: - 0BBC dasm_ED_42 equ 0xBBC - 236: - 0C57 dasm_ED_43 equ 0xC57 - 237: - 09EC dasm_ED_44 equ 0x9EC - 238: - 0977 dasm_ED_45 equ 0x977 - 239: - 0A03 dasm_ED_46 equ 0xA03 - 240: - 0BB3 dasm_ED_4A equ 0xBB3 - 241: - 0C28 dasm_ED_4B equ 0xC28 - 242: - 0972 dasm_ED_4D equ 0x972 - 243: - 0A08 dasm_ED_56 equ 0xA08 - 244: - 0A0D dasm_ED_5E equ 0xA0D - 245: - 0A51 dasm_ED_A0 equ 0xA51 - 246: - 0A63 dasm_ED_A1 equ 0xA63 - 247: - 0A5A dasm_ED_A8 equ 0xA5A - 248: - 0A6C dasm_ED_A9 equ 0xA6C - 249: - 0A55 dasm_ED_B0 equ 0xA55 - 250: - 0A67 dasm_ED_B1 equ 0xA67 - 251: - 0A5E dasm_ED_B8 equ 0xA5E - 252: - 0A70 dasm_ED_B9 equ 0xA70 - 253: - 09FD dasm_F3 equ 0x9FD - 254: - 0C79 dasm_F9 equ 0xC79 - 255: - 0A00 dasm_FB equ 0xA00 - 256: - 0958 dasm_FD equ 0x958 - 257: - 0C14 dasm_FD_01 equ 0xC14 - 258: - 0BCE dasm_FD_09 equ 0xBCE - 259: - 0C6D dasm_FD_22 equ 0xC6D - 260: - 0BE5 dasm_FD_23 equ 0xBE5 - 261: - 0C3F dasm_FD_2A equ 0xC3F - 262: - 0BFC dasm_FD_2B equ 0xBFC - 263: - 0B81 dasm_FD_34 equ 0xB81 - 264: - 0B9E dasm_FD_35 equ 0xB9E - 265: - 0A8C dasm_FD_86 equ 0xA8C - 266: - 0AB2 dasm_FD_8E equ 0xAB2 - 267: - 0AD2 dasm_FD_96 equ 0xAD2 - 268: - 0AF4 dasm_FD_9E equ 0xAF4 - 269: - 0B13 dasm_FD_A6 equ 0xB13 - 270: - 0B4A dasm_FD_AE equ 0xB4A - 271: - 0B2E dasm_FD_B6 equ 0xB2E - 272: - 0B65 dasm_FD_BE equ 0xB65 - 273: - 0CBB dasm_FD_E1 equ 0xCBB - 274: - 0A45 dasm_FD_E3 equ 0xA45 - 275: - 0CA5 dasm_FD_E5 equ 0xCA5 - 276: - 0C8D dasm_FD_F9 equ 0xC8D - 277: - 097C dasm_FF equ 0x97C - 278: - 0CC3 dasm_UU equ 0xCC3 - 279: - 0CC7 dasm_UW equ 0xCC7 - 280: - 0B02 dasm__AND equ 0xB02 - 281: - 0B56 dasm__CP equ 0xB56 - 282: - 0B8D dasm__DEC equ 0xB8D - 283: - 09D4 dasm__ED_47 equ 0x9D4 - 284: - 09DC dasm__ED_4F equ 0x9DC - 285: - 09C4 dasm__ED_57 equ 0x9C4 - 286: - 09CC dasm__ED_5F equ 0x9CC - 287: - 0B70 dasm__INC equ 0xB70 - 288: - 09C0 dasm__LD equ 0x9C0 - 289: - 0B1F dasm__OR equ 0xB1F - 290: - 0ADE dasm__SBC equ 0xADE - 291: - 0AC1 dasm__SUB equ 0xAC1 - 292: - 0B39 dasm__XOR equ 0xB39 - 293: - 04C1 dasm_opcode_table equ 0x4C1 - 294: - 02EE dasm_print16hex_addr equ 0x2EE - 295: - 0306 dasm_print8hex equ 0x306 - 296: - 0CCC dasm_printFlags_table equ 0xCCC - 297: - 0CDC dasm_printRegister8_table equ 0xCDC - 298: - 0CFC dasm_printRegister8_table_HL equ 0xCFC - 299: - 0CE4 dasm_printRegisterIX_table equ 0xCE4 - 300: - 0CEC dasm_printRegisterIY_table equ 0xCEC - 301: - 0CF4 dasm_printRegisterSP_table equ 0xCF4 - 302: - 01B2 disassemble equ 0x1B2 - 303: - 0298 disassemble_continue equ 0x298 - 304: - 0288 disassemble_err equ 0x288 - 305: - 01B6 disassemble_next equ 0x1B6 - 306: - 0285 disassemble_print_opcode_params_end equ 0x285 - 307: - 0231 disassemble_print_opcode_params_loop equ 0x231 - 308: - 01F3 disassemble_print_opcode_raw equ 0x1F3 - 309: - 0207 disassemble_print_opcode_raw_fill equ 0x207 - 310: - 02CA disassemble_table_first_match equ 0x2CA - 311: - 02E4 disassemble_table_found equ 0x2E4 - 312: - 02E8 disassemble_table_notfound equ 0x2E8 - 313: - 02A6 disassemble_table_seek equ 0x2A6 - 314: - 02AA disassemble_table_seek_loop equ 0x2AA - 315: - 10C4 dump_pretty equ 0x10C4 - 316: - 10EE dump_pretty_ascii equ 0x10EE - 317: - 110C dump_pretty_ascii_cont equ 0x110C - 318: - 10F6 dump_pretty_ascii_loop equ 0x10F6 - 319: - 1107 dump_pretty_ascii_none equ 0x1107 - 320: - 10E1 dump_pretty_col equ 0x10E1 - 321: - 111E dump_pretty_end equ 0x111E - 322: - 1112 dump_pretty_nextrow equ 0x1112 - 323: - 10CC dump_pretty_row equ 0x10CC - 324: - 0E0B ide_printerror equ 0xE0B - 325: - 0D8A ide_readsector_256 equ 0xD8A - 326: - 0DB9 ide_readsector_256_done equ 0xDB9 - 327: - 0D8C ide_readsector_256_waitloop equ 0xD8C - 328: - 0DBA ide_readsector_512_inv equ 0xDBA - 329: - 0DBF ide_readsector_512_inv_waitloop equ 0xDBF - 330: - 0DF5 ide_readsector_timeout equ 0xDF5 - 331: - 0D6C ide_regread_8 equ 0xD6C - 332: - 0D50 ide_regwrite_8 equ 0xD50 - 333: - 0D43 ide_reset equ 0xD43 - 334: - 0E0A ide_writesector_256 equ 0xE0A - 335: - 0EB1 ideif_init_drive equ 0xEB1 - 336: - 0EDF ideif_init_drive_detected equ 0xEDF - 337: - 0EC5 ideif_init_drive_loop1 equ 0xEC5 - 338: - 0ED8 ideif_init_drive_nodrv equ 0xED8 - 339: - 0EB1 ideif_init_dtable equ 0xEB1 - 340: - 0FD8 iic_init equ 0xFD8 - 341: - 1017 iic_read_ack equ 0x1017 - 342: - 0FA9 iic_receive_buffer equ 0xFA9 - 343: - 0FCC iic_receive_buffer_done equ 0xFCC - 344: - 0FD2 iic_receive_buffer_err equ 0xFD2 - 345: - 0FBA iic_receive_buffer_loop equ 0xFBA - 346: - 109D iic_receive_byte equ 0x109D - 347: - 10AA iic_receive_byte_loop equ 0x10AA - 348: - 103D iic_send_ack equ 0x103D - 349: - 0F7F iic_send_buffer equ 0xF7F - 350: - 0F9D iic_send_buffer_done equ 0xF9D - 351: - 0FA3 iic_send_buffer_err equ 0xFA3 - 352: - 0F8F iic_send_buffer_loop equ 0xF8F - 353: - 1077 iic_send_byte equ 0x1077 - 354: - 1083 iic_send_byte_loop equ 0x1083 - 355: - 0FF6 iic_send_ebit equ 0xFF6 - 356: - 105A iic_send_nack equ 0x105A - 357: - 0FE1 iic_send_sbit equ 0xFE1 - 358: - 0044 mon_var_template equ 0x44 - 359: - 0070 mon_var_template_end equ 0x70 - 360: - 0314 param_01 equ 0x314 - 361: - 033B param_02 equ 0x33B - 362: - 0358 param_03 equ 0x358 - 363: - 0390 param_03_done equ 0x390 - 364: - 0379 param_03_neg equ 0x379 - 365: - 0394 param_04 equ 0x394 - 366: - 03A4 param_04_i equ 0x3A4 - 367: - 03AA param_05 equ 0x3AA - 368: - 03B7 param_06 equ 0x3B7 - 369: - 03D1 param_07 equ 0x3D1 - 370: - 03DE param_08 equ 0x3DE - 371: - 03F3 param_09 equ 0x3F3 - 372: - 03F9 param_09_0A equ 0x3F9 - 373: - 03EA param_0A equ 0x3EA - 374: - 0408 param_10 equ 0x408 - 375: - 0418 param_11 equ 0x418 - 376: - 0427 param_11_12 equ 0x427 - 377: - 0447 param_11_12_all equ 0x447 - 378: - 043A param_11_12_def equ 0x43A - 379: - 043F param_11_12_ix equ 0x43F - 380: - 0444 param_11_12_iy equ 0x444 - 381: - 0420 param_12 equ 0x420 - 382: - 0458 param_13 equ 0x458 - 383: - 0477 param_80 equ 0x477 - 384: - 047E param_80_seek equ 0x47E - 385: - 046E param_81 equ 0x46E - 386: - 04B2 param_comma equ 0x4B2 - 387: - 048D param_printRegister equ 0x48D - 388: - 04AB param_printRegisterA equ 0x4AB - 389: - 04A3 param_printRegisterHL equ 0x4A3 - 390: - 0104 print_a_hex equ 0x104 - 391: - 0116 print_bcd equ 0x116 - 392: - 00D4 print_char equ 0xD4 - 393: - 00E7 print_clear equ 0xE7 - 394: - 00EE print_newLine equ 0xEE - 395: - 00DC print_str equ 0xDC - 396: - 00E6 print_str_end equ 0xE6 - 397: - 115E print_str_fixed equ 0x115E - 398: - 00F9 print_wait_out equ 0xF9 - 399: - 012E read_bcd equ 0x12E - 400: - 011C read_char equ 0x11C - 401: - 0F13 read_lba_sector equ 0xF13 - 402: - 0F74 str_dev_notfound equ 0xF74 - 403: - 0F5E str_dev_ready equ 0xF5E - 404: - 0F6B str_dev_ready2 equ 0xF6B - 405: - 0F46 str_dev_waitready equ 0xF46 - 406: - 0E3E str_error_start equ 0xE3E - 407: - 0E5B str_error_start1 equ 0xE5B - 408: - 0E64 str_error_start2 equ 0xE64 - 409: - 0E6D str_error_time equ 0xE6D - 410: - 17A4 str_post_apu equ 0x17A4 - 411: - 1753 str_post_ide_30 equ 0x1753 - 412: - 176E str_post_ide_40 equ 0x176E - 413: - 17DA str_post_nd equ 0x17DA - 414: - 1812 str_post_ok equ 0x1812 - 415: - 1789 str_post_pio equ 0x1789 - 416: - 17BF str_post_rtc equ 0x17BF - 417: - 17E8 str_post_rtc_iv equ 0x17E8 - 418: - 400A var_apu_present equ 0x400A - 419: - 402B var_buffer equ 0x402B - 420: - 4000 var_buffer_len equ 0x4000 - 421: - 411A var_bytes_count equ 0x411A - 422: - 4006 var_curserchar equ 0x4006 - 423: - 4007 var_curserlastaddr equ 0x4007 - 424: - 4005 var_curseron equ 0x4005 - 425: - 4004 var_curserstate equ 0x4004 - 426: - 4002 var_curserx equ 0x4002 - 427: - 4003 var_cursery equ 0x4003 - 428: - 4001 var_last_char equ 0x4001 - 429: - 4114 var_opcode equ 0x4114 - 430: - 4116 var_opcode_length equ 0x4116 - 431: - 4119 var_opcode_pcount equ 0x4119 - 432: - 4110 var_opcode_start equ 0x4110 - 433: - 4117 var_opcode_string equ 0x4117 - 434: - 4112 var_opcode_table equ 0x4112 - 435: - 4115 var_opcode_x equ 0x4115 - 436: - 4009 var_pio_present equ 0x4009 - 437: - 401B var_ps2mem equ 0x401B - 438: - 400B var_scratch equ 0x400B + 66: - 000B IDE_REG_LBA0 equ 0x0B + 67: - 000C IDE_REG_LBA1 equ 0x0C + 68: - 000D IDE_REG_LBA2 equ 0x0D + 69: - 000E IDE_REG_LBA3 equ 0x0E + 70: - 000C IDE_REG_LCYL equ 0x0C + 71: - 000A IDE_REG_SECTOR equ 0x0A + 72: - 000B IDE_REG_SSECTOR equ 0x0B + 73: - 0080 IDE_RST equ 0x80 + 74: - 0020 IDE_WR equ 0x20 + 75: - 0001 IIC_CLK equ 0x01 + 76: - 0002 IIC_DATA equ 0x02 + 77: - 001B INT_VEC equ 0x1B + 78: - 0040 IO_AY0_ADDR equ 0x40 + 79: - 0041 IO_AY0_DATA equ 0x41 + 80: - 0042 IO_AY1_ADDR equ 0x42 + 81: - 0043 IO_AY1_DATA equ 0x43 + 82: - 0020 IO_REG0 equ 0x20 + 83: - 0025 IO_RTC_AMPM equ 0x25 + 84: - 002D IO_RTC_CTR_D equ 0x2D + 85: - 002E IO_RTC_CTR_E equ 0x2E + 86: - 002F IO_RTC_CTR_F equ 0x2F + 87: - 0026 IO_RTC_DAY0 equ 0x26 + 88: - 0027 IO_RTC_DAY1 equ 0x27 + 89: - 0024 IO_RTC_HOUR equ 0x24 + 90: - 0022 IO_RTC_MIN0 equ 0x22 + 91: - 0023 IO_RTC_MIN1 equ 0x23 + 92: - 0028 IO_RTC_MON0 equ 0x28 + 93: - 0029 IO_RTC_MON1 equ 0x29 + 94: - 0020 IO_RTC_SEC0 equ 0x20 + 95: - 0021 IO_RTC_SEC1 equ 0x21 + 96: - 002C IO_RTC_WEEK equ 0x2C + 97: - 002B IO_RTC_YEAR1 equ 0x2B + 98: - 002A IO_RTC_YERR0 equ 0x2A + 99: - 4166 MEM_IDE_BUFFER equ 0x4166 + 100: - 407B MEM_IDE_DEVICE equ 0x407B + 101: - 4085 MEM_IDE_DEV_TABLE equ 0x4085 + 102: - 4366 MEM_IDE_FSBUFFER equ 0x4366 + 103: - 407D MEM_IDE_PARTITION equ 0x407D + 104: - 4081 MEM_IDE_POINTER equ 0x4081 + 105: - 40C5 MEM_IDE_SELECTED equ 0x40C5 + 106: - 407C MEM_IDE_STATUS equ 0x407C + 107: - 40C6 MEM_IDE_STRING_0 equ 0x40C6 + 108: - 40EE MEM_IDE_STRING_1 equ 0x40EE + 109: - 4116 MEM_IDE_STRING_2 equ 0x4116 + 110: - 413E MEM_IDE_STRING_3 equ 0x413E + 111: - 014A MSG_CLEAR equ 0x14A + 112: - 1896 NOT_IMPLEMENTED equ 0x1896 + 113: - 18F8 OP_CALL equ 0x18F8 + 114: - 1A8C OP_CLR equ 0x1A8C + 115: - 1979 OP_DASM equ 0x1979 + 116: - 1918 OP_DUMP equ 0x1918 + 117: - 18DF OP_EXEC equ 0x18DF + 118: - 1A40 OP_IIC_IN equ 0x1A40 + 119: - 19E0 OP_IIC_OUT equ 0x19E0 + 120: - 19A9 OP_IO_IN equ 0x19A9 + 121: - 19BF OP_IO_OUT equ 0x19BF + 122: - 1CA1 OP_LSDSK equ 0x1CA1 + 123: - 1A90 OP_RTIME equ 0x1A90 + 124: - 1CA5 OP_SELDSK equ 0x1CA5 + 125: - 1948 OP_SET equ 0x1948 + 126: - 1C28 OP_STIME equ 0x1C28 + 127: - 1D12 POST_CHECK_APU equ 0x1D12 + 128: - 1D3D POST_CHECK_IDE_30 equ 0x1D3D + 129: - 1D50 POST_CHECK_IDE_40 equ 0x1D50 + 130: - 1CED POST_CHECK_PIO equ 0x1CED + 131: - 1CDD POST_START equ 0x1CDD + 132: - 1D6A POST_TEST_RTC equ 0x1D6A + 133: - 4110 PRG_RAM_START equ 0x4110 + 134: - FF00 PRG_RAM_TOP equ 0xFF00 + 135: - 4000 PROG_MEM_START equ 0x4000 + 136: - 0100 PROG_ROM_START equ 0x100 + 137: - 0000 RST_00 equ 0x00 + 138: - 0008 RST_08 equ 0x08 + 139: - 0010 RST_10 equ 0x10 + 140: - 0018 RST_18 equ 0x18 + 141: - FFFF STACK_RAM_TOP equ 0xFFFF + 142: - 0000 START_ROM equ 0x00 + 143: - 019B STRCONV_BYTES_TO_HEX equ 0x19B + 144: - 01AA STRCONV_BYTES_TO_HEX_1 equ 0x1AA + 145: - 01B4 STRCONV_BYTES_TO_HEX_2 equ 0x1B4 + 146: - 1E6F STR_Banner_Start equ 0x1E6F + 147: - 1724 STR_PD_HEADER equ 0x1724 + 148: - 4010 SYS_BUF_START equ 0x4010 + 149: - 4000 SYS_RAM_START equ 0x4000 + 150: - 0018 VAR_CONSOLE_BAUD equ 0x18 + 151: - 000F VAR_CONSOLE_CONF equ 0x0F + 152: - 0080 VDP_MEM equ 0x80 + 153: - 0081 VDP_REG equ 0x81 + 154: - 1895 _COMMAND_PROCESS_FOUND equ 0x1895 + 155: - 1917 _OP_CALL equ 0x1917 + 156: - 1A25 _OP_IIC_ACK_ERR equ 0x1A25 + 157: - 1A2C _OP_IIC_ACK_ERR_str equ 0x1A2C + 158: - 1A72 _OP_IIC_IN_LOOP equ 0x1A72 + 159: - 1A7F _OP_IIC_IN_LOOP_TEXT equ 0x1A7F + 160: - 19F6 _OP_IIC_OUT_LOOP equ 0x19F6 + 161: - 1A12 _OP_IIC_OUT_SEND equ 0x1A12 + 162: - 1A93 _OP_RTIME_NN equ 0x1A93 + 163: - 1B4B _OP_RTIME_RD_CMD equ 0x1B4B + 164: - 1CB4 _OP_SELDSK_INVALID equ 0x1CB4 + 165: - 1CC4 _OP_SELDSK_INVALID_STR equ 0x1CC4 + 166: - 1960 _OP_SET_LOOP equ 0x1960 + 167: - 1BEE _OP_STIME_INVALID equ 0x1BEE + 168: - 1C05 _OP_STIME_PROMPT equ 0x1C05 + 169: - 1C1D _OP_STIME_PROMPT_ERR equ 0x1C1D + 170: - 1B4C _OP_STIME_STR_DAY equ 0x1B4C + 171: - 1B9D _OP_STIME_STR_HOUR equ 0x1B9D + 172: - 1BB8 _OP_STIME_STR_MIN equ 0x1BB8 + 173: - 1B67 _OP_STIME_STR_MON equ 0x1B67 + 174: - 1BD3 _OP_STIME_STR_SEC equ 0x1BD3 + 175: - 1B82 _OP_STIME_STR_YEAR equ 0x1B82 + 176: - 1D31 _POST_CHECK_APU_FAILED equ 0x1D31 + 177: - 1D63 _POST_CHECK_IDE_FAILED equ 0x1D63 + 178: - 1D06 _POST_CHECK_PIO_FAILED equ 0x1D06 + 179: - 1DA4 _POST_TEST_RTC_INVALID equ 0x1DA4 + 180: - 1D9D _POST_TEST_RTC_NOTFOUND equ 0x1D9D + 181: - 18B8 _STR_NOT_FOUND equ 0x18B8 + 182: - 18A4 _STR_NOT_IMPLEMENTED equ 0x18A4 + 183: - 18CC _STR_SYNTAX equ 0x18CC + 184: - 0D30 _beep_pause_l1 equ 0xD30 + 185: - 13E9 _ideif_init_drive_found equ 0x13E9 + 186: - 13D1 _ideif_init_drive_loop equ 0x13D1 + 187: - 13E4 _ideif_init_drive_nodrv equ 0x13E4 + 188: - 1454 _ideif_init_drive_prt_fnd equ 0x1454 + 189: - 1442 _ideif_init_drive_prt_l1 equ 0x1442 + 190: - 144C _ideif_init_drive_prt_ln equ 0x144C + 191: - 1510 _ideif_prnt_devtable_hdr equ 0x1510 + 192: - 12E1 _ideif_prnt_devtable_l1 equ 0x12E1 + 193: - 13A7 _ideif_prnt_devtable_l1_e2 equ 0x13A7 + 194: - 1326 _ideif_prnt_devtable_l1_es equ 0x1326 + 195: - 13A4 _ideif_prnt_devtable_l1_ms equ 0x13A4 + 196: - 12EE _ideif_prnt_devtable_l1_nxt equ 0x12EE + 197: - 1314 _ideif_prnt_devtable_l1_s00 equ 0x1314 + 198: - 1319 _ideif_prnt_devtable_l1_s01 equ 0x1319 + 199: - 131E _ideif_prnt_devtable_l1_s02 equ 0x131E + 200: - 1323 _ideif_prnt_devtable_l1_sFF equ 0x1323 + 201: - 12EC _ideif_prnt_devtable_l1_sel equ 0x12EC + 202: - 1574 _ideif_prnt_devtable_master equ 0x1574 + 203: - 1548 _ideif_prnt_devtable_s00 equ 0x1548 + 204: - 1553 _ideif_prnt_devtable_s01 equ 0x1553 + 205: - 155E _ideif_prnt_devtable_s02 equ 0x155E + 206: - 1569 _ideif_prnt_devtable_sFF equ 0x1569 + 207: - 157C _ideif_prnt_devtable_slave equ 0x157C + 208: - 0147 _read_bcd_invalid equ 0x147 + 209: - 1C9C _shift4 equ 0x1C9C + 210: - 0D17 beep equ 0xD17 + 211: - 0D19 beep_loop equ 0xD19 + 212: - 0D2F beep_pause equ 0xD2F + 213: - 091C dasm_00 equ 0x91C + 214: - 0C08 dasm_01 equ 0xC08 + 215: - 09A2 dasm_02 equ 0x9A2 + 216: - 0BDA dasm_03 equ 0xBDA + 217: - 0A1F dasm_08 equ 0xA1F + 218: - 0BAD dasm_09 equ 0xBAD + 219: - 0984 dasm_0A equ 0x984 + 220: - 0BF1 dasm_0B equ 0xBF1 + 221: - 0964 dasm_10 equ 0x964 + 222: - 09AD dasm_12 equ 0x9AD + 223: - 0927 dasm_18 equ 0x927 + 224: - 098E dasm_1A equ 0x98E + 225: - 0941 dasm_20 equ 0x941 + 226: - 0C4E dasm_22 equ 0xC4E + 227: - 09E7 dasm_27 equ 0x9E7 + 228: - 093A dasm_28 equ 0x93A + 229: - 0C1F dasm_2A equ 0xC1F + 230: - 09EB dasm_2F equ 0x9EB + 231: - 0932 dasm_30 equ 0x932 + 232: - 09B8 dasm_32 equ 0x9B8 + 233: - 09F7 dasm_37 equ 0x9F7 + 234: - 092B dasm_38 equ 0x92B + 235: - 0998 dasm_3A equ 0x998 + 236: - 09F3 dasm_3F equ 0x9F3 + 237: - 09FB dasm_76 equ 0x9FB + 238: - 0A78 dasm_80C6 equ 0xA78 + 239: - 0A15 dasm_BE equ 0xA15 + 240: - 0920 dasm_C3 equ 0x920 + 241: - 0A9E dasm_C88E equ 0xA9E + 242: - 0970 dasm_C9 equ 0x970 + 243: - 096A dasm_CD equ 0x96A + 244: - 0A2C dasm_D9 equ 0xA2C + 245: - 0952 dasm_DD equ 0x952 + 246: - 0C0F dasm_DD_01 equ 0xC0F + 247: - 0BC8 dasm_DD_09 equ 0xBC8 + 248: - 0C64 dasm_DD_22 equ 0xC64 + 249: - 0BDF dasm_DD_23 equ 0xBDF + 250: - 0C36 dasm_DD_2A equ 0xC36 + 251: - 0BF6 dasm_DD_2B equ 0xBF6 + 252: - 0B78 dasm_DD_34 equ 0xB78 + 253: - 0B95 dasm_DD_35 equ 0xB95 + 254: - 0A80 dasm_DD_86 equ 0xA80 + 255: - 0AA6 dasm_DD_8E equ 0xAA6 + 256: - 0AC9 dasm_DD_96 equ 0xAC9 + 257: - 0AE9 dasm_DD_9E equ 0xAE9 + 258: - 0B0A dasm_DD_A6 equ 0xB0A + 259: - 0B41 dasm_DD_AE equ 0xB41 + 260: - 0B26 dasm_DD_B6 equ 0xB26 + 261: - 0B5D dasm_DD_BE equ 0xB5D + 262: - 0CB6 dasm_DD_E1 equ 0xCB6 + 263: - 0A3C dasm_DD_E3 equ 0xA3C + 264: - 0CA0 dasm_DD_E5 equ 0xCA0 + 265: - 0C86 dasm_DD_F9 equ 0xC86 + 266: - 0CB0 dasm_E1 equ 0xCB0 + 267: - 0A30 dasm_E3 equ 0xA30 + 268: - 0C9A dasm_E5 equ 0xC9A + 269: - 0949 dasm_E9 equ 0x949 + 270: - 0BBF dasm_ED_42 equ 0xBBF + 271: - 0C5A dasm_ED_43 equ 0xC5A + 272: - 09EF dasm_ED_44 equ 0x9EF + 273: - 097A dasm_ED_45 equ 0x97A + 274: - 0A06 dasm_ED_46 equ 0xA06 + 275: - 0BB6 dasm_ED_4A equ 0xBB6 + 276: - 0C2B dasm_ED_4B equ 0xC2B + 277: - 0975 dasm_ED_4D equ 0x975 + 278: - 0A0B dasm_ED_56 equ 0xA0B + 279: - 0A10 dasm_ED_5E equ 0xA10 + 280: - 0A54 dasm_ED_A0 equ 0xA54 + 281: - 0A66 dasm_ED_A1 equ 0xA66 + 282: - 0A5D dasm_ED_A8 equ 0xA5D + 283: - 0A6F dasm_ED_A9 equ 0xA6F + 284: - 0A58 dasm_ED_B0 equ 0xA58 + 285: - 0A6A dasm_ED_B1 equ 0xA6A + 286: - 0A61 dasm_ED_B8 equ 0xA61 + 287: - 0A73 dasm_ED_B9 equ 0xA73 + 288: - 0A00 dasm_F3 equ 0xA00 + 289: - 0C7C dasm_F9 equ 0xC7C + 290: - 0A03 dasm_FB equ 0xA03 + 291: - 095B dasm_FD equ 0x95B + 292: - 0C17 dasm_FD_01 equ 0xC17 + 293: - 0BD1 dasm_FD_09 equ 0xBD1 + 294: - 0C70 dasm_FD_22 equ 0xC70 + 295: - 0BE8 dasm_FD_23 equ 0xBE8 + 296: - 0C42 dasm_FD_2A equ 0xC42 + 297: - 0BFF dasm_FD_2B equ 0xBFF + 298: - 0B84 dasm_FD_34 equ 0xB84 + 299: - 0BA1 dasm_FD_35 equ 0xBA1 + 300: - 0A8F dasm_FD_86 equ 0xA8F + 301: - 0AB5 dasm_FD_8E equ 0xAB5 + 302: - 0AD5 dasm_FD_96 equ 0xAD5 + 303: - 0AF7 dasm_FD_9E equ 0xAF7 + 304: - 0B16 dasm_FD_A6 equ 0xB16 + 305: - 0B4D dasm_FD_AE equ 0xB4D + 306: - 0B31 dasm_FD_B6 equ 0xB31 + 307: - 0B68 dasm_FD_BE equ 0xB68 + 308: - 0CBE dasm_FD_E1 equ 0xCBE + 309: - 0A48 dasm_FD_E3 equ 0xA48 + 310: - 0CA8 dasm_FD_E5 equ 0xCA8 + 311: - 0C90 dasm_FD_F9 equ 0xC90 + 312: - 097F dasm_FF equ 0x97F + 313: - 0CC6 dasm_UU equ 0xCC6 + 314: - 0CCA dasm_UW equ 0xCCA + 315: - 0B05 dasm__AND equ 0xB05 + 316: - 0B59 dasm__CP equ 0xB59 + 317: - 0B90 dasm__DEC equ 0xB90 + 318: - 09D7 dasm__ED_47 equ 0x9D7 + 319: - 09DF dasm__ED_4F equ 0x9DF + 320: - 09C7 dasm__ED_57 equ 0x9C7 + 321: - 09CF dasm__ED_5F equ 0x9CF + 322: - 0B73 dasm__INC equ 0xB73 + 323: - 09C3 dasm__LD equ 0x9C3 + 324: - 0B22 dasm__OR equ 0xB22 + 325: - 0AE1 dasm__SBC equ 0xAE1 + 326: - 0AC4 dasm__SUB equ 0xAC4 + 327: - 0B3C dasm__XOR equ 0xB3C + 328: - 04C4 dasm_opcode_table equ 0x4C4 + 329: - 02F1 dasm_print16hex_addr equ 0x2F1 + 330: - 0309 dasm_print8hex equ 0x309 + 331: - 0CCF dasm_printFlags_table equ 0xCCF + 332: - 0CDF dasm_printRegister8_table equ 0xCDF + 333: - 0CFF dasm_printRegister8_table_HL equ 0xCFF + 334: - 0CE7 dasm_printRegisterIX_table equ 0xCE7 + 335: - 0CEF dasm_printRegisterIY_table equ 0xCEF + 336: - 0CF7 dasm_printRegisterSP_table equ 0xCF7 + 337: - 01B5 disassemble equ 0x1B5 + 338: - 029B disassemble_continue equ 0x29B + 339: - 028B disassemble_err equ 0x28B + 340: - 01B9 disassemble_next equ 0x1B9 + 341: - 0288 disassemble_print_opcode_params_end equ 0x288 + 342: - 0234 disassemble_print_opcode_params_loop equ 0x234 + 343: - 01F6 disassemble_print_opcode_raw equ 0x1F6 + 344: - 020A disassemble_print_opcode_raw_fill equ 0x20A + 345: - 02CD disassemble_table_first_match equ 0x2CD + 346: - 02E7 disassemble_table_found equ 0x2E7 + 347: - 02EB disassemble_table_notfound equ 0x2EB + 348: - 02A9 disassemble_table_seek equ 0x2A9 + 349: - 02AD disassemble_table_seek_loop equ 0x2AD + 350: - 16C9 dump_pretty equ 0x16C9 + 351: - 16F3 dump_pretty_ascii equ 0x16F3 + 352: - 1711 dump_pretty_ascii_cont equ 0x1711 + 353: - 16FB dump_pretty_ascii_loop equ 0x16FB + 354: - 170C dump_pretty_ascii_none equ 0x170C + 355: - 16E6 dump_pretty_col equ 0x16E6 + 356: - 1723 dump_pretty_end equ 0x1723 + 357: - 1717 dump_pretty_nextrow equ 0x1717 + 358: - 16D1 dump_pretty_row equ 0x16D1 + 359: - 0E04 ide_printerror equ 0xE04 + 360: - 0D83 ide_readsector_256 equ 0xD83 + 361: - 0DB2 ide_readsector_256_done equ 0xDB2 + 362: - 0D85 ide_readsector_256_waitloop equ 0xD85 + 363: - 0DB3 ide_readsector_512_inv equ 0xDB3 + 364: - 0DB8 ide_readsector_512_inv_waitloop equ 0xDB8 + 365: - 0DEE ide_readsector_timeout equ 0xDEE + 366: - 0D65 ide_regread_8 equ 0xD65 + 367: - 0D49 ide_regwrite_8 equ 0xD49 + 368: - 0D3C ide_reset equ 0xD3C + 369: - 0E03 ide_writesector_256 equ 0xE03 + 370: - 1497 ideif_get_drv_pointer equ 0x1497 + 371: - 14AB ideif_init_all equ 0x14AB + 372: - 12B5 ideif_init_devtable equ 0x12B5 + 373: - 13C8 ideif_init_drive equ 0x13C8 + 374: - 12D3 ideif_prnt_devtable equ 0x12D3 + 375: - 15DD iic_init equ 0x15DD + 376: - 161C iic_read_ack equ 0x161C + 377: - 15AE iic_receive_buffer equ 0x15AE + 378: - 15D1 iic_receive_buffer_done equ 0x15D1 + 379: - 15D7 iic_receive_buffer_err equ 0x15D7 + 380: - 15BF iic_receive_buffer_loop equ 0x15BF + 381: - 16A2 iic_receive_byte equ 0x16A2 + 382: - 16AF iic_receive_byte_loop equ 0x16AF + 383: - 1642 iic_send_ack equ 0x1642 + 384: - 1584 iic_send_buffer equ 0x1584 + 385: - 15A2 iic_send_buffer_done equ 0x15A2 + 386: - 15A8 iic_send_buffer_err equ 0x15A8 + 387: - 1594 iic_send_buffer_loop equ 0x1594 + 388: - 167C iic_send_byte equ 0x167C + 389: - 1688 iic_send_byte_loop equ 0x1688 + 390: - 15FB iic_send_ebit equ 0x15FB + 391: - 165F iic_send_nack equ 0x165F + 392: - 15E6 iic_send_sbit equ 0x15E6 + 393: - 0044 mon_var_template equ 0x44 + 394: - 03BF mon_var_template_end equ 0x3BF + 395: - 0317 param_01 equ 0x317 + 396: - 033E param_02 equ 0x33E + 397: - 035B param_03 equ 0x35B + 398: - 0393 param_03_done equ 0x393 + 399: - 037C param_03_neg equ 0x37C + 400: - 0397 param_04 equ 0x397 + 401: - 03A7 param_04_i equ 0x3A7 + 402: - 03AD param_05 equ 0x3AD + 403: - 03BA param_06 equ 0x3BA + 404: - 03D4 param_07 equ 0x3D4 + 405: - 03E1 param_08 equ 0x3E1 + 406: - 03F6 param_09 equ 0x3F6 + 407: - 03FC param_09_0A equ 0x3FC + 408: - 03ED param_0A equ 0x3ED + 409: - 040B param_10 equ 0x40B + 410: - 041B param_11 equ 0x41B + 411: - 042A param_11_12 equ 0x42A + 412: - 044A param_11_12_all equ 0x44A + 413: - 043D param_11_12_def equ 0x43D + 414: - 0442 param_11_12_ix equ 0x442 + 415: - 0447 param_11_12_iy equ 0x447 + 416: - 0423 param_12 equ 0x423 + 417: - 045B param_13 equ 0x45B + 418: - 047A param_80 equ 0x47A + 419: - 0481 param_80_seek equ 0x481 + 420: - 0471 param_81 equ 0x471 + 421: - 04B5 param_comma equ 0x4B5 + 422: - 0490 param_printRegister equ 0x490 + 423: - 04AE param_printRegisterA equ 0x4AE + 424: - 04A6 param_printRegisterHL equ 0x4A6 + 425: - 0107 print_a_hex equ 0x107 + 426: - 0119 print_bcd equ 0x119 + 427: - 00D7 print_char equ 0xD7 + 428: - 00EA print_clear equ 0xEA + 429: - 00F1 print_newLine equ 0xF1 + 430: - 00DF print_str equ 0xDF + 431: - 00E9 print_str_end equ 0xE9 + 432: - 1763 print_str_fixed equ 0x1763 + 433: - 00FC print_wait_out equ 0xFC + 434: - 0131 read_bcd equ 0x131 + 435: - 011F read_char equ 0x11F + 436: - 14BE read_lba_sector equ 0x14BE + 437: - 1508 str_dev_done equ 0x1508 + 438: - 14F0 str_dev_waitready equ 0x14F0 + 439: - 0E37 str_error_start equ 0xE37 + 440: - 0E54 str_error_start1 equ 0xE54 + 441: - 0E5D str_error_start2 equ 0xE5D + 442: - 0E66 str_error_time equ 0xE66 + 443: - 1DFC str_post_apu equ 0x1DFC + 444: - 1DAB str_post_ide_30 equ 0x1DAB + 445: - 1DC6 str_post_ide_40 equ 0x1DC6 + 446: - 1E32 str_post_nd equ 0x1E32 + 447: - 1E6A str_post_ok equ 0x1E6A + 448: - 1DE1 str_post_pio equ 0x1DE1 + 449: - 1E17 str_post_rtc equ 0x1E17 + 450: - 1E40 str_post_rtc_iv equ 0x1E40 + 451: - 400A var_apu_present equ 0x400A + 452: - 4000 var_buffer_len equ 0x4000 + 453: - 411A var_bytes_count equ 0x411A + 454: - 4006 var_curserchar equ 0x4006 + 455: - 4007 var_curserlastaddr equ 0x4007 + 456: - 4005 var_curseron equ 0x4005 + 457: - 4004 var_curserstate equ 0x4004 + 458: - 4002 var_curserx equ 0x4002 + 459: - 4003 var_cursery equ 0x4003 + 460: - 407B var_idebuffer equ 0x407B + 461: - 402B var_input equ 0x402B + 462: - 4001 var_last_char equ 0x4001 + 463: - 4114 var_opcode equ 0x4114 + 464: - 4116 var_opcode_length equ 0x4116 + 465: - 4119 var_opcode_pcount equ 0x4119 + 466: - 4110 var_opcode_start equ 0x4110 + 467: - 4117 var_opcode_string equ 0x4117 + 468: - 4112 var_opcode_table equ 0x4112 + 469: - 4115 var_opcode_x equ 0x4115 + 470: - 4009 var_pio_present equ 0x4009 + 471: - 401B var_ps2mem equ 0x401B + 472: - 400B var_scratch equ 0x400B **** test.asm **** 2: - 8000 org 0x8000 3: @@ -493,7 +527,7 @@ 53: 146+10 801F 21E084 ld hl, TmsFont 54: 156+17 8022 CD3783 call TmsTextMode ; initialize text mode 55: - 56: 173+7 8025 3E0C ld a, TmsDarkGreen ; set colors + 56: 173+7 8025 3E06 ld a, TmsDarkRed ; set colors 57: 180+17 8027 CD9C82 call TmsBackground 58: 197+7 802A 3E0F ld a, TmsWhite 59: 204+17 802C CD4D84 call TmsTextColor @@ -4051,7 +4085,7 @@ Statistics: 4 passes 0 jr promotions - 577 symbols + 611 symbols 3338 bytes @@ -4059,27 +4093,27 @@ Statistics: Symbol Table: ADDR_RTC =D0 208 -A_RTS_OFF = 14F 335 -A_RTS_ON = 158 344 +A_RTS_OFF = 152 338 +A_RTS_ON = 15B 347 BOOT_PHASE0 =50 80 BOOT_PHASE1 =6E 110 BOOT_PHASE1_LOOP=77 119 BOOT_PHASE2 =82 130 -COMMAND =11CD 4557 -COMMAND_BACKSPACE=1208 4616 -COMMAND_LUT =1166 4454 -COMMAND_PROCESS=122E 4654 -COMMAND_PROCESS_FOUND=1269 4713 -COMMAND_PROCESS_LOOP=1231 4657 -COMMAND_PROCESS_LOOP_STR1=123A 4666 -COMMAND_PROCESS_LOOP_STR2=1250 4688 -COMMAND_PROCESS_NEXT_ENTRY=1255 4693 -COMMAND_PROCESS_NEXT_ENTRYI=1254 4692 -COMMAND_PROCESS_NOT_FOUND=1260 4704 -COMMAND_READ =11D9 4569 -CONSOLE_INIT =9B 155 -CONSOLE_INIT_CTC=9B 155 -CONSOLE_INIT_SIO=A3 163 +COMMAND =17EB 6123 +COMMAND_BACKSPACE=1826 6182 +COMMAND_LUT =176B 5995 +COMMAND_PROCESS=184C 6220 +COMMAND_PROCESS_FOUND=1887 6279 +COMMAND_PROCESS_LOOP=184F 6223 +COMMAND_PROCESS_LOOP_STR1=1858 6232 +COMMAND_PROCESS_LOOP_STR2=186E 6254 +COMMAND_PROCESS_NEXT_ENTRY=1873 6259 +COMMAND_PROCESS_NEXT_ENTRYI=1872 6258 +COMMAND_PROCESS_NOT_FOUND=187E 6270 +COMMAND_READ =17F7 6135 +CONSOLE_INIT =9E 158 +CONSOLE_INIT_CTC=9E 158 +CONSOLE_INIT_SIO=A6 166 CS_APU_CTRL =F9 249 CS_APU_DATA =F8 248 CS_BANK =00 0 @@ -4100,18 +4134,18 @@ CS_SIO_A_C =09 9 CS_SIO_A_D =08 8 CS_SIO_B_C =0B 11 CS_SIO_B_D =0A 10 -DHEX_TO_BYTE = 161 353 -DHEX_TO_BYTE_FAILED= 17D 381 -ERR_SYNTAX =127F 4735 -EXEC_RST_08 = D01 3329 -EXEC_RST_10 = D05 3333 -EXEC_RST_18 = D11 3345 -HEX_TO_BIN = 181 385 -HEX_TO_BIN_2 = 18F 399 -HEX_TO_INVALID_2= 196 406 +DHEX_TO_BYTE = 164 356 +DHEX_TO_BYTE_FAILED= 180 384 +ERR_SYNTAX =189D 6301 +EXEC_RST_08 = D04 3332 +EXEC_RST_10 = D08 3336 +EXEC_RST_18 = D14 3348 +HEX_TO_BIN = 184 388 +HEX_TO_BIN_2 = 192 402 +HEX_TO_INVALID_2= 199 409 IDE_CMD_IDENT =EC 236 IDE_CMD_READSEC=20 32 -IDE_DEF_TABLE = E91 3729 +IDE_DEV_TABLE =1275 4725 IDE_RD =40 64 IDE_REG_ALTSTS =16 22 IDE_REG_CMDSTS =0F 15 @@ -4120,15 +4154,18 @@ IDE_REG_DRVADDR=17 23 IDE_REG_ERROR =09 9 IDE_REG_HCYL =0D 13 IDE_REG_HEAD =0E 14 +IDE_REG_LBA0 =0B 11 +IDE_REG_LBA1 =0C 12 +IDE_REG_LBA2 =0D 13 +IDE_REG_LBA3 =0E 14 IDE_REG_LCYL =0C 12 IDE_REG_SECTOR =0A 10 IDE_REG_SSECTOR=0B 11 IDE_RST =80 128 IDE_WR =20 32 IIC_CLK =01 1 -IIC_DATA =42 66 +IIC_DATA =02 2 INT_VEC =1B 27 -IN_BUFFER =402B 16427 IO_AY0_ADDR =40 64 IO_AY0_DATA =41 65 IO_AY1_ADDR =42 66 @@ -4150,34 +4187,40 @@ IO_RTC_SEC1 =21 33 IO_RTC_WEEK =2C 44 IO_RTC_YEAR1 =2B 43 IO_RTC_YERR0 =2A 42 -MEM_IDE_BASE =5000 20480 -MEM_IDE_BUFFER =5062 20578 -MEM_IDE_DEVICE =5000 20480 -MEM_IDE_DEV_TABLE=5041 20545 -MEM_IDE_PARTITION=5002 20482 -MEM_IDE_POINTER=5006 20486 -MEM_IDE_SELECTED=5061 20577 -MEM_IDE_STATUS =5001 20481 -MSG_CLEAR = 147 327 -NOT_IMPLEMENTED=1278 4728 -OP_CALL =12DA 4826 -OP_CLR =146E 5230 -OP_DASM =135B 4955 -OP_DUMP =12FA 4858 -OP_EXEC =12C1 4801 -OP_IIC_IN =1422 5154 -OP_IIC_OUT =13C2 5058 -OP_IO_IN =138B 5003 -OP_IO_OUT =13A1 5025 -OP_RTIME =1472 5234 -OP_SET =132A 4906 -OP_STIME =160A 5642 -POST_CHECK_APU =16B8 5816 -POST_CHECK_IDE_30=16E3 5859 -POST_CHECK_IDE_40=16F7 5879 -POST_CHECK_PIO =1693 5779 -POST_START =1683 5763 -POST_TEST_RTC =1712 5906 +MEM_IDE_BUFFER =4166 16742 +MEM_IDE_DEVICE =407B 16507 +MEM_IDE_DEV_TABLE=4085 16517 +MEM_IDE_FSBUFFER=4366 17254 +MEM_IDE_PARTITION=407D 16509 +MEM_IDE_POINTER=4081 16513 +MEM_IDE_SELECTED=40C5 16581 +MEM_IDE_STATUS =407C 16508 +MEM_IDE_STRING_0=40C6 16582 +MEM_IDE_STRING_1=40EE 16622 +MEM_IDE_STRING_2=4116 16662 +MEM_IDE_STRING_3=413E 16702 +MSG_CLEAR = 14A 330 +NOT_IMPLEMENTED=1896 6294 +OP_CALL =18F8 6392 +OP_CLR =1A8C 6796 +OP_DASM =1979 6521 +OP_DUMP =1918 6424 +OP_EXEC =18DF 6367 +OP_IIC_IN =1A40 6720 +OP_IIC_OUT =19E0 6624 +OP_IO_IN =19A9 6569 +OP_IO_OUT =19BF 6591 +OP_LSDSK =1CA1 7329 +OP_RTIME =1A90 6800 +OP_SELDSK =1CA5 7333 +OP_SET =1948 6472 +OP_STIME =1C28 7208 +POST_CHECK_APU =1D12 7442 +POST_CHECK_IDE_30=1D3D 7485 +POST_CHECK_IDE_40=1D50 7504 +POST_CHECK_PIO =1CED 7405 +POST_START =1CDD 7389 +POST_TEST_RTC =1D6A 7530 PRG_RAM_START =4110 16656 PRG_RAM_TOP =FF00 65280 PROG_MEM_START =4000 16384 @@ -4188,11 +4231,11 @@ RST_10 =10 16 RST_18 =18 24 STACK_RAM_TOP =FFFF 65535 START_ROM =00 0 -STRCONV_BYTES_TO_HEX= 198 408 -STRCONV_BYTES_TO_HEX_1= 1A7 423 -STRCONV_BYTES_TO_HEX_2= 1B1 433 -STR_Banner_Start=1817 6167 -STR_PD_HEADER =111F 4383 +STRCONV_BYTES_TO_HEX= 19B 411 +STRCONV_BYTES_TO_HEX_1= 1AA 426 +STRCONV_BYTES_TO_HEX_2= 1B4 436 +STR_Banner_Start=1E6F 7791 +STR_PD_HEADER =1724 5924 SYS_BUF_START =4010 16400 SYS_RAM_START =4000 16384 TermClear 8CE0 36064 @@ -4340,282 +4383,305 @@ VDPTextBufferStart=00 0 VDPWait 8164 33124 VDP_MEM =80 128 VDP_REG =81 129 -_COMMAND_PROCESS_FOUND=1277 4727 -_OP_CALL =12F9 4857 -_OP_IIC_ACK_ERR=1407 5127 -_OP_IIC_ACK_ERR_str=140E 5134 -_OP_IIC_IN_LOOP=1454 5204 -_OP_IIC_IN_LOOP_TEXT=1461 5217 -_OP_IIC_OUT_LOOP=13D8 5080 -_OP_IIC_OUT_SEND=13F4 5108 -_OP_RTIME_NN =1475 5237 -_OP_RTIME_RD_CMD=152D 5421 -_OP_SET_LOOP =1342 4930 -_OP_STIME_INVALID=15D0 5584 -_OP_STIME_PROMPT=15E7 5607 -_OP_STIME_PROMPT_ERR=15FF 5631 -_OP_STIME_STR_DAY=152E 5422 -_OP_STIME_STR_HOUR=157F 5503 -_OP_STIME_STR_MIN=159A 5530 -_OP_STIME_STR_MON=1549 5449 -_OP_STIME_STR_SEC=15B5 5557 -_OP_STIME_STR_YEAR=1564 5476 -_POST_CHECK_APU_FAILED=16D7 5847 -_POST_CHECK_IDE_FAILED=170B 5899 -_POST_CHECK_PIO_FAILED=16AC 5804 -_POST_TEST_RTC_INVALID=174C 5964 -_POST_TEST_RTC_NOTFOUND=1745 5957 -_STR_NOT_FOUND =129A 4762 -_STR_NOT_IMPLEMENTED=1286 4742 -_STR_SYNTAX =12AE 4782 -_read_bcd_invalid= 144 324 -_shift4 =167E 5758 -beep = D14 3348 -beep_loop = D17 3351 -beep_pause = D34 3380 -dasm_00 = 919 2329 -dasm_01 = C05 3077 -dasm_02 = 99F 2463 -dasm_03 = BD7 3031 -dasm_08 = A1C 2588 -dasm_09 = BAA 2986 -dasm_0A = 981 2433 -dasm_0B = BEE 3054 -dasm_10 = 961 2401 -dasm_12 = 9AA 2474 -dasm_18 = 924 2340 -dasm_1A = 98B 2443 -dasm_20 = 93E 2366 -dasm_22 = C4B 3147 -dasm_27 = 9E4 2532 -dasm_28 = 937 2359 -dasm_2A = C1C 3100 -dasm_2F = 9E8 2536 -dasm_30 = 92F 2351 -dasm_32 = 9B5 2485 -dasm_37 = 9F4 2548 -dasm_38 = 928 2344 -dasm_3A = 995 2453 -dasm_3F = 9F0 2544 -dasm_76 = 9F8 2552 -dasm_80C6 = A75 2677 -dasm_BE = A12 2578 -dasm_C3 = 91D 2333 -dasm_C88E = A9B 2715 -dasm_C9 = 96D 2413 -dasm_CD = 967 2407 -dasm_D9 = A29 2601 -dasm_DD = 94F 2383 -dasm_DD_01 = C0C 3084 -dasm_DD_09 = BC5 3013 -dasm_DD_22 = C61 3169 -dasm_DD_23 = BDC 3036 -dasm_DD_2A = C33 3123 -dasm_DD_2B = BF3 3059 -dasm_DD_34 = B75 2933 -dasm_DD_35 = B92 2962 -dasm_DD_86 = A7D 2685 -dasm_DD_8E = AA3 2723 -dasm_DD_96 = AC6 2758 -dasm_DD_9E = AE6 2790 -dasm_DD_A6 = B07 2823 -dasm_DD_AE = B3E 2878 -dasm_DD_B6 = B23 2851 -dasm_DD_BE = B5A 2906 -dasm_DD_E1 = CB3 3251 -dasm_DD_E3 = A39 2617 -dasm_DD_E5 = C9D 3229 -dasm_DD_F9 = C83 3203 -dasm_E1 = CAD 3245 -dasm_E3 = A2D 2605 -dasm_E5 = C97 3223 -dasm_E9 = 946 2374 -dasm_ED_42 = BBC 3004 -dasm_ED_43 = C57 3159 -dasm_ED_44 = 9EC 2540 -dasm_ED_45 = 977 2423 -dasm_ED_46 = A03 2563 -dasm_ED_4A = BB3 2995 -dasm_ED_4B = C28 3112 -dasm_ED_4D = 972 2418 -dasm_ED_56 = A08 2568 -dasm_ED_5E = A0D 2573 -dasm_ED_A0 = A51 2641 -dasm_ED_A1 = A63 2659 -dasm_ED_A8 = A5A 2650 -dasm_ED_A9 = A6C 2668 -dasm_ED_B0 = A55 2645 -dasm_ED_B1 = A67 2663 -dasm_ED_B8 = A5E 2654 -dasm_ED_B9 = A70 2672 -dasm_F3 = 9FD 2557 -dasm_F9 = C79 3193 -dasm_FB = A00 2560 -dasm_FD = 958 2392 -dasm_FD_01 = C14 3092 -dasm_FD_09 = BCE 3022 -dasm_FD_22 = C6D 3181 -dasm_FD_23 = BE5 3045 -dasm_FD_2A = C3F 3135 -dasm_FD_2B = BFC 3068 -dasm_FD_34 = B81 2945 -dasm_FD_35 = B9E 2974 -dasm_FD_86 = A8C 2700 -dasm_FD_8E = AB2 2738 -dasm_FD_96 = AD2 2770 -dasm_FD_9E = AF4 2804 -dasm_FD_A6 = B13 2835 -dasm_FD_AE = B4A 2890 -dasm_FD_B6 = B2E 2862 -dasm_FD_BE = B65 2917 -dasm_FD_E1 = CBB 3259 -dasm_FD_E3 = A45 2629 -dasm_FD_E5 = CA5 3237 -dasm_FD_F9 = C8D 3213 -dasm_FF = 97C 2428 -dasm_UU = CC3 3267 -dasm_UW = CC7 3271 -dasm__AND = B02 2818 -dasm__CP = B56 2902 -dasm__DEC = B8D 2957 -dasm__ED_47 = 9D4 2516 -dasm__ED_4F = 9DC 2524 -dasm__ED_57 = 9C4 2500 -dasm__ED_5F = 9CC 2508 -dasm__INC = B70 2928 -dasm__LD = 9C0 2496 -dasm__OR = B1F 2847 -dasm__SBC = ADE 2782 -dasm__SUB = AC1 2753 -dasm__XOR = B39 2873 -dasm_opcode_table= 4C1 1217 -dasm_print16hex_addr= 2EE 750 -dasm_print8hex = 306 774 -dasm_printFlags_table= CCC 3276 -dasm_printRegister8_table= CDC 3292 -dasm_printRegister8_table_HL= CFC 3324 -dasm_printRegisterIX_table= CE4 3300 -dasm_printRegisterIY_table= CEC 3308 -dasm_printRegisterSP_table= CF4 3316 -disassemble = 1B2 434 -disassemble_continue= 298 664 -disassemble_err= 288 648 -disassemble_next= 1B6 438 -disassemble_print_opcode_params_end= 285 645 -disassemble_print_opcode_params_loop= 231 561 -disassemble_print_opcode_raw= 1F3 499 -disassemble_print_opcode_raw_fill= 207 519 -disassemble_table_first_match= 2CA 714 -disassemble_table_found= 2E4 740 -disassemble_table_notfound= 2E8 744 -disassemble_table_seek= 2A6 678 -disassemble_table_seek_loop= 2AA 682 -dump_pretty =10C4 4292 -dump_pretty_ascii=10EE 4334 -dump_pretty_ascii_cont=110C 4364 -dump_pretty_ascii_loop=10F6 4342 -dump_pretty_ascii_none=1107 4359 -dump_pretty_col=10E1 4321 -dump_pretty_end=111E 4382 -dump_pretty_nextrow=1112 4370 -dump_pretty_row=10CC 4300 -ide_printerror = E0B 3595 -ide_readsector_256= D8A 3466 -ide_readsector_256_done= DB9 3513 -ide_readsector_256_waitloop= D8C 3468 -ide_readsector_512_inv= DBA 3514 -ide_readsector_512_inv_waitloop= DBF 3519 -ide_readsector_timeout= DF5 3573 -ide_regread_8 = D6C 3436 -ide_regwrite_8 = D50 3408 -ide_reset = D43 3395 -ide_writesector_256= E0A 3594 -ideif_init_drive= EB1 3761 -ideif_init_drive_detected= EDF 3807 -ideif_init_drive_loop1= EC5 3781 -ideif_init_drive_nodrv= ED8 3800 -ideif_init_dtable= EB1 3761 -iic_init = FD8 4056 -iic_read_ack =1017 4119 -iic_receive_buffer= FA9 4009 -iic_receive_buffer_done= FCC 4044 -iic_receive_buffer_err= FD2 4050 -iic_receive_buffer_loop= FBA 4026 -iic_receive_byte=109D 4253 -iic_receive_byte_loop=10AA 4266 -iic_send_ack =103D 4157 -iic_send_buffer= F7F 3967 -iic_send_buffer_done= F9D 3997 -iic_send_buffer_err= FA3 4003 -iic_send_buffer_loop= F8F 3983 -iic_send_byte =1077 4215 -iic_send_byte_loop=1083 4227 -iic_send_ebit = FF6 4086 -iic_send_nack =105A 4186 -iic_send_sbit = FE1 4065 +_COMMAND_PROCESS_FOUND=1895 6293 +_OP_CALL =1917 6423 +_OP_IIC_ACK_ERR=1A25 6693 +_OP_IIC_ACK_ERR_str=1A2C 6700 +_OP_IIC_IN_LOOP=1A72 6770 +_OP_IIC_IN_LOOP_TEXT=1A7F 6783 +_OP_IIC_OUT_LOOP=19F6 6646 +_OP_IIC_OUT_SEND=1A12 6674 +_OP_RTIME_NN =1A93 6803 +_OP_RTIME_RD_CMD=1B4B 6987 +_OP_SELDSK_INVALID=1CB4 7348 +_OP_SELDSK_INVALID_STR=1CC4 7364 +_OP_SET_LOOP =1960 6496 +_OP_STIME_INVALID=1BEE 7150 +_OP_STIME_PROMPT=1C05 7173 +_OP_STIME_PROMPT_ERR=1C1D 7197 +_OP_STIME_STR_DAY=1B4C 6988 +_OP_STIME_STR_HOUR=1B9D 7069 +_OP_STIME_STR_MIN=1BB8 7096 +_OP_STIME_STR_MON=1B67 7015 +_OP_STIME_STR_SEC=1BD3 7123 +_OP_STIME_STR_YEAR=1B82 7042 +_POST_CHECK_APU_FAILED=1D31 7473 +_POST_CHECK_IDE_FAILED=1D63 7523 +_POST_CHECK_PIO_FAILED=1D06 7430 +_POST_TEST_RTC_INVALID=1DA4 7588 +_POST_TEST_RTC_NOTFOUND=1D9D 7581 +_STR_NOT_FOUND =18B8 6328 +_STR_NOT_IMPLEMENTED=18A4 6308 +_STR_SYNTAX =18CC 6348 +_beep_pause_l1 = D30 3376 +_ideif_init_drive_found=13E9 5097 +_ideif_init_drive_loop=13D1 5073 +_ideif_init_drive_nodrv=13E4 5092 +_ideif_init_drive_prt_fnd=1454 5204 +_ideif_init_drive_prt_l1=1442 5186 +_ideif_init_drive_prt_ln=144C 5196 +_ideif_prnt_devtable_hdr=1510 5392 +_ideif_prnt_devtable_l1=12E1 4833 +_ideif_prnt_devtable_l1_e2=13A7 5031 +_ideif_prnt_devtable_l1_es=1326 4902 +_ideif_prnt_devtable_l1_ms=13A4 5028 +_ideif_prnt_devtable_l1_nxt=12EE 4846 +_ideif_prnt_devtable_l1_s00=1314 4884 +_ideif_prnt_devtable_l1_s01=1319 4889 +_ideif_prnt_devtable_l1_s02=131E 4894 +_ideif_prnt_devtable_l1_sFF=1323 4899 +_ideif_prnt_devtable_l1_sel=12EC 4844 +_ideif_prnt_devtable_master=1574 5492 +_ideif_prnt_devtable_s00=1548 5448 +_ideif_prnt_devtable_s01=1553 5459 +_ideif_prnt_devtable_s02=155E 5470 +_ideif_prnt_devtable_sFF=1569 5481 +_ideif_prnt_devtable_slave=157C 5500 +_read_bcd_invalid= 147 327 +_shift4 =1C9C 7324 +beep = D17 3351 +beep_loop = D19 3353 +beep_pause = D2F 3375 +dasm_00 = 91C 2332 +dasm_01 = C08 3080 +dasm_02 = 9A2 2466 +dasm_03 = BDA 3034 +dasm_08 = A1F 2591 +dasm_09 = BAD 2989 +dasm_0A = 984 2436 +dasm_0B = BF1 3057 +dasm_10 = 964 2404 +dasm_12 = 9AD 2477 +dasm_18 = 927 2343 +dasm_1A = 98E 2446 +dasm_20 = 941 2369 +dasm_22 = C4E 3150 +dasm_27 = 9E7 2535 +dasm_28 = 93A 2362 +dasm_2A = C1F 3103 +dasm_2F = 9EB 2539 +dasm_30 = 932 2354 +dasm_32 = 9B8 2488 +dasm_37 = 9F7 2551 +dasm_38 = 92B 2347 +dasm_3A = 998 2456 +dasm_3F = 9F3 2547 +dasm_76 = 9FB 2555 +dasm_80C6 = A78 2680 +dasm_BE = A15 2581 +dasm_C3 = 920 2336 +dasm_C88E = A9E 2718 +dasm_C9 = 970 2416 +dasm_CD = 96A 2410 +dasm_D9 = A2C 2604 +dasm_DD = 952 2386 +dasm_DD_01 = C0F 3087 +dasm_DD_09 = BC8 3016 +dasm_DD_22 = C64 3172 +dasm_DD_23 = BDF 3039 +dasm_DD_2A = C36 3126 +dasm_DD_2B = BF6 3062 +dasm_DD_34 = B78 2936 +dasm_DD_35 = B95 2965 +dasm_DD_86 = A80 2688 +dasm_DD_8E = AA6 2726 +dasm_DD_96 = AC9 2761 +dasm_DD_9E = AE9 2793 +dasm_DD_A6 = B0A 2826 +dasm_DD_AE = B41 2881 +dasm_DD_B6 = B26 2854 +dasm_DD_BE = B5D 2909 +dasm_DD_E1 = CB6 3254 +dasm_DD_E3 = A3C 2620 +dasm_DD_E5 = CA0 3232 +dasm_DD_F9 = C86 3206 +dasm_E1 = CB0 3248 +dasm_E3 = A30 2608 +dasm_E5 = C9A 3226 +dasm_E9 = 949 2377 +dasm_ED_42 = BBF 3007 +dasm_ED_43 = C5A 3162 +dasm_ED_44 = 9EF 2543 +dasm_ED_45 = 97A 2426 +dasm_ED_46 = A06 2566 +dasm_ED_4A = BB6 2998 +dasm_ED_4B = C2B 3115 +dasm_ED_4D = 975 2421 +dasm_ED_56 = A0B 2571 +dasm_ED_5E = A10 2576 +dasm_ED_A0 = A54 2644 +dasm_ED_A1 = A66 2662 +dasm_ED_A8 = A5D 2653 +dasm_ED_A9 = A6F 2671 +dasm_ED_B0 = A58 2648 +dasm_ED_B1 = A6A 2666 +dasm_ED_B8 = A61 2657 +dasm_ED_B9 = A73 2675 +dasm_F3 = A00 2560 +dasm_F9 = C7C 3196 +dasm_FB = A03 2563 +dasm_FD = 95B 2395 +dasm_FD_01 = C17 3095 +dasm_FD_09 = BD1 3025 +dasm_FD_22 = C70 3184 +dasm_FD_23 = BE8 3048 +dasm_FD_2A = C42 3138 +dasm_FD_2B = BFF 3071 +dasm_FD_34 = B84 2948 +dasm_FD_35 = BA1 2977 +dasm_FD_86 = A8F 2703 +dasm_FD_8E = AB5 2741 +dasm_FD_96 = AD5 2773 +dasm_FD_9E = AF7 2807 +dasm_FD_A6 = B16 2838 +dasm_FD_AE = B4D 2893 +dasm_FD_B6 = B31 2865 +dasm_FD_BE = B68 2920 +dasm_FD_E1 = CBE 3262 +dasm_FD_E3 = A48 2632 +dasm_FD_E5 = CA8 3240 +dasm_FD_F9 = C90 3216 +dasm_FF = 97F 2431 +dasm_UU = CC6 3270 +dasm_UW = CCA 3274 +dasm__AND = B05 2821 +dasm__CP = B59 2905 +dasm__DEC = B90 2960 +dasm__ED_47 = 9D7 2519 +dasm__ED_4F = 9DF 2527 +dasm__ED_57 = 9C7 2503 +dasm__ED_5F = 9CF 2511 +dasm__INC = B73 2931 +dasm__LD = 9C3 2499 +dasm__OR = B22 2850 +dasm__SBC = AE1 2785 +dasm__SUB = AC4 2756 +dasm__XOR = B3C 2876 +dasm_opcode_table= 4C4 1220 +dasm_print16hex_addr= 2F1 753 +dasm_print8hex = 309 777 +dasm_printFlags_table= CCF 3279 +dasm_printRegister8_table= CDF 3295 +dasm_printRegister8_table_HL= CFF 3327 +dasm_printRegisterIX_table= CE7 3303 +dasm_printRegisterIY_table= CEF 3311 +dasm_printRegisterSP_table= CF7 3319 +disassemble = 1B5 437 +disassemble_continue= 29B 667 +disassemble_err= 28B 651 +disassemble_next= 1B9 441 +disassemble_print_opcode_params_end= 288 648 +disassemble_print_opcode_params_loop= 234 564 +disassemble_print_opcode_raw= 1F6 502 +disassemble_print_opcode_raw_fill= 20A 522 +disassemble_table_first_match= 2CD 717 +disassemble_table_found= 2E7 743 +disassemble_table_notfound= 2EB 747 +disassemble_table_seek= 2A9 681 +disassemble_table_seek_loop= 2AD 685 +dump_pretty =16C9 5833 +dump_pretty_ascii=16F3 5875 +dump_pretty_ascii_cont=1711 5905 +dump_pretty_ascii_loop=16FB 5883 +dump_pretty_ascii_none=170C 5900 +dump_pretty_col=16E6 5862 +dump_pretty_end=1723 5923 +dump_pretty_nextrow=1717 5911 +dump_pretty_row=16D1 5841 +ide_printerror = E04 3588 +ide_readsector_256= D83 3459 +ide_readsector_256_done= DB2 3506 +ide_readsector_256_waitloop= D85 3461 +ide_readsector_512_inv= DB3 3507 +ide_readsector_512_inv_waitloop= DB8 3512 +ide_readsector_timeout= DEE 3566 +ide_regread_8 = D65 3429 +ide_regwrite_8 = D49 3401 +ide_reset = D3C 3388 +ide_writesector_256= E03 3587 +ideif_get_drv_pointer=1497 5271 +ideif_init_all =14AB 5291 +ideif_init_devtable=12B5 4789 +ideif_init_drive=13C8 5064 +ideif_prnt_devtable=12D3 4819 +iic_init =15DD 5597 +iic_read_ack =161C 5660 +iic_receive_buffer=15AE 5550 +iic_receive_buffer_done=15D1 5585 +iic_receive_buffer_err=15D7 5591 +iic_receive_buffer_loop=15BF 5567 +iic_receive_byte=16A2 5794 +iic_receive_byte_loop=16AF 5807 +iic_send_ack =1642 5698 +iic_send_buffer=1584 5508 +iic_send_buffer_done=15A2 5538 +iic_send_buffer_err=15A8 5544 +iic_send_buffer_loop=1594 5524 +iic_send_byte =167C 5756 +iic_send_byte_loop=1688 5768 +iic_send_ebit =15FB 5627 +iic_send_nack =165F 5727 +iic_send_sbit =15E6 5606 mon_var_template=44 68 -mon_var_template_end=70 112 -param_01 = 314 788 -param_02 = 33B 827 -param_03 = 358 856 -param_03_done = 390 912 -param_03_neg = 379 889 -param_04 = 394 916 -param_04_i = 3A4 932 -param_05 = 3AA 938 -param_06 = 3B7 951 -param_07 = 3D1 977 -param_08 = 3DE 990 -param_09 = 3F3 1011 -param_09_0A = 3F9 1017 -param_0A = 3EA 1002 -param_10 = 408 1032 -param_11 = 418 1048 -param_11_12 = 427 1063 -param_11_12_all= 447 1095 -param_11_12_def= 43A 1082 -param_11_12_ix = 43F 1087 -param_11_12_iy = 444 1092 -param_12 = 420 1056 -param_13 = 458 1112 -param_80 = 477 1143 -param_80_seek = 47E 1150 -param_81 = 46E 1134 -param_comma = 4B2 1202 -param_printRegister= 48D 1165 -param_printRegisterA= 4AB 1195 -param_printRegisterHL= 4A3 1187 -print_a_hex = 104 260 -print_bcd = 116 278 -print_char =D4 212 -print_clear =E7 231 -print_newLine =EE 238 -print_str =DC 220 -print_str_end =E6 230 -print_str_fixed=115E 4446 -print_wait_out =F9 249 -read_bcd = 12E 302 -read_char = 11C 284 -read_lba_sector= F13 3859 +mon_var_template_end= 3BF 959 +param_01 = 317 791 +param_02 = 33E 830 +param_03 = 35B 859 +param_03_done = 393 915 +param_03_neg = 37C 892 +param_04 = 397 919 +param_04_i = 3A7 935 +param_05 = 3AD 941 +param_06 = 3BA 954 +param_07 = 3D4 980 +param_08 = 3E1 993 +param_09 = 3F6 1014 +param_09_0A = 3FC 1020 +param_0A = 3ED 1005 +param_10 = 40B 1035 +param_11 = 41B 1051 +param_11_12 = 42A 1066 +param_11_12_all= 44A 1098 +param_11_12_def= 43D 1085 +param_11_12_ix = 442 1090 +param_11_12_iy = 447 1095 +param_12 = 423 1059 +param_13 = 45B 1115 +param_80 = 47A 1146 +param_80_seek = 481 1153 +param_81 = 471 1137 +param_comma = 4B5 1205 +param_printRegister= 490 1168 +param_printRegisterA= 4AE 1198 +param_printRegisterHL= 4A6 1190 +print_a_hex = 107 263 +print_bcd = 119 281 +print_char =D7 215 +print_clear =EA 234 +print_newLine =F1 241 +print_str =DF 223 +print_str_end =E9 233 +print_str_fixed=1763 5987 +print_wait_out =FC 252 +read_bcd = 131 305 +read_char = 11F 287 +read_lba_sector=14BE 5310 setup_vars 81F1 33265 -str_dev_notfound= F74 3956 -str_dev_ready = F5E 3934 -str_dev_ready2 = F6B 3947 -str_dev_waitready= F46 3910 -str_error_start= E3E 3646 -str_error_start1= E5B 3675 -str_error_start2= E64 3684 -str_error_time = E6D 3693 -str_post_apu =17A4 6052 -str_post_ide_30=1753 5971 -str_post_ide_40=176E 5998 -str_post_nd =17DA 6106 -str_post_ok =1812 6162 -str_post_pio =1789 6025 -str_post_rtc =17BF 6079 -str_post_rtc_iv=17E8 6120 +str_dev_done =1508 5384 +str_dev_waitready=14F0 5360 +str_error_start= E37 3639 +str_error_start1= E54 3668 +str_error_start2= E5D 3677 +str_error_time = E66 3686 +str_post_apu =1DFC 7676 +str_post_ide_30=1DAB 7595 +str_post_ide_40=1DC6 7622 +str_post_nd =1E32 7730 +str_post_ok =1E6A 7786 +str_post_pio =1DE1 7649 +str_post_rtc =1E17 7703 +str_post_rtc_iv=1E40 7744 var_apu_present=400A 16394 -var_buffer =402B 16427 var_buffer_len =4000 16384 var_bytes_count=411A 16666 var_curserchar =4006 16390 @@ -4624,6 +4690,8 @@ var_curseron =4005 16389 var_curserstate=4004 16388 var_curserx =4002 16386 var_cursery =4003 16387 +var_idebuffer =407B 16507 +var_input =402B 16427 var_last_char =4001 16385 var_opcode =4114 16660 var_opcode_length=4116 16662 diff --git a/OperatingSystem/iictest/zout/test.mon b/OperatingSystem/iictest/zout/test.mon index 8022c72..d62b5e5 100644 --- a/OperatingSystem/iictest/zout/test.mon +++ b/OperatingSystem/iictest/zout/test.mon @@ -1,6 +1,6 @@ !8000 CD 08 80 C9 01 04 00 00 21 E0 40 01 04 80 11 E4 !8010 40 0A 77 03 23 E5 ED 52 E1 C2 11 80 CD F1 81 21 -!8020 E0 84 CD 37 83 3E 0C CD 9C 82 3E 0F CD 4D 84 3E +!8020 E0 84 CD 37 83 3E 06 CD 9C 82 3E 0F CD 4D 84 3E !8030 00 1E 00 CD 60 84 21 69 81 CD 77 84 3E 00 1E 04 !8040 CD 60 84 C9 3A E1 40 5F 3A E0 40 CD 60 84 C9 F5 !8050 C5 0A F6 00 28 07 CD 60 80 03 C3 51 80 C1 F1 C9 diff --git a/OperatingSystem/monitor_v2/include/cmd_disk.s b/OperatingSystem/monitor_v2/include/cmd_disk.s index a446c9b..ec3c920 100644 --- a/OperatingSystem/monitor_v2/include/cmd_disk.s +++ b/OperatingSystem/monitor_v2/include/cmd_disk.s @@ -11,7 +11,7 @@ OP_SELDSK: jr c,_OP_SELDSK_INVALID cp 4 jr nc, _OP_SELDSK_INVALID - call 0x8000 + call ideif_drv_sel ret _OP_SELDSK_INVALID: @@ -22,5 +22,17 @@ _OP_SELDSK_INVALID: CALL beep ret +OP_DIR: + CALL fat_print_directory + ret + +OP_CD: + call fat_cd_single + ret + _OP_SELDSK_INVALID_STR: - db 10,13,"Invalid drive letter",10,13,0 \ No newline at end of file + db 10,13,"Invalid drive letter",10,13,0 + +OP_FSEXEC: + call fat_exec + ret \ No newline at end of file diff --git a/OperatingSystem/monitor_v2/include/command.s b/OperatingSystem/monitor_v2/include/command.s index 5445e0e..654eb7a 100644 --- a/OperatingSystem/monitor_v2/include/command.s +++ b/OperatingSystem/monitor_v2/include/command.s @@ -13,6 +13,9 @@ COMMAND_LUT: db "rst", 0,0x00,0x00 ;soft reset db "lsdsk", 0,[OP_LSDSK], [OP_LSDSK]>>8 ;list disks db "seldsk ", 0,[OP_SELDSK], [OP_SELDSK]>>8 ;select disk + db "cd ", 0 , [OP_CD], [OP_CD]>>8 ;Read time + db "ls", 0 , [OP_DIR], [OP_DIR]>>8 ;Read time + db "run ", 0 , [OP_FSEXEC], [OP_FSEXEC]>>8 ;Read time db "$", 0, [OP_EXEC], [OP_EXEC]>>8 ;jump to addr db "i", 0, [OP_IO_IN], [OP_IO_IN]>>8 ;Read port db "o", 0, [OP_IO_OUT], [OP_IO_OUT]>>8 ;Write port @@ -20,14 +23,14 @@ COMMAND_LUT: db "?", 0, [OP_DUMP], [OP_DUMP]>>8 ;Print memory db 0xFF ;End of Table -IN_BUFFER .equ var_buffer - COMMAND: call print_newLine + ld hl,[var_dir] + call print_str ld a,'>' call print_char xor a ;reset buffer len - ld (var_buffer_len),a + ld (var_buffer_len),a ;set buffer len to 0 COMMAND_READ: call read_char jp z, COMMAND_READ ;wait for input @@ -40,7 +43,7 @@ COMMAND_READ: push af ; a contains latest char - ld hl,[var_buffer] + ld hl,[var_input] ld d,0 ld a,(var_buffer_len) ld e,a @@ -65,7 +68,7 @@ COMMAND_BACKSPACE: ld (var_buffer_len),a ;and store it ld e,a ;load de with decremented value ld d,0 - ld hl,[var_buffer] + ld hl,[var_input] add hl,de ;hl now contains pointer to last position in buffer xor a ; store null byte to current location ld (hl),a @@ -81,7 +84,7 @@ COMMAND_PROCESS: ;compare LD HL,[COMMAND_LUT] ;Lookup table COMMAND_PROCESS_LOOP: - LD DE,[var_buffer] ;Buffer + LD DE,[var_input] ;Buffer LD A,(HL) ;Load first byte of entry CP 0xFF JP Z,COMMAND_PROCESS_NOT_FOUND ;if first byte is 0xFF, End is reached diff --git a/OperatingSystem/monitor_v2/include/console.s b/OperatingSystem/monitor_v2/include/console.s index 9acbda1..a5c1a1c 100644 --- a/OperatingSystem/monitor_v2/include/console.s +++ b/OperatingSystem/monitor_v2/include/console.s @@ -132,6 +132,24 @@ _read_bcd_invalid ld a, 0xFF ret +print_32_hex: + ld a,(ix+3) + call print_a_hex + ld a,(ix+2) + call print_a_hex + ld a,(ix+1) + call print_a_hex + ld a,(ix+0) + call print_a_hex + ret + +print_16_hex: + ld a,(ix+1) + call print_a_hex + ld a,(ix+0) + call print_a_hex + ret + ;MSG_CRSR_0: ; db 0x1B, "[?25h",0 @@ -154,4 +172,66 @@ A_RTS_ON: out (CS_SIO_A_C),A ld a,0EAh ;DTR active, TX 8bit, BREAK off, TX on, RTS active out (CS_SIO_A_C),A + ret + +;------------------------------------------------------------------------------ +; PRINTINLINE +; +; String output function +; +; Prints in-line data (bytes immediately following the PRINTINLINE call) +; until a string terminator is encountered (0 - null char). +;------------------------------------------------------------------------------ +PRINTINLINE: + EX (SP),HL ; PUSH HL and put RET ADDress into HL + PUSH AF + PUSH BC +nxtILC: + LD A,(HL) + CP 0 + JR Z,endPrint + CALL print_char + INC HL + JR nxtILC +endPrint: + INC HL ; Get past "null" terminator + POP BC + POP AF + EX (SP),HL ; PUSH new RET ADDress on stack and restore HL + RET + +print_reg: + push af + push de + push bc + push hl + push af + call PRINTINLINE + db 10,13,"A: ",0 + pop af + call print_a_hex + call PRINTINLINE + db 10,13,"BC: ",0 + ld a,b + call print_a_hex + ld a,c + call print_a_hex + call PRINTINLINE + db 10,13,"DE: ",0 + ld a,d + call print_a_hex + ld a,e + call print_a_hex + pop af + call PRINTINLINE + db 10,13,"HL: ",0 + ld a,h + call print_a_hex + ld a,l + call print_a_hex + call print_newLine + pop hl + pop bc + pop de + pop af ret \ No newline at end of file diff --git a/OperatingSystem/monitor_v2/include/fat16.s b/OperatingSystem/monitor_v2/include/fat16.s new file mode 100644 index 0000000..8368dee --- /dev/null +++ b/OperatingSystem/monitor_v2/include/fat16.s @@ -0,0 +1,622 @@ +; VARS + + phase MEM_IDE_FSBUFFER +MEM_FAT_RESERVED: ; Reserved sectors (2byte) + defs 2 +MEM_FAT_AMOUNT: ; Amount of FATs (1byte) + defs 1 +MEM_FAT_SECTORS: ; Length of FAT (2byte) + defs 2 +MEM_FAT_CLUSTERLEN: ; Length of Cluster (1byte) + defs 1 +MEM_FAT_COUNT1: ; Counter Var for reading FAT (2byte) + defs 1 +MEM_FAT_TMPPOINTER: ; Temporary working pointer + defs 4 +MEM_FAT_DATASTART: ; Start of data area + defs 4 +MEM_FAT_ROOTSTART: ; Start of Root directory + defs 4 +MEM_FAT_FILEREMAIN: ; Remaining sectors in file + defs 4 +MEM_FAT_DIRSEC: ; Sectors per directory + defs 2 +MEM_FAT_TMPFNAME: ; Temporary filename + defs 16 +MEM_FAT_CURDIR: ; Current Directory + defs 80 +MEM_FAT_OF0_ATTRIBUTE: ;Current file attribute + defw 0 +MEM_FAT_OF0_CCLUST: ;Current cluster of file + defw 0 +MEM_FAT_OF0_FATSEC: ;Current sector in FAT + defs 4 +MEM_FAT_OF0_DATSEC: ;Current sector in Data + defs 4 +MEM_FAT_OF0_DATREM: ;Remaining bytes in Data + defs 4 +MEM_FAT_CURRDIR: ;Current directory + defs 4 +MEM_FAT_EXEC_CURR: + defw 0 +MEM_FAT_EXEC_COUNT: + defw 0 +MEM_FAT_EXEC_START: + defw 0 + + dephase + +;------------------------------------- +; Get FAT Root-Table position +;------------------------------------- +fat_get_root_table: + call fat_reset_pointer ;reset fat pointer + + ; Load first sector on active partition + LD HL, MEM_IDE_POINTER ; pointer to LBA address + LD A,1 ;read 1 sector + LD DE, MEM_IDE_BUFFER ;where to store data? + call read_lba_sector + + ; check for valid Boot sector + ld a,(MEM_IDE_BUFFER) + cp 0xEB ;first byte should be 0xEB + jp nz, _fat_get_root_table_invalid + + ; Read and store FS Properties + LD IX,MEM_IDE_BUFFER + LD A,(IX+0x0D) + LD (MEM_FAT_CLUSTERLEN),A + LD A,(IX+0x0E) + LD (MEM_FAT_RESERVED),A + LD A,(IX+0x0F) + LD (MEM_FAT_RESERVED+1),A + LD A,(IX+0x10) + LD (MEM_FAT_AMOUNT),A + LD A,(IX+0x16) + LD (MEM_FAT_SECTORS),A + LD A,(IX+0x17) + LD (MEM_FAT_SECTORS+1),A + + ;Get Data Start Sector + ;calculate fat length + ld bc,(MEM_FAT_SECTORS) + ld a,(MEM_FAT_AMOUNT) ;add fat to cluster number + ld d,0 + ld e,a + call _fat_math_mul32 + ; BCHL contains result -> store to PTR.MEM_FAT_ROOTSTART + ld (MEM_FAT_ROOTSTART+0),hl + ld (MEM_FAT_ROOTSTART+2),bc + + ;add offset (reserved sectors) + ld hl,(MEM_IDE_BUFFER +0x0E) ; load sectors into hl + ld (MEM_FAT_TMPPOINTER), hl + xor a + ld (MEM_FAT_TMPPOINTER+2),a + ld (MEM_FAT_TMPPOINTER+3),a + + ld bc,[MEM_FAT_ROOTSTART] + ld de,[MEM_FAT_TMPPOINTER] + call _fat_math_add32 ;MEM_FAT_ROOTSTART now contains the first sector + ;of the Root directory + + ;add offset (partition location) + call ideif_get_drv_pointer + inc ix + inc ix + push ix + pop de ;copy poiter to hl + ld bc,[MEM_FAT_ROOTSTART] + call _fat_math_add32 ;MEM_FAT_OF0_DATSEC now contains the first sector + ;of the cluster + ;copy value from MEM_FAT_ROOTSTART to MEM_IDE_POINTER + ld hl,MEM_FAT_ROOTSTART + ld de,MEM_IDE_POINTER + ldi + ldi + ldi + ldi + + ;copy value from MEM_FAT_ROOTSTART to MEM_IDE_POINTER + ld hl,MEM_FAT_ROOTSTART + ld de,MEM_FAT_DATASTART + ldi + ldi + ldi + ldi + + ld hl,MEM_FAT_ROOTSTART + ld de,MEM_FAT_CURRDIR + ldi + ldi + ldi + ldi + + ;add offset to data area + ;multiply cluster by length of cluster + + ;calculate sectors for root dir + ld hl,(MEM_IDE_BUFFER+0x11) ;load Maximum root directory entries + ld a,h + ld l,a + xor a ;set a 0, clear carry flag + ld h,a ;shift right by 8 bit = /512 + + ;last step: multiply by 16 + ex de,hl + ld bc,16 + call _fat_math_mul32 + ; BCHL contains result -> store to PTR.MEM_FAT_TMPPOINTER + ld (MEM_FAT_TMPPOINTER+0),hl + ld (MEM_FAT_TMPPOINTER+2),bc + + ld (MEM_FAT_DIRSEC),hl + ; add offset to MEM_FAT_DATASTART + ld de,[MEM_FAT_TMPPOINTER] + ld bc,[MEM_FAT_DATASTART] + call _fat_math_add32 ;MEM_FAT_DATASTART now contains the correct sector + ;at teh beginnig of the data area + + + ;done all FS vars populated + + ;navigate to root directory + ld a,'\' + ld(MEM_FAT_CURDIR),a + xor a + ld(MEM_FAT_CURDIR+1),a + + ret + +_fat_get_root_table_invalid: + call PRINTINLINE + db 10,13,"Cannot find boot sector.",10,13,0 + call ideif_get_drv_pointer + ld (ix+0),0x02 + ret + +;------------------------------------- +; fat_getfatsec +; +; gets sector in FAT table for the cluster stored in MEM_FAT_OF0_CCLUST +; +; store result in MEM_FAT_OF0_FATSEC +; stores next cluster in MEM_FAT_OF0_CCLUST +;------------------------------------- +fat_getfatsec: + ld HL,(MEM_FAT_OF0_CCLUST) ;load cluster + ld a,h ;if not 0x0000 + or l + jp nz, _fat_getfatsec_notroot + ;if 0x0000, goto root directory + ld hl,MEM_FAT_ROOTSTART + ld de,MEM_FAT_OF0_DATSEC + ldi ;quick and dirty hack to go back to root directory + ldi + ldi + ldi + ret + +_fat_getfatsec_notroot: + ld HL,(MEM_FAT_OF0_CCLUST) ;load cluster + ;each sector contains 256 clusters + ;first 8bits are not needed (/256) + ld a,h ;divide by 256 + ld l,a + xor a + ld h,a + + ld bc,(MEM_FAT_RESERVED) ;add reserved sectors + add hl,bc + ld(MEM_FAT_OF0_FATSEC+0),hl;store sector + xor a + ld(MEM_FAT_OF0_FATSEC+2),a + ld(MEM_FAT_OF0_FATSEC+3),a + + call ideif_get_drv_pointer + inc ix + inc ix + push ix + pop de ;copy poiter to hl + ld bc,[MEM_FAT_OF0_FATSEC] + call _fat_math_add32 ;MEM_FAT_OF0_FATSEC now contains the correct sector + ;in the FAT + + ;read FAT sector + ld hl,MEM_FAT_OF0_FATSEC ;read next sector + ld b,1 + LD DE, MEM_IDE_BUFFER ;where to store data? + call read_lba_sector + + ;calculate data sector + ;multiply cluster by length of cluster + xor a ;clear carry + ld a,(MEM_FAT_CLUSTERLEN) + ld b,0 + ld c,a + ld de,(MEM_FAT_OF0_CCLUST) ;load cluster number + dec de ; sub 2 becaus fat starts at 3 + dec de + call _fat_math_mul32 + ; BCHL contains result -> store to PTR.MEM_FAT_OF0_DATSEC + ld (MEM_FAT_OF0_DATSEC+0),hl + ld (MEM_FAT_OF0_DATSEC+2),bc + + ; add start of data region to addr + ld bc,[MEM_FAT_OF0_DATSEC] + ld de,[MEM_FAT_DATASTART] + call _fat_math_add32 ;MEM_FAT_OF0_FATSEC now contains the correct sector + ;in the FAT + ;MEM_FAT_OF0_DATSEC now has the first sector of the selected cluster + + ;reset MEM_FAT_OF0_DATREM to default cluster length + ld a,(MEM_FAT_CLUSTERLEN) + ld l,a + ld h,0 + ld (MEM_FAT_OF0_DATREM), hl + + ;get next cluster + ;calculate offset address + ld a,(MEM_FAT_OF0_CCLUST) + RLA ;shift to left (x2) + ld l, a + ld a,0 + RLA ;shift in carry flag + ld h,a + ld de,MEM_IDE_BUFFER + add hl,de + ;copy pointer (hl to de) + ld de,MEM_FAT_OF0_CCLUST + ldi ;copy byte for next cluster from FAT + ldi + ret + ;store data + +;------------------------------------- +; fat_readfilesec +; +; reads single sector of file +; must run fat_readfilesec before to initialize +; if a ix 0x00, success +; if a is 0xFF, end reached +; +; DE contains destination address +;------------------------------------- +fat_readfilesec: + ;call fat_print_dbg + ld hl,[MEM_FAT_OF0_DATSEC] + ld b,1 + ;LD DE, MEM_IDE_BUFFER ;where to store data? + call read_lba_sector ;read sectore + ld hl,[MEM_FAT_OF0_DATSEC] ;increment pointer to next sector + call _fat_increment_32 ;*** + ld hl,(MEM_FAT_OF0_DATREM) ;reduce counter + xor a + ld de,1 + sbc hl,de ;decrement counter + ld (MEM_FAT_OF0_DATREM),hl ;store decremented counter + ret nz ;when not zero, exit function + ;if zero: + ld a, 0xFF ;preload error code + ld hl,(MEM_FAT_OF0_CCLUST) ;check next chunk + ld de,0xFFFF ;end mark + sbc hl,de ;if Z match + ret z ;If 0xFFFF, end is reched. Return + ;if next cluster available: + xor a + call fat_getfatsec ; read next cluster information + ret + + +;------------------------------------- +; fat_openfile +; search for entry in current directory +; +; DE pointer to file name +; sets: +; - MEM_FAT_OF0_CCLUST +; - MEM_FAT_OF0_ATTRIBUTE +; - MEM_FAT_FILEREMAIN +; if a is 0x00, success +; if a is 0xFF, end reached +;------------------------------------- +fat_openfile: + PUSH DE + ;MEM_FAT_TMPFNAME now has valid text to compare + LD HL,[MEM_FAT_TMPFNAME] + call format_filename_fat16 + POP DE +fat_openfile_noprepare: + PUSH DE + ;prepare pointer + ld hl,MEM_FAT_CURRDIR + ld de,MEM_IDE_POINTER + ldi + ldi + ldi + ldi + + LD A,(MEM_FAT_DIRSEC) ;init counter for FAT sectors + LD (MEM_FAT_COUNT1),A + + LD HL,MEM_IDE_POINTER ;read first sector + LD B,1 + LD DE, MEM_IDE_BUFFER ;where to store data? + call read_lba_sector + + LD HL, MEM_IDE_BUFFER ;set buffer start + LD C,16 ;set entries counter + +_fat_lfs_loop: + LD DE,[MEM_FAT_TMPFNAME] + CALL compare_filename + JR C, _fat_lfs_loop_compare_match ;on match + + ; prepare next entry + DEC C ;next sector after 16 entries + JR Z,_fat_lfs_loop_compare_next_sector + LD DE, 32 ;length of entry + ADD HL,DE ;increment + JP _fat_lfs_loop + +_fat_lfs_loop_compare_next_sector: + ld hl,[MEM_IDE_POINTER] + call _fat_increment_32 ;increment sector + + LD A,(MEM_FAT_COUNT1) ; decrement sector count (max FAT length) + DEC A + LD (MEM_FAT_COUNT1),A + JP Z, _fat_lfs_loop_compare_end ; if DE is 0, mmax is reached. End here + ;call print_a_hex + + LD HL,MEM_IDE_POINTER ;read next sector + LD B,1 + LD DE, MEM_IDE_BUFFER ;where to store data? + call read_lba_sector + + LD HL, MEM_IDE_BUFFER ;set buffer start + LD C,16 ;set entries counter + + ld a,(HL) + or a + jp z, _fat_lfs_loop_compare_end ;skip empty sectors + + JP _fat_lfs_loop + +_fat_lfs_loop_compare_end: + POP DE + ld a,0xFF + RET + +_fat_lfs_loop_compare_match: + ; get entry + POP DE + + ; HL points to Start of Table item + PUSH HL + POP IX + ; get important information + ld a,(ix+0x1B) ;first cluster number + ld (MEM_FAT_OF0_CCLUST+1),a + ld a,(ix+0x1A) + ld (MEM_FAT_OF0_CCLUST+0),a + ld a,(ix+0x0B) + ld (MEM_FAT_OF0_ATTRIBUTE+0),a + + xor a ;clear carry ;set MEM_FAT_OF0_DATREM to remaining sectors + ld a,(ix+0x1F) ;cluste length shift by 256 + rra + ld (MEM_FAT_FILEREMAIN+2),a + ld a,(ix+0x1E) + rra + ld (MEM_FAT_FILEREMAIN+1),a + ld a,(ix+0x1D) + rra + ld (MEM_FAT_FILEREMAIN+0),a + ld a,0 + ld (MEM_FAT_FILEREMAIN+3),a + call fat_getfatsec ;get sector information + + xor a + RET + + +;=================== UTIL Functions =========================== +; 32 Bit addition to pointer +; HL has value +;deprecated!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +_fat_math_sector_add_16: + ld (MEM_FAT_TMPPOINTER), hl + xor a + ld (MEM_FAT_TMPPOINTER+2),a + ld (MEM_FAT_TMPPOINTER+3),a + + ld de,[MEM_FAT_TMPPOINTER] + ld bc,[MEM_IDE_POINTER] + call _fat_math_add32 + ret +;deprecated!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + + ;hl contains pointer +_fat_increment_32 + ld a,(HL) ; byte 0 + add 1 + ld (hl),a + inc hl + ld a,(HL) ; byte 1 + adc 0 + ld (hl),a + inc hl + ld a,(HL) ; byte 2 + adc 0 + ld (hl),a + inc hl + ld a,(HL) ; byte 3 + adc 0 + ld (hl),a + ret + ;bc contains pointer to a (also result) + ;de contains pointer to b +_fat_math_add32 + push hl + push bc + push de + ld a,(de) ; load lower 16bit for B int from (DE) to HL + ld l,a + inc de + ld a,(de) + ld h,a + inc de + ; HL, DE dirty + ld a,(bc) ; load lower 16bit for A int from (BC) to DE + ld e,a + inc bc + ld a,(bc) + ld d,a + ; HL now contains A, DE now contains D + add hl,de ;add lower bytes, store carry + pop de ;restore pointers + pop bc ;both now cointain first byte of long-value + ld a,l ;store lower result in (bc) + ld (bc),a + inc bc + ld a,h + ld (bc),a + inc bc + inc de ;also increment de to next byte + inc de + ; DE and HL now start at the upper byte + push bc + push de + ld a,(de) ; load upper 16bit for B + ld l,a + inc de + ld a,(de) + ld h,a + inc de + ld a,(bc) ; load upper 16bit for A + ld e,a + inc bc + ld a,(bc) + ld d,a + adc hl,de ;add upper bytes, store carry + pop de + pop bc + ld a,l ;store lower result in (bc) + ld(bc),a + inc bc + ld a,h + ld(bc),a + pop hl + ret + + +; Multiply 16-bit values (with 32-bit result) +; Operands BC, DE +; Result -> BCHL +_fat_math_mul32: + ld a,c + ld c,b + ld hl,0 + ld b,16 +_fat_math_mul32_l: + add hl,hl + rla + rl c + jr nc,_fat_math_mul32_noadd + add hl,de + adc a,0 + jp nc,_fat_math_mul32_noadd + inc c +_fat_math_mul32_noadd: + djnz _fat_math_mul32_l + ld b,c + ld c,a + ret + +; reset LBA pointer to first sector in selected partition +fat_reset_pointer: + call ideif_get_drv_pointer + inc ix + inc ix + push ix + pop hl ;copy poiter to hl + ld de, MEM_IDE_POINTER + jr fat_copy_lba_pointer + +; resets LBA pointer (4-byte) to partition start +; HL = from here +; DE = to this destimation +fat_copy_lba_pointer: + PUSH BC + LD B,0 + LD C,4 + LDIR + POP BC + ret + +; compares filenames +; HL points to name1 +; DE points to name2 +; Carry is set if match +; Destroys DE, AF +compare_filename: + PUSH HL + push BC + LD B, 11 ;Counter +_compare_filename_loop: + LD A,(DE) + LD C,A + LD A,(HL) + INC HL + INC DE + XOR C ;check if identical (should return 0) + JR NZ, _compare_filename_nomatch + djnz _compare_filename_loop ;if not last, continue + POP BC + POP HL + SCF + RET +_compare_filename_nomatch: + POP BC + POP HL + XOR A ; clear carry flag + RET + +; formats filename to 8+3 format +; DE points to source filename to string +; HL points to destination +format_filename_fat16: + LD B, 11 ;counter + PUSH HL + LD A, ' ' +_format_filename_fat16_clean: + LD (HL),A + INC HL + DJNZ _format_filename_fat16_clean + POP HL ; continue with copy + LD B, 13 +_format_filename_fat16_loop: + LD A, (DE) ; load byte + OR A + RET Z ;exit on 0byte + DEC B ;reduce counter + RET Z ;exit after 12 bytes 8+.+3 + CP '.' ; check if dot + JR NZ, _format_filename_fat16_loop_copy ; if not continue as usual + INC DE ;else skip char +_format_filename_fat16_loop_skip_8: + LD A,B + CP 5 + JR C, _format_filename_fat16_loop + INC HL + DEC B + JR _format_filename_fat16_loop_skip_8 + +_format_filename_fat16_loop_copy: + LD A, (DE) ; load byte + LD (HL), A ; copy byte + INC HL + INC DE + JP _format_filename_fat16_loop \ No newline at end of file diff --git a/OperatingSystem/monitor_v2/include/fat16_cmd.s b/OperatingSystem/monitor_v2/include/fat16_cmd.s new file mode 100644 index 0000000..bb08b71 --- /dev/null +++ b/OperatingSystem/monitor_v2/include/fat16_cmd.s @@ -0,0 +1,366 @@ +;------------------------------------- +; Print current fat directory of MEM_FAT_CURRDIR +;------------------------------------- +fat_print_directory: + ld hl,MEM_FAT_CURRDIR + ld de,MEM_IDE_POINTER + ldi + ldi + ldi + ldi + + LD DE,(MEM_FAT_SECTORS) + LD (MEM_FAT_COUNT1),DE + LD HL,MEM_IDE_POINTER ;read first sector + LD B,1 + LD DE, MEM_IDE_BUFFER ;where to store data? + call read_lba_sector + + call PRINTINLINE + db 10,13," Filename Cluster Size",10,13,0 + + LD HL, MEM_IDE_BUFFER ;set buffer start + LD C,16 ;set entries counter + +_fat_print_directory_loop: ;loop over each entry (32byte) + LD A,(HL) ; check first byte + PUSH HL ;backup start of entry + POP IX + PUSH HL + ;ignore unwanted entries + CP 0x41 ;skip invisible + JP Z, _fat_print_directory_loop_next + CP 0xE5 ;skip deleted + JP Z, _fat_print_directory_loop_next + CP 0x00 ;reached end + JP Z, _fat_print_directory_loop_break + + ;check file attribute + ld a,(IX+0x0B) + cp 0x10 ;if subdirectors + jp z, _fat_print_directory_dir ;print dir + ;else print file +_fat_print_directory_loop_file + ;print filename + ld a,' ' + call print_char + ld a,' ' + call print_char + LD B,8 + call print_str_fixed + ld A,'.' + call print_char + LD B,3 + call print_str_fixed + + call PRINTINLINE + db " 0x",0 + ;first cluster number + ld a,(ix+0x1B) + call print_a_hex + ld a,(ix+0x1A) + call print_a_hex + call PRINTINLINE + db " 0x",0 + ld a,(ix+0x1F) + call print_a_hex + ld a,(ix+0x1E) + call print_a_hex + ld a,(ix+0x1D) + call print_a_hex + ld a,(ix+0x1C) + call print_a_hex + call print_newLine + jr _fat_print_directory_loop_next +_fat_print_directory_dir + ld a,'D' + call print_char + ld a,' ' + call print_char + LD B,8 + call print_str_fixed + call PRINTINLINE + db " 0x",0 + ;first cluster number + ld a,(ix+0x1B) + call print_a_hex + ld a,(ix+0x1A) + call print_a_hex + call print_newLine + jr _fat_print_directory_loop_next + +_fat_print_directory_loop_next: ; read next entry + DEC C ;next sector after 32 entries + JR Z,_fat_print_directory_loop_next_sector + POP HL ;restore start + LD DE, 32 ;length of entry + ADD HL,DE ;increment + JP _fat_print_directory_loop + +_fat_print_directory_loop_next_sector: ; end fo sector. read next sector from disk + POP HL ;clear stack from old hl + LD H,0 + LD L,1 + call _fat_math_sector_add_16 ;increment sector + + LD DE,(MEM_FAT_COUNT1) ; decrement sector count (max FAT length) + DEC DE + LD (MEM_FAT_COUNT1),DE + LD A,D + OR E + RET Z ; if DE is 0, mmax is reached. End here + + LD HL,MEM_IDE_POINTER ;read next sector + LD B,1 + + LD DE, MEM_IDE_BUFFER ;where to store data? + call read_lba_sector + + LD HL, MEM_IDE_BUFFER ;set buffer start + LD C,16 ;set entries counter + JP _fat_print_directory_loop + +_fat_print_directory_loop_break + POP HL + ret + +;------------------------------------- +; Changes current fat directory of MEM_FAT_CURRDIR +; input is relativ path +; DE points to path +;------------------------------------- +fat_cd_single: + push de + ; check if user wants to go back (input = '..') + ld a,(de) + cp '.' + jr nz, _fat_cd_navigate; if not, skip + inc de ;check next + ld a,(de) + cp '.' + jr nz, _fat_cd_navigate; if not, skip + ld a,(var_dir+79) ;last byte contains depth + or a; Test if 0 + jp z, _fat_cd_navigate_error ;cannot go back any more (already at root) + ; check if .. exists in directory + ld a,'.' ;prepare filename buffer + ld hl,[MEM_FAT_TMPFNAME] + ld (hl),a + inc hl + ld (hl),a + inc hl + ld a,0x20 ;clear char 3-11 + ld b,11 +_fat_cd_navigate_goback_fl: + ld (hl),a + inc hl + djnz _fat_cd_navigate_goback_fl ;fill loop end + call fat_openfile_noprepare ;load file table (only 1st sector needed) + or a ;check for error + jp nz, _fat_cd_navigate_error ;entry not found exception + + + ; find end of path + ld hl,[var_dir+3] ;current position + ld bc,76 + ld a,0x00 ;termination char + cpir ;find end + jp po,_fat_cd_navigate_inerror ;in case of error, abort + ;hl is now at end of string + ld bc,76 + ld a,'\' ;seperation char + cpdr ;serach backwards for "/" + jp po,_fat_cd_navigate_inerror ;in case of error, abort + ;hl is now at end of string + inc hl + xor a + ld (hl),a ;set termination char + inc hl + ld (hl),a ;set termination char + ld a,(var_dir+79) + dec a + ld (var_dir+79),a ;decrement dir depth counter + + pop de + + ld hl,[var_dir+2] + ld a,'\' + ld (hl),a ;set first / + + ld hl,MEM_FAT_OF0_DATSEC ;setup directory pointer + ld de,MEM_FAT_CURRDIR + ldi + ldi + ldi + ldi + + ret + +_fat_cd_navigate + pop de ;get pointer to directory namme + push de ;and re-store it for next use + call fat_openfile ;find 'file' in current directory +_fat_cd_navigate_findsec + or a + jp nz, _fat_cd_navigate_error ;entry not found + ld a, (MEM_FAT_OF0_ATTRIBUTE) + cp 0x10 + jp nz, _fat_cd_navigate_errfile + ld a,(var_dir+79) + inc a + ld (var_dir+79),a ;increment dir depth counter + ld hl,[var_dir+2] ;load start of path string + ld a,0 ;load termination char + ld bc,76 ;max length of string + cpir ;find end of path string + dec hl + jp po,_fat_cd_navigate_inerror ;in case of error, abort + ;HL now has last element, BC has remaining max length + ld a,(var_dir+79) ;last byte contains depth + cp 1 ;if first path, skip / + jr z, _fat_cd_navigate_findsec_skipslash + ld a,'\' + ld (hl),a + inc hl +_fat_cd_navigate_findsec_skipslash + pop de ;get argument from stack + ex de,hl + push de ;store start to stack + ;HL now has start of input string, DE has end of current path + ld bc,09 ;maximum length of directory name +1 +_fat_cd_navigate_l2: ;copy new subdirectory + ldi ;copy + jp po,_fat_cd_navigate_inerrorS ;in case of error, abort + ld a,(hl) ;check next char + cp '\' ;end at '\' + jr z, _fat_cd_navigate_end ;else next byte + or a ;or and at 0x00 + jr z, _fat_cd_navigate_end ;else next byte + jr _fat_cd_navigate_l2 +_fat_cd_navigate_end: + xor a + ld (de),a ;set last byte to 0x00 (termination) + ld hl,MEM_FAT_OF0_DATSEC + ;setup directory pointer + ld de,MEM_FAT_CURRDIR + ldi + ldi + ldi + ldi + pop de ;stack cleanup + ret + +_fat_cd_navigate_error: + ld hl,[_fat_cd_navigate_error_str] + call print_str + pop de + ret + +_fat_cd_navigate_inerrorS: ;with path reset + pop de ;restore former path + dec de ;change pointer to remove previous '\' as well + xor a ;clear a to 0x00 + ld (de),a ;set last byte to 0x00 (termination) + jr _fat_cd_navigate_inerrore +_fat_cd_navigate_inerror: ;without path reset + pop de +_fat_cd_navigate_inerrore: + ld hl,[_fat_cd_navigate_inputerr_str] + call print_str + ret +_fat_cd_navigate_errfile: + pop de + ld hl,[_fat_cd_navigate_errfile_str] + call print_str + ret + +_fat_cd_navigate_error_str: + db 10,13,"No such directory!",10,13,0 +_fat_cd_navigate_inputerr_str: + db 10,13,"Invalid input!",10,13,0 +_fat_cd_navigate_errfile_str: + db 10,13,"Cannot cd to file!",10,13,0 + +fat_exec: + push de + ;DE has pointer to arguments + call fat_openfile + or a + jp nz, _fat_exec_notfound ;if not found, abort + ;call fat_print_dbg + ;load header + ld de, MEM_IDE_BUFFER + call fat_readfilesec + + + ;ld hl, MEM_IDE_BUFFER ;print sector + ;ld b,0x20 + ;call dump_pretty + + ld a,(MEM_IDE_BUFFER) + cp 0xC3 + jp nz, _fat_exec_notexec + + call PRINTINLINE + db 10,13,"Loading ",0 + ld hl,[var_input+6] + call print_str + call PRINTINLINE + db " to 0x",0 + ;get start address + ld bc,(MEM_IDE_BUFFER + 10) + ld a,b + call print_a_hex + ld a,c + call print_a_hex + call PRINTINLINE + db " ... ",0 + ;bc has start addr + ld (MEM_FAT_EXEC_CURR),bc + ld (MEM_FAT_EXEC_START),bc + + ;get amount of sectors to load + ld hl,(MEM_IDE_BUFFER + 14) + ld l,h + srl l + ld h,0 ;divide by 512 + inc hl ;increment because first sector is always loaded + ; hl contains sector count + ld (MEM_FAT_EXEC_COUNT), hl + + pop de ; restore filename + call fat_openfile ;reset file information + ;start reading +_fat_exec_readloop1: + ld de,(MEM_FAT_EXEC_CURR) + call fat_readfilesec + ld hl,(MEM_FAT_EXEC_CURR) + ld de,512 + add hl,de + ld (MEM_FAT_EXEC_CURR),hl + + ld hl,(MEM_FAT_EXEC_COUNT) + dec hl + ld (MEM_FAT_EXEC_COUNT),hl + ld a,h + or l + jr z, _fat_exec_read_done + jr _fat_exec_readloop1 +_fat_exec_read_done: + call PRINTINLINE + db "Load complete!",10,13,0 + ld hl,(MEM_FAT_EXEC_START) + jp (hl) + + +_fat_exec_notfound: + pop de + call PRINTINLINE + db 10,13,"File not found!",10,13,0 + ret + +_fat_exec_notexec: + pop de + call PRINTINLINE + db 10,13,"File is not an executable!",10,13,0 + ret \ No newline at end of file diff --git a/OperatingSystem/monitor_v2/include/fat16_dbg.s b/OperatingSystem/monitor_v2/include/fat16_dbg.s new file mode 100644 index 0000000..90bcea3 --- /dev/null +++ b/OperatingSystem/monitor_v2/include/fat16_dbg.s @@ -0,0 +1,77 @@ +fat_print_dbg: + call PRINTINLINE + db 10,13,"PTR.MEM_IDE_POINTER: 0x",0 + ld ix,MEM_IDE_POINTER + call print_32_hex + call PRINTINLINE + db " | PTR.MEM_IDE_PARTITION: 0x",0 + ld ix,MEM_IDE_PARTITION + call print_32_hex + + call PRINTINLINE + db 10,13,"PTR.MEM_FAT_TMPPOINTER: 0x",0 + ld ix,MEM_FAT_TMPPOINTER + call print_32_hex + call PRINTINLINE + db " | PTR.MEM_FAT_DATASTART: 0x",0 + ld ix,MEM_FAT_DATASTART + call print_32_hex + + call PRINTINLINE + db 10,13,"VAL.MEM_FAT_RESERVED: 0x",0 + ld ix,MEM_FAT_RESERVED + call print_16_hex + call PRINTINLINE + db " | VAL.MEM_FAT_AMOUNT: 0x",0 + ld a,(MEM_FAT_AMOUNT) + call print_a_hex + + call PRINTINLINE + db 10,13,"VAL.MEM_FAT_SECTORS: 0x",0 + ld ix,MEM_FAT_SECTORS + call print_16_hex + call PRINTINLINE + db " | VAL.MEM_FAT_COUNT1: 0x",0 + ld a,(MEM_FAT_COUNT1) + call print_a_hex + + call PRINTINLINE + db 10,13,"VAL.MEM_FAT_OF0_CCLUST: 0x",0 + ld ix,MEM_FAT_OF0_CCLUST + call print_16_hex + call PRINTINLINE + db " | PTR.MEM_FAT_OF0_FATSEC: 0x",0 + ld ix,MEM_FAT_OF0_FATSEC + call print_32_hex + + call PRINTINLINE + db 10,13,"VAL.MEM_FAT_OF0_DATSEC: 0x",0 + ld ix,MEM_FAT_OF0_DATSEC + call print_32_hex + call PRINTINLINE + db " | PTR.MEM_FAT_OF0_DATREM: 0x",0 + ld ix,MEM_FAT_OF0_DATREM + call print_16_hex + + call PRINTINLINE + db 10,13,"VAL.MEM_FAT_ROOTSTART: 0x",0 + ld ix,MEM_FAT_ROOTSTART + call print_32_hex + call PRINTINLINE + db " | VAL.MEM_FAT_CLUSTERLEN: 0x",0 + ld a,(MEM_FAT_CLUSTERLEN) + call print_a_hex + + call PRINTINLINE + db 10,13,"VAL.MEM_FAT_FILEREMAIN: 0x",0 + ld ix,MEM_FAT_FILEREMAIN + call print_32_hex + call PRINTINLINE + db " | VAL.MEM_FAT_DIRSEC: 0x",0 + ld ix,MEM_FAT_DIRSEC + call print_16_hex + + + call print_newLine + ret + diff --git a/OperatingSystem/monitor_v2/include/kdrv_ide8255.s b/OperatingSystem/monitor_v2/include/kdrv_ide8255.s index 151ac53..a022ae3 100644 --- a/OperatingSystem/monitor_v2/include/kdrv_ide8255.s +++ b/OperatingSystem/monitor_v2/include/kdrv_ide8255.s @@ -130,7 +130,7 @@ ide_regread_8: ; HL contains destination address ;------------------------------------------------------------------------------ ide_readsector_256: - LD C,255 ;Setup counter for 256 words + LD C,0 ;Setup counter for 256 words ide_readsector_256_waitloop: LD B, IDE_REG_CMDSTS @@ -147,32 +147,27 @@ ide_readsector_256_waitloop: OR IDE_RD ;Set Read bit OUT (CS_PIA_PC), A ;Write Read to bit controll lines NOP - NOP - NOP + ;NOP + ;NOP IN A,(CS_PIA_PB) ;Load 16-Bit data to buffer LD (HL), A INC HL IN A,(CS_PIA_PA) LD (HL), A INC HL - - LD A,C - OR A - JP Z,ide_readsector_256_done DEC C + RET Z JR ide_readsector_256_waitloop -ide_readsector_256_done: - RET - ide_readsector_512_inv: - LD C,255 ;Setup counter for 256 words + LD C,0 ;Setup counter for 256 words LD DE, 4096 ;Timeout counter ide_readsector_512_inv_waitloop: DEC DE LD A,D OR E JP Z, ide_readsector_timeout + ;timeout checked. continue LD B, IDE_REG_CMDSTS CALL ide_regread_8 BIT 0,a ;Error Bit set. @@ -180,15 +175,17 @@ ide_readsector_512_inv_waitloop: BIT 3,a ;DRQ Bit set. If set, disk has data JR Z, ide_readsector_512_inv_waitloop ;If not set, wait LD DE, 2048 ;Timeout counter + LD A, 10010010b ;CommandByte-A, Mode 0, PA IN, PC Out, PB IN OUT (CS_PIA_CR), A ;Set Data direction to IN LD A, IDE_REG_DATA ;CS0 and A=0 -> I/O register OUT (CS_PIA_PC), A ;set register OR IDE_RD ;Set Read bit OUT (CS_PIA_PC), A ;Write Read to bit controll lines + ;NOP + ;NOP NOP - NOP - NOP + IN A,(CS_PIA_PA) ;Load 16-Bit data to buffer LD (HL), A INC HL @@ -196,10 +193,8 @@ ide_readsector_512_inv_waitloop: LD (HL), A INC HL - LD A,C - OR A - JP Z,ide_readsector_256_done DEC C + RET Z JR ide_readsector_512_inv_waitloop ide_readsector_timeout: diff --git a/OperatingSystem/monitor_v2/include/kdrv_ideif.s b/OperatingSystem/monitor_v2/include/kdrv_ideif.s index 0d855de..cbe0626 100644 --- a/OperatingSystem/monitor_v2/include/kdrv_ideif.s +++ b/OperatingSystem/monitor_v2/include/kdrv_ideif.s @@ -389,6 +389,7 @@ ideif_init_all: ; ; Reads A*512 byte sector into memory ; HL contains pointer to LBA address +; DE contains destination location ; A contains sector count ;------------------------------------------------------------------------------ read_lba_sector: @@ -416,10 +417,59 @@ read_lba_sector: LD A,IDE_CMD_READSEC ;send read command LD B,IDE_REG_CMDSTS CALL ide_regwrite_8 - LD HL,MEM_IDE_BUFFER ;set read/write buffer start address + ;LD HL,MEM_IDE_BUFFER ;set read/write buffer start address + EX DE,HL ;transfer destination in DE to HL call ide_readsector_512_inv ;read 256 words from device ret +;------------------------------------------------------------------------------ +; ideif_drv_sel +; +; Select drive from table +; Prepare variables +; +; A contains drive number +;------------------------------------------------------------------------------ +ideif_drv_sel: + ld (MEM_IDE_SELECTED),a + push af + call ideif_get_drv_pointer ;test if drive is marked as available + ld a,(ix+0) + or a + jp nz, _ideif_drv_sel_fail ;if not-> fail + + call fat_get_root_table ;else get root table + + ld hl,[_ideif_drv_sel_pstr] ;print success message + call print_str + pop af + add 69 + ld (var_dir),a ;store drive letter + call print_char + ld a, ':' + ld (var_dir+1),a + ld a, '\' + ld (var_dir+2),a + xor a ;set dir to empty + ld (var_dir+3),a + ld (var_dir+79),a ;set depth counter + ld hl,[_ideif_drv_sel_sstr0] + call print_str + ret +_ideif_drv_sel_fail: + ld hl,[_ideif_drv_sel_pstr] + call print_str + pop af + add 69 + call print_char + ld hl,[_ideif_drv_sel_fstr0] + call print_str + xor a ;set dir to empty + ld (var_dir),a + LD DE,0x20 + LD BC,0x70 + CALL beep + ret @@ -446,4 +496,12 @@ _ideif_prnt_devtable_sFF: _ideif_prnt_devtable_master: db "Master ",0 _ideif_prnt_devtable_slave: - db "Slave ",0 \ No newline at end of file + db "Slave ",0 +_ideif_drv_sel_pstr: + db 10,13,"Drive ",0 +_ideif_drv_sel_fstr0: + db ": not ready",10,13,0 +_ideif_drv_sel_sstr0: + db ": selected",10,13,0 +_ideif_drv_sel_syn: + db 10,13,"Invalid drive letter",10,13,0 diff --git a/OperatingSystem/monitor_v2/main.asm b/OperatingSystem/monitor_v2/main.asm index 96c5109..175677e 100644 --- a/OperatingSystem/monitor_v2/main.asm +++ b/OperatingSystem/monitor_v2/main.asm @@ -85,8 +85,10 @@ var_scratch: defs 16 ;16 bytes space for scratch vars var_ps2mem: defs 16 ;16 bytes space for scratch vars -var_buffer: - defb 0 ;var lentgh +var_dir: + defs 80 +var_input: + defs 80 var_idebuffer: defs 768 @@ -116,7 +118,6 @@ BOOT_PHASE0: ;Setup Hardware ld (var_curseron),a ld a, " " ld (var_curserchar),a - ;Initialize Console (Serial-Port) call CONSOLE_INIT @@ -134,7 +135,10 @@ BOOT_PHASE1_LOOP: pop hl jp nz, BOOT_PHASE1_LOOP ;template copy done - + xor a ;set dir to empty + ld (var_dir),a + ld (var_dir+1),a + BOOT_PHASE2: ;Hardware initialized. ; Print banner call print_clear @@ -177,6 +181,8 @@ BOOT_PHASE2: ;Hardware initialized. .include "cmd_date.s" .include "cmd_disk.s" .include "post.s" +.include "fat16.s" +.include "fat16_cmd.s" ;================================================================ ; Strings diff --git a/OperatingSystem/monitor_v2/zout/main.bin b/OperatingSystem/monitor_v2/zout/main.bin index 91b2e3e..3354895 100644 Binary files a/OperatingSystem/monitor_v2/zout/main.bin and b/OperatingSystem/monitor_v2/zout/main.bin differ diff --git a/OperatingSystem/monitor_v2/zout/main.hex b/OperatingSystem/monitor_v2/zout/main.hex index 4326406..f4877bb 100644 --- a/OperatingSystem/monitor_v2/zout/main.hex +++ b/OperatingSystem/monitor_v2/zout/main.hex @@ -1,7 +1,7 @@ :03000000C35000EA -:03000800C3040D21 -:03001000C3080D15 -:03001800C3140D01 +:03000800C3960D8F +:03001000C39A0D83 +:03001800C3A60D6F :1000440000000000000000000000000000000000AC :10005400000000000000000000000000000000009C :10006400000000000000000000000000000000008C @@ -52,243 +52,253 @@ :1003340000000000000000000000000000000000B9 :1003440000000000000000000000000000000000A9 :100354000000000000000000000000000000000099 -:0D036400000000000000000000000000008C +:100364000000000000000000000000000000000089 +:100374000000000000000000000000000000000079 +:100384000000000000000000000000000000000069 +:100394000000000000000000000000000000000059 +:1003A4000000000000000000000000000000000049 +:1003B4000000000000000000000000000000000039 +:1003C4000000000000000000000000000000000029 +:1003D4000000000000000000000000000000000019 +:1003E4000000000000000000000000000000000009 +:1003F40000000000000000000000000000000000F9 +:0C040400000000000000000000000000EC :1000500031FFFFF33ECFD3F63EF7D3F63E03D3F6A0 -:100060003204403205403E20320640CD9E002144FD -:10007000001170030100407E022303E5ED52E1C24E -:100080007700CDEA00216F1ECDDF00CDDD1CCDABAA -:1000900014114000014800CD170DC3EB17763E4FF9 -:1000A000D304DB01D3043E30D3093E18D3093E0408 -:1000B000D3093E44D3093E05D3093EE8D3093E01A6 -:1000C000D3093E04D3093E02D3093E00D3093E03BF -:1000D000D3093EC1D309C9F5D308CDFC00F1C97ECF -:1000E000B72806CDD7002318F6C9214A01CDDF0075 -:1000F000C93E0ACDD7003E0DCDD700C9973CD309E4 -:10010000DB09CB4728F6C9F5C5D5CD9B0178CDD7FE -:100110000079CDD700D1C1F1C9C630CDD700C9CD46 -:100120005B0100AFD309DB09E601CD5201C8DB0852 -:10013000C9CD1F01CA3101CDD700DE30DA4701FE3B -:100140000ACA4701E60FC93EFFC91B5B324A1B5B67 -:1001500048003E05D3093E68D309C93E05D3093E90 -:10016000EAD309C9E57ECD84013815CB27CB27CB4F -:1001700027CB2757237ECD84013805B2E11E00C965 -:100180001EFFE1C9D630EA9901FE0A3805D607EA12 -:100190009901FE103003E60FC937C9F51F1F1F1F55 -:1001A000CDAA0147F1CDAA014FC9E60FC630FE3AEC -:1001B000D8C607C9C978321A412210417E3214418B -:1001C000237E3215412BCDA90278B1CA8B02ED43B3 -:1001D0001241030303030A321641030A5F030A575D -:1001E000ED531741030A3219412A1041CDF1023A69 -:1001F0001641472A10417ECD07012310F93E68CDF4 -:10020000D7003A1641473E0690473E20CDD7003EE4 -:1002100020CDD70010F43E20CDD700E52A1741CDE0 -:10022000DF003A1941B7CA88022A124101080009C1 -:100230003A1941477EFE01CC1703FE02CC3E03FE75 -:1002400003CC5B03FE04CC9703FE05CCAD03FE0696 -:10025000CCBA03FE07CCD403FE08CCE103FE09CCE4 -:10026000F603FE10CC0B04FE11CC1B04FE12CC23B3 -:1002700004FE13CC5B04FE0ACCED03FE80CC7A04B2 -:10028000FE81CC71042310ACE11810CDF1027ECDBB -:10029000090323E521C60CCDDF00E1CDF1003A1AB8 -:1002A000413D321A41C2B901C9E521C4043A1441A1 -:1002B0004F7EFEFFCAEB02F523462B79A04FF1B922 -:1002C000280B06000E07097E4F092318E023234E52 -:1002D000233A154146A0B92B2B2B280B06000E07FD -:1002E000097E4F092318C6444DE1C906000E00E1FE -:1002F000C93E24CDD7007CCD07017DCD07013E68E6 -:10030000CDD7003E20CDD700C9CD07013E68CDD75F -:10031000003E20CDD700C9E5ED5B1041131A6F13E5 -:100320001A673E24CDD7007CCD07017DCD07013E65 -:1003300068CDD7003E20CDD700CDB504E1C9C5EDCD -:100340005B10411A1F1FE60EE521CF0C06004F0976 -:10035000CDDF003E20CDD700E1C1C9ED5B104113D8 -:100360001AF5E680C27C033E24CDD7003E2BCDD7C4 -:1003700000F1CD07013E68CDD70018173E24CDD738 -:10038000003E2DCDD700F1ED44CD07013E68CDD71D -:10039000001800CDB504C9ED5B1041131AFE4D28BD -:1003A000063E4ECDD700C93E49CDD700C9C5ED5B4D -:1003B00010411AE638CD0903C1C9C5ED5B10411AD9 -:1003C0001F1F1FE607CD90043E20CDD7003E2CCD49 -:1003D000D700C1C9C5ED5B10411AE607CD9004C135 -:1003E000C9C5ED5B1041131ACD0903C1C9E5ED5B29 -:1003F000104113131806E5ED5B1041131A6F131A21 -:10040000677CCD07017DCD0701E1C9C5ED5B1041DA -:100410001A1F1F1FE607CD9004C1C9E5C5ED5B108B -:10042000411807E5C5ED5B1041131A1F1F1FE606B3 -:10043000F52A10417EFEDD2809FEFD280A21DF0C89 -:10044000180821E70C180321EF0CF106004F097E74 -:10045000CDD700237ECDD700C1E1C9E5C5ED5B1046 -:10046000411A1F1F1FE606F52A10417E21F70C18BE -:10047000D9E5C52A174106021807E5C52A1741061E -:10048000017E23A720FB05C28104CDDF00C1E1C9A5 -:10049000E5FE062811FE07281521DF0C06004F098E -:1004A0007ECDD700E1C921FF0CCDDF00E1C93E417F -:1004B000CDD700E1C978FE01C83E20CDD7003E2C43 -:1004C000CDD700C900FF0000011C090027FF000074 -:1004D00001E709002FFF000001EB0900EDFF44FFD9 -:1004E00002EF09003FFF000001F3090037FF0000A1 -:1004F00001F7090076FF000001FB0900F3FF00008F -:1005000001000A00FBFF000001030A00EDFF46FFA7 -:1005100002060A00EDFF56FF020B0A00EDFF5EFF28 -:1005200002100A00EBFF000001150A0008FF00009E -:10053000011F0A00D9FF0000012C0A00E3FF0000A0 -:1005400001300A00DDFFE3FF023C0A00FDFFE3FF8C -:1005500002480A00EDFFA0FF02540A00EDFFB0FFC1 -:1005600002580A00EDFFA8FF025D0A00EDFFB8FF88 -:1005700002610A00EDFFA1FF02660A00EDFFB1FF74 -:10058000026A0A00EDFFA9FF026F0A00EDFFB9FF42 -:1005900002730A00C3FF00000320090101C2C70063 -:1005A000000320090302800118FF0000022709014F -:1005B0000338FF0000022B09010330FF0000023264 -:1005C00009010328FF0000023A09010320FF00008F -:1005D0000241090103E9FF000002490900DDFFE9CA -:1005E000FF02520900FDFFE9FF025B090010FF0056 -:1005F000000264090103CDFF0000036A090101C480 -:10060000C70000036A09020201C9FF000001700966 -:1006100000C0C700000170090102EDFF4DFF027527 -:100620000900EDFF45FF027A0900C7C70000017FFE -:100630000901050AFF0000018409001AFF000001FA -:100640008E09003AFF000003980902098002FF00AA -:100650000001A2090012FF000001AD090032FF00F5 -:100660000003B809020980EDFF57FF02C70900ED3A -:10067000FF5FFF02CF0900EDFF47FF02D70900ED42 -:10068000FF4FFF02DF090006C7000002C309020690 -:100690000840C0000001C30902060780F8000001FD -:1006A000780A0107C6FF000002780A0108DDFF860C -:1006B000FF03800A020880FDFF86FF038F0A0208FD -:1006C00080C8F80000019E0A01078EF80000029E13 -:1006D0000A0108DDFF8EFF03A60A020880FDFF8ED7 -:1006E000FF03B50A02088090F8000001C40A010760 -:1006F000D6FF000002C40A0108DDFF96FF03C90A05 -:10070000020880FDFF96FF03D50A02088094F800D6 -:100710000001E10A0107DEFF000002E10A0108DD35 -:10072000FF9EFF03E90A020880FDFF9EFF03F70A10 -:10073000020880A0F8000001050B0107E6FF000099 -:1007400002050B0108DDFFA6FF030A0B020880FD6E -:10075000FFA6FF03160B020880B0F8000001220B71 -:100760000107F6FF000002220B0108DDFFB6FF03C0 -:10077000260B020880FDFFB6FF03310B020880A89C -:10078000F80000013C0B0107EEFF0000023C0B01EA -:1007900008DDFFAEFF03410B020880FDFFAEFF0343 -:1007A0004D0B020880B8F8000001590B0107FEFF4D -:1007B000000002590B0108DDFFBEFF035D0B0208BC -:1007C00080FDFFBEFF03680B02088004C700000124 -:1007D000730B0110DDFF34FF03780B020880FDFF6F -:1007E00034FF03840B02088005C7000001900B0151 -:1007F00010DDFF35FF03950B020880FDFF35FF0379 -:10080000A10B02088009CF000001AD0B0111EDFF23 -:100810004ACF02B60B0112EDFF42CF02BF0B01120D -:10082000DDFF09CF02C80B0112FDFF09CF02D10B7A -:10083000011203CF000001DA0B0111DDFF23FF02DB -:10084000DF0B00FDFF23FF02E80B000BCF000001D0 -:10085000F10B0111DDFF2BFF02F60B00FDFF2BFF5B -:1008600002FF0B0001CF000003080C03118009DD1B -:10087000FF21FF040F0C010AFDFF21FF04170C01EB -:100880000A2AFF0000031F0C020980EDFF4BCF0472 -:100890002B0C0412800A81DDFF2AFF04360C010AAA -:1008A000FDFF2AFF04420C010A22FF0000034E0C48 -:1008B000020A80EDFF43CF045A0C030A8012DDFFC9 -:1008C00022CF04640C020A80FDFF22CF04700C02C8 -:1008D0000A80F9FF0000017C0C00DDFFF9FF0286B1 -:1008E0000C00FDFFF9FF02900C00C5CF0000019A3B -:1008F0000C0113DDFFE5FF02A00C00FDFFE5FF0288 -:10090000A80C00C1CF000001B00C0113DDFFE1FF16 -:1009100002B60C00FDFFE1FF02BE0C004E4F50007E -:100920004A5020002C20004A5220004A5220432CDA -:1009300020004A52204E432C20004A52205A2C209C -:10094000004A52204E5A2C20004A502028484C2958 -:1009500020004A50202849582920004A5020284980 -:1009600059292000444A4E5A200043414C4C200053 -:10097000524554200052455449005245544E0052AD -:10098000535420004C4420412C28424329004C441D -:1009900020412C28444529004C4420412C28006843 -:1009A00029004C4420284243292C2041004C44205B -:1009B000284445292C2041004C4420280068292C3B -:1009C0002041004C4420004C4420412C2049004C44 -:1009D0004420412C2052004C4420492C2041004C02 -:1009E0004420522C2041004441410043504C004ED1 -:1009F000454700434346005343460048414C54009A -:100A0000444900454900494D203000494D203100FE -:100A1000494D20320045582044452C20484C004583 -:100A2000582041462C204146E280B20045585800EB -:100A3000455820285350292C20484C004558202840 -:100A40005350292C20495800455820285350292C10 -:100A5000204959004C4449004C444952004C4444FC -:100A6000004C444452004350490043504952004313 -:100A7000504400435044520041444420412C200043 -:100A800041444420412C202849582B00682900412A -:100A9000444420412C202849592B00682900414416 -:100AA0004320412C200041444320412C2028495818 -:100AB0002B0068290041444320412C202849592B10 -:100AC00000682900535542200053554220284958B8 -:100AD0002B00682900535542202849592B006829CA -:100AE0000053424320412C200053424320412C28F4 -:100AF00049582B0068290053424320412C2849596A -:100B00002B00682900414E442000414E44202849D2 -:100B1000582B00682900414E44202849592B006871 -:100B200029004F5220004F52202849582B00682995 -:100B3000004F52202849592B00682900584F522055 -:100B400000584F52202849582B00682900584F520E -:100B5000202849592B006829004350200043502089 -:100B60002849582B006829004350202849592B0058 -:100B7000682900494E432000494E43202849582BFC -:100B800000682900494E43202849592B0068290054 -:100B90004445432000444543202849582B006829F8 -:100BA00000444543202849592B006829004144440A -:100BB00020484C2C200041444320484C2C2000531A -:100BC000424320484C2C20004144442049582C20CA -:100BD000004144442049592C2000494E43200049FB -:100BE0004E432049582C2000494E432049592C207F -:100BF0000044454320004445432049582C200044EC -:100C000045432049592C20004C4420002C20004C06 -:100C1000442049582C20004C442049592C20004C99 -:100C20004420484C2C2028006829004C4420002CEB -:100C30002028006829004C442049582C20280068AE -:100C400029004C442049592C2028006829004C4494 -:100C500020280068292C20484C004C44202800689B -:100C6000292C20004C4420280068292C20495800B9 -:100C70004C4420280068292C204959004C4420531A -:100C8000502C20484C004C442053502C20495800F4 -:100C90004C442053502C20495900505553482000B3 -:100CA0005055534820495800505553482049590041 -:100CB000505553482000505553482049580050552E -:100CC0005348204959002E3F2E0020202020004E5E -:100CD0005A5A004E434300504F504550004D004279 -:100CE000434445484C53504243444549585350426D -:100CF0004344454959535042434445484C41462892 -:100D0000484C2900CDD700C9C5D5E5CD1F01F5F167 -:100D1000E1D1C1C93E00C9F5D53E08D3F4CD2F0DB0 -:100D20003E00D3F4CD2F0D1B7AB320EDD1F1C9C510 -:100D3000ED44ED440B79B0C2300DC1C93E80D333D0 -:100D40003E80D33200AFD332C9F53E80D333F1D3E6 -:100D50003078E61FD332F620D3320078E61FD33244 -:100D600000AFD332C93E92D33378E61FD332F64078 -:100D7000D33200F5F1F5F1F5F1F5F1DB30F5AFD354 -:100D800032F1C90EFF060FCD650DCB47C2040ECB65 -:100D90005F28F23E92D3333E08D332F640D332007E -:100DA0000000DB317723DB30772379B7CAB20D0D32 -:100DB00018D3C90EFF1100101B7AB3CAEE0D060F2F -:100DC000CD650DCB47C2040ECB5F28EC1100083E69 -:100DD00092D3333E08D332F640D332000000DB30EA -:100DE0007723DB31772379B7CAB20D0D18CA216694 -:100DF0000ECDDF0079CD07013E0ACDD7003E0DCDE7 -:100E0000D700C9C921370ECDDF00060FCD650DCD46 -:100E1000070121540ECDDF003A2C40CD0701215DA2 -:100E20000ECDDF000609CD650DCD07013E0ACDD7F9 -:100E3000003E0DCDD700C90D0A4469736B20492FC0 -:100E40004F206572726F722E205374617475733AFD -:100E500020307800204465763A20307800204572B2 -:100E6000723A203078000D0A4469736B20492F4F85 -:100E7000206572726F722E20446174612074696DF6 -:100E8000656F75742040203078000000000000007D -:100E90000000000000000000000000000000000052 -:100EA0000000000000000000000000000000000042 -:100EB0000000000000000000000000000000000032 -:100EC0000000000000000000000000000000000022 -:100ED0000000000000000000000000000000000012 -:100EE0000000000000000000000000000000000002 -:100EF00000000000000000000000000000000000F2 -:100F000000000000000000000000000000000000E1 +:100060003204403205403E20320640CDA5002144F6 +:1000700000110F040100407E022303E5ED52E1C2AE +:100080007700AF322B40322C40CDF100214F26CDEE +:10009000E600CD191ECD3015114000014800CDA954 +:1000A0000DC31519763E4FD304DB01D3043E30D384 +:1000B000093E18D3093E04D3093E44D3093E05D373 +:1000C000093EE8D3093E01D3093E04D3093E02D3D9 +:1000D000093E00D3093E03D3093EC1D309C9F5D374 +:1000E00008CD0301F1C97EB72806CDDE002318F63E +:1000F000C9217701CDE600C93E0ACDDE003E0DCD17 +:10010000DE00C9973CD309DB09CB4728F6C9F5C502 +:10011000D5CD2D0278CDDE0079CDDE00D1C1F1C97B +:10012000C630CDDE00C9CD880100AFD309DB09E6BA +:1001300001CD7F01C8DB08C9CD2601CA3801CDDE5B +:1001400000DE30DA4E01FE0ACA4E01E60FC93EFF5C +:10015000C9DD7E03CD0E01DD7E02CD0E01DD7E0107 +:10016000CD0E01DD7E00CD0E01C9DD7E01CD0E017B +:10017000DD7E00CD0E01C91B5B324A1B5B48003E91 +:1001800005D3093E68D309C93E05D3093EEAD30920 +:10019000C9E3F5C57EFE002806CDDE002318F52351 +:1001A000C1F1E3C9F5D5C5E5F5CD91010A0D413A97 +:1001B000202000F1CD0E01CD91010A0D42433A20DD +:1001C0000078CD0E0179CD0E01CD91010A0D444587 +:1001D0003A20007ACD0E017BCD0E01F1CD91010ABE +:1001E0000D484C3A20007CCD0E017DCD0E01CDF89E +:1001F00000E1C1D1F1C9E57ECD16023815CB27CB80 +:1002000027CB27CB2757237ECD16023805B2E11E18 +:1002100000C91EFFE1C9D630EA2B02FE0A3805D616 +:1002200007EA2B02FE103003E60FC937C9F51F1F7E +:100230001F1FCD3C0247F1CD3C024FC9E60FC6302F +:10024000FE3AD8C607C9C978321A412210417E3217 +:100250001441237E3215412BCD3B0378B1CA1D03D7 +:10026000ED431241030303030A321641030A5F03FD +:100270000A57ED531741030A3219412A1041CD8321 +:10028000033A1641472A10417ECD0E012310F93E54 +:1002900068CDDE003A1641473E0690473E20CDDE4F +:1002A000003E20CDDE0010F43E20CDDE00E52A1712 +:1002B00041CDE6003A1941B7CA1A032A1241010892 +:1002C00000093A1941477EFE01CCA903FE02CCD0B9 +:1002D00003FE03CCED03FE04CC2904FE05CC3F0451 +:1002E000FE06CC4C04FE07CC6604FE08CC7304FE6C +:1002F00009CC8804FE10CC9D04FE11CCAD04FE1286 +:10030000CCB504FE13CCED04FE0ACC7F04FE80CCF9 +:100310000C05FE81CC03052310ACE11810CD83033E +:100320007ECD9B0323E521580DCDE600E1CDF800FD +:100330003A1A413D321A41C24B02C9E52156053AEB +:1003400014414F7EFEFFCA7D03F523462B79A04F53 +:10035000F1B9280B06000E07097E4F092318E02388 +:10036000234E233A154146A0B92B2B2B280B060010 +:100370000E07097E4F092318C6444DE1C906000E39 +:1003800000E1C93E24CDDE007CCD0E017DCD0E0105 +:100390003E68CDDE003E20CDDE00C9CD0E013E68B8 +:1003A000CDDE003E20CDDE00C9E5ED5B1041131A25 +:1003B0006F131A673E24CDDE007CCD0E017DCD0E7D +:1003C000013E68CDDE003E20CDDE00CD4705E1C90F +:1003D000C5ED5B10411A1F1FE60EE521610D0600F9 +:1003E0004F09CDE6003E20CDDE00E1C1C9ED5B1036 +:1003F00041131AF5E680C20E043E24CDDE003E2BEA +:10040000CDDE00F1CD0E013E68CDDE0018173E2492 +:10041000CDDE003E2DCDDE00F1ED44CD0E013E6877 +:10042000CDDE001800CD4705C9ED5B1041131AFE63 +:100430004D28063E4ECDDE00C93E49CDDE00C9C581 +:10044000ED5B10411AE638CD9B03C1C9C5ED5B10C9 +:10045000411A1F1F1FE607CD22053E20CDDE003EBC +:100460002CCDDE00C1C9C5ED5B10411AE607CD22D7 +:1004700005C1C9C5ED5B1041131ACD9B03C1C9E588 +:10048000ED5B104113131806E5ED5B1041131A6F75 +:10049000131A677CCD0E017DCD0E01E1C9C5ED5B60 +:1004A00010411A1F1F1FE607CD2205C1C9E5C5ED82 +:1004B0005B10411807E5C5ED5B1041131A1F1F1FA4 +:1004C000E606F52A10417EFEDD2809FEFD280A21F8 +:1004D000710D180821790D180321810DF106004FC7 +:1004E000097ECDDE00237ECDDE00C1E1C9E5C5ED8C +:1004F0005B10411A1F1F1FE606F52A10417E218955 +:100500000D18D9E5C52A174106021807E5C52A17AF +:100510004106017E23A720FB05C21305CDE600C1DD +:10052000E1C9E5FE062811FE07281521710D060018 +:100530004F097ECDDE00E1C921910DCDE600E1C974 +:100540003E41CDDE00E1C978FE01C83E20CDDE008F +:100550003E2CCDDE00C900FF000001AE090027FFE0 +:10056000000001790A002FFF0000017D0A00EDFF65 +:1005700044FF02810A003FFF000001850A0037FFA7 +:10058000000001890A0076FF0000018D0A00F3FFD8 +:10059000000001920A00FBFF000001950A00EDFF38 +:1005A00046FF02980A00EDFF56FF029D0A00EDFF8C +:1005B0005EFF02A20A00EBFF000001A70A0008FF8D +:1005C000000001B10A00D9FF000001BE0A00E3FFEC +:1005D000000001C20A00DDFFE3FF02CE0A00FDFFBA +:1005E000E3FF02DA0A00EDFFA0FF02E60A00EDFFDA +:1005F000B0FF02EA0A00EDFFA8FF02EF0A00EDFFDC +:10060000B8FF02F30A00EDFFA1FF02F80A00EDFFB8 +:10061000B1FF02FC0A00EDFFA9FF02010B00EDFF94 +:10062000B9FF02050B00C3FF000003B2090101C2BC +:10063000C7000003B2090302800118FF000002B9DD +:1006400009010338FF000002BD09010330FF00006B +:1006500002C409010328FF000002CC09010320FFA6 +:10066000000002D3090103E9FF000002DB0900DDFD +:10067000FFE9FF02E40900FDFFE9FF02ED090010B8 +:10068000FF000002F6090103CDFF000003FC090191 +:1006900001C4C7000003FC09020201C9FF000001F8 +:1006A000020A00C0C7000001020A0102EDFF4DFF6F +:1006B00002070A00EDFF45FF020C0A00C7C7000051 +:1006C00001110A01050AFF000001160A001AFF00C5 +:1006D0000001200A003AFF0000032A0A02098002F2 +:1006E000FF000001340A0012FF0000013F0A00323F +:1006F000FF0000034A0A020980EDFF57FF02590A72 +:1007000000EDFF5FFF02610A00EDFF47FF02690A8B +:1007100000EDFF4FFF02710A0006C7000002550AF4 +:1007200002060840C0000001550A02060780F800D2 +:1007300000010A0B0107C6FF0000020A0B0108DDD9 +:10074000FF86FF03120B020880FDFF86FF03210BCB +:10075000020880C8F8000001300B01078EF8000085 +:1007600002300B0108DDFF8EFF03380B020880FD0D +:10077000FF8EFF03470B02088090F8000001560B24 +:100780000107D6FF000002560B0108DDFF96FF03AC +:100790005B0B020880FDFF96FF03670B0208809445 +:1007A000F8000001730B0107DEFF000002730B016C +:1007B00008DDFF9EFF037B0B020880FDFF9EFF0309 +:1007C000890B020880A0F8000001970B0107E6FFE3 +:1007D000000002970B0108DDFFA6FF039C0B020837 +:1007E00080FDFFA6FF03A80B020880B0F8000001FF +:1007F000B40B0107F6FF000002B40B0108DDFFB6E1 +:10080000FF03B80B020880FDFFB6FF03C30B02080D +:1008100080A8F8000001CE0B0107EEFF000002CE19 +:100820000B0108DDFFAEFF03D30B020880FDFFAE16 +:10083000FF03DF0B020880B8F8000001EB0B010793 +:10084000FEFF000002EB0B0108DDFFBEFF03EF0B14 +:10085000020880FDFFBEFF03FA0B02088004C700F8 +:100860000001050C0110DDFF34FF030A0C020880B3 +:10087000FDFF34FF03160C02088005C700000122AB +:100880000C0110DDFF35FF03270C020880FDFF354A +:10089000FF03330C02088009CF0000013F0C011157 +:1008A000EDFF4ACF02480C0112EDFF42CF02510C7E +:1008B0000112DDFF09CF025A0C0112FDFF09CF0220 +:1008C000630C011203CF0000016C0C0111DDFF234A +:1008D000FF02710C00FDFF23FF027A0C000BCF001A +:1008E0000001830C0111DDFF2BFF02880C00FDFFCE +:1008F0002BFF02910C0001CF0000039A0C03118022 +:1009000009DDFF21FF04A10C010AFDFF21FF04A95D +:100910000C010A2AFF000003B10C020980EDFF4B15 +:10092000CF04BD0C0412800A81DDFF2AFF04C80C2D +:10093000010AFDFF2AFF04D40C010A22FF00000374 +:10094000E00C020A80EDFF43CF04EC0C030A801296 +:10095000DDFF22CF04F60C020A80FDFF22CF040245 +:100960000D020A80F9FF0000010E0D00DDFFF9FF06 +:1009700002180D00FDFFF9FF02220D00C5CF000097 +:10098000012C0D0113DDFFE5FF02320D00FDFFE537 +:10099000FF023A0D00C1CF000001420D0113DDFF3F +:1009A000E1FF02480D00FDFFE1FF02500D004E4F38 +:1009B00050004A5020002C20004A5220004A522069 +:1009C000432C20004A52204E432C20004A52205AE9 +:1009D0002C20004A52204E5A2C20004A50202848F1 +:1009E0004C2920004A50202849582920004A5020EC +:1009F000284959292000444A4E5A200043414C4C72 +:100A00002000524554200052455449005245544E4E +:100A10000052535420004C4420412C2842432900CA +:100A20004C4420412C28444529004C4420412C288A +:100A3000006829004C4420284243292C2041004CC6 +:100A40004420284445292C2041004C44202800689B +:100A5000292C2041004C4420004C4420412C2049AA +:100A6000004C4420412C2052004C4420492C204171 +:100A7000004C4420522C2041004441410043504C42 +:100A8000004E454700434346005343460048414C0F +:100A90005400444900454900494D203000494D204B +:100AA0003100494D20320045582044452C20484C07 +:100AB0000045582041462C204146E280B20045586E +:100AC0005800455820285350292C20484C004558A0 +:100AD00020285350292C204958004558202853508D +:100AE000292C204959004C4449004C444952004C9F +:100AF0004444004C4444520043504900435049523E +:100B00000043504400435044520041444420412C8F +:100B1000200041444420412C202849582B006829BA +:100B20000041444420412C202849592B00682900C9 +:100B300041444320412C200041444320412C2028A3 +:100B400049582B0068290041444320412C20284962 +:100B5000592B006829005355422000535542202844 +:100B600049582B00682900535542202849592B0029 +:100B700068290053424320412C2000534243204126 +:100B80002C2849582B0068290053424320412C2827 +:100B900049592B00682900414E442000414E442011 +:100BA0002849582B00682900414E44202849592BD8 +:100BB000006829004F5220004F52202849582B002E +:100BC0006829004F52202849592B00682900584FA6 +:100BD000522000584F52202849582B0068290058AD +:100BE0004F52202849592B006829004350200043C8 +:100BF00050202849582B0068290043502028495983 +:100C00002B00682900494E432000494E43202849C3 +:100C1000582B00682900494E43202849592B006869 +:100C200029004445432000444543202849582B00CF +:100C3000682900444543202849592B006829004170 +:100C4000444420484C2C200041444320484C2C2054 +:100C50000053424320484C2C200041444420495832 +:100C60002C20004144442049592C2000494E432067 +:100C700000494E432049582C2000494E43204959F1 +:100C80002C200044454320004445432049582C2053 +:100C9000004445432049592C20004C4420002C207E +:100CA000004C442049582C20004C442049592C2009 +:100CB000004C4420484C2C2028006829004C44203B +:100CC000002C2028006829004C442049582C20285A +:100CD000006829004C442049592C2028006829002C +:100CE0004C4420280068292C20484C004C442028E3 +:100CF0000068292C20004C4420280068292C204919 +:100D000058004C4420280068292C204959004C44A4 +:100D10002053502C20484C004C442053502C204948 +:100D200058004C442053502C2049590050555348EA +:100D300020005055534820495800505553482049E9 +:100D400059005055534820005055534820495800E9 +:100D500050555348204959002E3F2E002020202076 +:100D6000004E5A5A004E434300504F504550004DDC +:100D70000042434445484C5350424344454958532C +:100D800050424344454959535042434445484C41DD +:100D90004628484C2900CDDE00C9C5D5E5CD260141 +:100DA000F5F1E1D1C1C93E00C9F5D53E08D3F4CD76 +:100DB000C10D3E00D3F4CDC10D1B7AB320EDD1F1AE +:100DC000C9C5ED44ED440B79B0C2C20DC1C93E8026 +:100DD000D3333E80D33200AFD332C9F53E80D33314 +:100DE000F1D33078E61FD332F620D3320078E61FF5 +:100DF000D33200AFD332C93E92D33378E61FD33219 +:100E0000F640D33200F5F1F5F1F5F1F5F1DB30F50F +:100E1000AFD332F1C90E00060FCDF70DCB47C28913 +:100E20000ECB5F28F23E92D3333E08D332F640D346 +:100E30003200DB317723DB3077230DC818D90E0061 +:100E40001100101B7AB3CA730E060FCDF70DCB47F6 +:100E5000C2890ECB5F28EC1100083E92D3333E08C6 +:100E6000D332F640D33200DB307723DB3177230DEA +:100E7000C818D021EB0ECDE60079CD0E013E0ACD8B +:100E8000DE003E0DCDDE00C9C921BC0ECDE6000658 +:100E90000FCDF70DCD0E0121D90ECDE6003ACB4096 +:100EA000CD0E0121E20ECDE6000609CDF70DCD0EE7 +:100EB000013E0ACDDE003E0DCDDE00C90D0A4469BB +:100EC000736B20492F4F206572726F722E205374FE +:100ED000617475733A20307800204465763A20308A +:100EE0007800204572723A203078000D0A44697308 +:100EF0006B20492F4F206572726F722E20446174EF +:100F0000612074696D656F75742040203078000031 :100F100000000000000000000000000000000000D1 :100F200000000000000000000000000000000000C1 :100F300000000000000000000000000000000000B1 @@ -343,199 +353,325 @@ :10124000000000000000000000000000000000009E :10125000000000000000000000000000000000008E :10126000000000000000000000000000000000007E -:101270000000000000FF000000000000000000303F -:101280000077400000FF0000000000000000003078 -:10129000019F400000FF000000000000000000402F -:1012A00000C7400000FF00000000000000000040F8 -:1012B00001EF400000217512113640014000EDB0F1 -:1012C0003E00327640AF327740329F4032C74032E4 -:1012D000EF40C9CDF100211015CDDF0021364006C9 -:1012E000003A7640B8CAEC123E2018023E2ACDD70A -:1012F0000078C645CDD7003E3ACDD7003E20CDD7A9 -:1013000000E57EB7280EFE01280FFE022810FEFF22 -:101310002811180F214815180D2153151808215EA2 -:10132000151803216915CDDF00E1233E30CDD7002C -:101330003E78CDD7007ECD07013E20CDD70023E5F6 -:10134000DDE12323232323232323DD7E03CD070194 -:10135000DD7E02CD0701DD7E01CD0701DD7E00CD02 -:1013600007013E20CDD700DD7E07CD0701DD7E06DB -:10137000CD0701DD7E05CD0701DD7E04CD07013EF1 -:1013800020CDD7003E30CDD7003E78CDD7007ECDE2 -:1013900007013E20CDD700237EE5B7CAA413217CE8 -:1013A00015C3A713217415CDDF00E123C57E4F239C -:1013B0007E4723E56069CDDF00CDF100E1C1232345 -:1013C0000478FE04C8C3E112CD9714CD3C0D01FF93 -:1013D0005F060FCD650DB7280BCB77200C1B7AB3BA -:1013E000280218EDDD360001C9DD360002060F3E89 -:1013F000ECCD490D211741CD830D214D41DD7E0CF2 -:101400005FDD7E0D57012800EDB03E01060ACD4993 -:101410000D3E01060BCD490D3E00060CCD490D3E9B -:1014200000060DCD490D3EA0060ECD490D3E20060D -:101430000FCD490D211741CDB30D06040E00FD213E -:10144000D542FD7E04B7C25414C34C14111000FDE4 -:101450001910EFC9FD7E04DD7701FE0E20EEFD7E42 -:1014600008DD7702FD7E09DD7703FD7E0ADD770466 -:10147000FD7E0BDD7705DD360000FD7E0CDD770699 -:10148000FD7E0DDD7707FD7E0EDD7708FD7E0FDD2D -:101490007709DD360000C9F5C53A7640070707062B -:1014A000004FDD213640DD09C1F1C921F014CDDF47 -:1014B00000CDB512CDC813210815CDDF00C9060A2D -:1014C000CD490D7E060BCD490D237E060CCD490D71 -:1014D000237E060DCD490D237EE60FF6E0060ECDE8 -:1014E000490D3E20060FCD490D211741CDB30DC941 -:1014F0000D0A446574656374696E67206472697669 -:101500006573202E2E2E2000646F6E65210D0A005B -:1015100044525620537461747573202020205479EE -:101520007065204C42412020202020204C656E67B1 -:101530007468202020506F7274204D2F532020207B -:10154000204E616D650A0D00417661696C20202096 -:101550002020004E6F7420466F756E642000556E1B -:101560006B6F776E20465320004374726C2E2045BB -:10157000727220004D61737465722000536C617645 -:1015800065202000CDE61579E6FECD7C16CD1C1633 -:10159000B7C2A8157E23CD7C16CD1C16B7C2A815E0 -:1015A00010F2CDFB153E00C9CDFB153E01C905CD9E -:1015B000E61579F601CD7C16CD1C16B7C2D715CD30 -:1015C000A2167723CD421610F6CDA2167723CD5F53 -:1015D00016CDFB153E00C9CDFB153E01C93ECFD34C -:1015E000F63EF0D3F6C93ECFD3F63EFCD3F63E022C -:1015F000D3F400003E00D3F40000C93ECFD3F63E42 -:10160000FCD3F63E02D3F400003E03D3F400003EC8 -:10161000CFD3F600003EF7D3F60000C93ECFD3F695 -:101620003EFDD3F600003E00D3F40000EE02D3F4FA -:1016300000DBF40000F5E6FEEE02D3F40000F1E674 -:1016400001C93ECFD3F63EFCD3F600003E00D3F4F2 -:1016500000003E02D3F400003E00D3F40000C93E77 -:10166000CFD3F63EFCD3F600003E02D3F400003E9A -:1016700003D3F400003E02D3F40000C9C54F3ECFAF -:10168000D3F63EFCD3F60608CB113E0017D3F40088 -:1016900000EE02D3F40000EE02D3F4000010E9796A -:1016A000C1C9C53ECFD3F63EFDD3F606080E00AF46 -:1016B000D3F400003E02D3F400DBF4001FCB11AFE3 -:1016C000D3F4000010E979C1C9E5212417CDDF006A -:1016D000E178B7CA2317050E107CCD07017DCD0731 -:1016E000013E20CDD7007ECD07013E20CDD700237F -:1016F0000D20F3C5E506000E10ED427E23FE20DA34 -:101700000C17FE7FD20C17CDD70018053E2ECDD773 -:10171000000DC2FB16E1C13E0ACDD7003E0DCDD76C -:101720000018AEC90D0A4241534520302020312017 -:101730002032202033202034202035202036202045 -:1017400037202038202039202041202042202043EB -:101750002020442020452020462020415343494951 -:101760000D0A007E23CDD70010F9C96461746500AD -:10177000901A7365746461746500281C70696E202A -:1017800000A91964756D7020001819706F757420A8 -:1017900000BF1969696E2000401A696F75742000D6 -:1017A000E01963616C6C2000F818636C72008C1A8D -:1017B0006461736D200079196A702000DF187273FC -:1017C000740000006C7364736B00A11C73656C641F -:1017D000736B2000A51C2400DF186900A9196F0095 -:1017E000BF19210048193F001819FFCDF1003E3EF6 -:1017F000CDD700AF320040CD1F01CAF717FE0DCA8A -:101800004C18FE0ACAF717FE08CA2618F5212B4005 -:1018100016003A00405F193C320040F177CDD70006 -:1018200023AF77C3F7173A0040A7CAF7173D320036 -:10183000405F1600212B4019AF773E08CDD7003E00 -:1018400020CDD7003E08CDD700C3F717216B171165 -:101850002B407EFEFFCA7E181A477EB0CA87181A30 -:10186000477EA8B7CA6E187EB7CA87181805231313 -:1018700018E6237EB7C27218232323C34F1821B85A -:1018800018CDDF00C3EB17E5C1030A6F030A67CD6C -:101890009518C3EB17E921A418CDDF00C921CC1896 -:1018A000CDDF00C90A0D6E6F7420696D706C656DB7 -:1018B000656E7465640A0D000A0D696E76616C6967 -:1018C0006420636F6D6D616E640A0D000A0D696EB0 -:1018D00076616C69642073796E7461780A0D00D545 -:1018E000E1CD6401477BA7C29D182323CD64014F3E -:1018F0007BA7C29D186069E9D5E1CD6401477BA74C -:10190000C29D182323CD64014F7BA7C29D18606937 -:10191000CD1719CDF100C9E9D5E1CD6401477BA709 -:10192000C29D182323CD64014F7BA7C29D1823239A -:101930007EFE20C29D1823CD6401F57BA7C29D18B1 -:10194000F1606947CDC916C9D5E1CD6401477BA7D0 -:10195000C29D182323CD64014F7BA7C29D1823236A -:101960007EFE00C8FE20C29D1823CD6401027BA725 -:10197000C29D18032323C36019D5E1CD6401477BC1 -:10198000A7C29D182323CD64014F7BA7C29D1823B6 -:10199000237EFE20C29D1823CD6401F57BA7C29D46 -:1019A000186069F147CDB501C9D5E1CD64014F7B20 -:1019B000A7C29D18ED78F5CDF100F1CD0701C9D58D -:1019C000E1CD64014F7BA7C29D1823237EFE20C278 -:1019D0009D1823CD6401F57BA7C29D18F1ED79C94F -:1019E000D5E1CD6401320C407BA7C29D18232301B1 -:1019F0000D40AF320B407EFE00CA121AFE20C29D7F -:101A00001823CD640102033A0B403C320B402323E0 -:101A100018E4210D403A0B40473A0C404FCD841555 -:101A2000B7C2251AC9212C1ACDDF00C90A0D62756B -:101A3000732D6572726F723A206E6F2041434B00B6 -:101A4000D5E1CD64014F7BA7C29D1823237EFE20E4 -:101A5000C29D1823CD640147C57BA7C29D18210BE9 -:101A600040CDAE15C1B7C2251A217F1ACDDF0021A6 -:101A70000B407ECD07013E20CDD7002310F4C90ACC -:101A80000D7265632D627566663A2000CDEA00C965 -:101A9000CDF100214B1B06010ED0CD8415B7C22518 -:101AA0001A210B4006080ED0CDAE15B7C2251A3A42 -:101AB0000D40E6301F1F1F1FCD19013A0D40E60FE4 -:101AC000CD19013E3ACDD7003A0C40E6701F1F1FDA -:101AD0001FCD19013A0C40E60FCD19013E3ACDD782 -:101AE000003A0B40E6701F1F1F1FCD19013A0B4033 -:101AF000E60FCD19013E20CDD7003A0F40E6301F4A -:101B00001F1F1FCD19013A0F40E60FCD19013E2EC0 -:101B1000CDD7003A1040E6101F1F1F1FCD19013A04 -:101B20001040E60FCD19013E2ECDD7003E32CDD765 -:101B3000003E30CDD7003A1140E6F01F1F1F1FCDE9 -:101B400019013A1140E60FCD1901C9000A0D456E81 -:101B50007465722044617465202020202830302D67 -:101B6000333129203A20000A0D456E746572204DEC -:101B70006F6E74682020202830302D313229203AB1 -:101B800020000A0D456E746572205965617220202F -:101B900020202830302D393929203A20000A0D45DF -:101BA0006E74657220486F75727320202028303063 -:101BB0002D323329203A20000A0D456E74657220BB -:101BC0004D696E75746573202830302D35392920A4 -:101BD0003A20000A0D456E746572205365636F6E7E -:101BE0006473202830302D353929203A20002069AF -:101BF0006E7661696C6420696E7075742E20526512 -:101C00007472792100E5CDDF00E1CD3101FEFFCA1C -:101C10001D1C47CD3101FEFFCA1D1C4FC9E521EE39 -:101C20001BCDDF00E1C3051CAF320B40214C1BCDA7 -:101C3000051C78CD9C1CE630B132104021671BCDCD -:101C4000051C78CD9C1CE610B132114021821BCDC1 -:101C5000051C78CD9C1CE6F0B1321240219D1BCDB5 -:101C6000051C78CD9C1CE630B1320E4021B81BCD4E -:101C7000051C78CD9C1CE670B1320D4021D31BCDE4 -:101C8000051C78CD9C1CE670B1320C40130ED006BA -:101C900008210B40CD8415B7C2251AC907070707CD -:101CA000C9CDD312C9D5E17EDE453808FE04300423 -:101CB000CD0080C921C41CCDDF00112000017000BF -:101CC000CD170DC90A0D496E76616C696420647286 -:101CD000697665206C65747465720A0D00CDED1C23 -:101CE000CD121DCD6A1DCD3D1DCD501DC921E11D5B -:101CF000CDDF00DBF6FE00C2061D3E0032094021AA -:101D00006A1ECDDF00C93EFF32094021321ECDDF01 -:101D100000C921FC1DCDDF003EFFD3F80000DBF839 -:101D2000FEFFC2311D3E00320A40216A1ECDDF0097 -:101D3000C93EFF320A4021321ECDDF00C921AB1D52 -:101D4000CDDF00DB30B7C2631D216A1ECDDF00C9C5 -:101D500021C61DCDDF00DB40B7C2631D216A1ECD49 -:101D6000DF00C921321ECDDF00C93E06320B402103 -:101D7000171ECDDF00210B4006010ED0CD8415B714 -:101D8000C29D1D210B4006010ED0CDAE153A0B4071 -:101D9000B7CAA41D216A1ECDDF00C3931A21321ECB -:101DA000CDDF00C921401ECDDF00C90D0A436865A3 -:101DB000636B204469736B6374726C2E40303330F4 -:101DC000682E2E2E20000D0A436865636B2044693F -:101DD000736B6374726C2E40303430682E2E2E205C -:101DE000000D0A436865636B20494F2D436F6E7485 -:101DF000726F6C6C6572202E2E2E20000D0A4368C7 -:101E000065636B20414D44383931312041505520B4 -:101E100020202E2E2E20000D0A436865636B20447F -:101E2000533133303720525443202020202E2E2E81 -:101E300020006E6F742064657465637465642100AE -:101E40006E6F74207365742E20436865636B206227 -:101E500061747465727920616E642072756E2027DA -:101E6000736574646174652721006F6B2120005ACB -:101E70003843204D6F6E69746F722056322E3120B8 -:101E800062792044656E6E69732047756E696120C2 -:0C1E900028323032322D3230323429003A +:10127000000000000000000000000000000000006E +:10128000000000000000000000000000000000005E +:10129000000000000000000000000000000000004E +:1012A000000000000000000000000000000000003E +:1012B000000000000000000000000000000000002E +:1012C000000000000000000000000000000000001E +:1012D000000000000000000000000000000000000E +:1012E00000000000000000000000000000000000FE +:1012F00000000000000000000000FF0000000000EF +:1013000000000000300016410000FF000000000057 +:101310000000000030013E410000FF00000000001E +:1013200000000000400066410000FF0000000000D7 +:101330000000000040018E41000021FA1211D5404A +:10134000014000EDB03E00321541AF321641323E51 +:1013500041326641328E41C9CDF80021EB15CDE610 +:101360000021D54006003A1541B8CA71133E201835 +:10137000023E2ACDDE0078C645CDDE003E3ACDDE07 +:10138000003E20CDDE00E57EB7280EFE01280FFED0 +:10139000022810FEFF2811180F212316180D212EE8 +:1013A0001618082139161803214416CDE600E1234A +:1013B0003E30CDDE003E78CDDE007ECD0E013E20FB +:1013C000CDDE0023E5DDE12323232323232323DDB7 +:1013D0007E03CD0E01DD7E02CD0E01DD7E01CD0E40 +:1013E00001DD7E00CD0E013E20CDDE00DD7E07CD8D +:1013F0000E01DD7E06CD0E01DD7E05CD0E01DD7E0A +:1014000004CD0E013E20CDDE003E30CDDE003E7824 +:10141000CDDE007ECD0E013E20CDDE00237EE5B781 +:10142000CA2914215716C32C14214F16CDE600E10A +:1014300023C57E4F237E4723E56069CDE600CDF8C6 +:1014400000E1C123230478FE04C8C36613CD1C1534 +:10145000CDCE0D01FF5F060FCDF70DB7280BCB7773 +:10146000200C1B7AB3280218EDDD360001C9DD36E9 +:101470000002060F3EECCDDB0D21B641CD150E214D +:10148000EC41DD7E0C5FDD7E0D57012800EDB03EA6 +:1014900001060ACDDB0D3E01060BCDDB0D3E00063D +:1014A0000CCDDB0D3E00060DCDDB0D3EA0060ECDB6 +:1014B000DB0D3E20060FCDDB0D21B641CD3E0E06E5 +:1014C000040E00FD217443FD7E04B7C2D914C3D1BC +:1014D00014111000FD1910EFC9FD7E04DD7701FE27 +:1014E0000E20EEFD7E08DD7702FD7E09DD7703FD2F +:1014F0007E0ADD7704FD7E0BDD7705DD360000FD1D +:101500007E0CDD7706FD7E0DDD7707FD7E0EDD7737 +:1015100008FD7E0FDD7709DD360000C9F5C53A15F7 +:101520004107070706004FDD21D540DD09C1F1C99C +:1015300021CB15CDE600CD3A13CD4D1421E315CDC9 +:10154000E600C9060ACDDB0D7E060BCDDB0D237E42 +:10155000060CCDDB0D237E060DCDDB0D237EE60FC5 +:10156000F6E0060ECDDB0D3E20060FCDDB0DEBCDFC +:101570003E0EC9321541F5CD1C15DD7E00B7C2AB5C +:1015800015CD3E20215F16CDE600F1C645322B4039 +:10159000CDDE003E3A322C403E5C322D40AF322E42 +:1015A00040327A40217616CDE600C9215F16CDE69D +:1015B00000F1C645CDDE00216816CDE600AF322B26 +:1015C00040112000017000CDA90DC90D0A446574B9 +:1015D000656374696E6720647269766573202E2E68 +:1015E0002E2000646F6E65210D0A00445256205370 +:1015F00074617475732020202054797065204C42EA +:10160000412020202020204C656E67746820202017 +:10161000506F7274204D2F53202020204E616D6535 +:101620000A0D00417661696C2020202020004E6F59 +:101630007420466F756E642000556E6B6F776E2058 +:10164000465320004374726C2E2045727220004D68 +:1016500061737465722000536C6176652020000A06 +:101660000D447269766520003A206E6F74207265B1 +:101670006164790A0D003A2073656C656374656472 +:101680000A0D000A0D496E76616C69642064726906 +:101690007665206C65747465720A0D00CDFE16794E +:1016A000E6FECD9417CD3417B7C2C0167E23CD9475 +:1016B00017CD3417B7C2C01610F2CD13173E00C9AC +:1016C000CD13173E01C905CDFE1679F601CD94174D +:1016D000CD3417B7C2EF16CDBA177723CD5A1710EE +:1016E000F6CDBA177723CD7717CD13173E00C9CDA6 +:1016F00013173E01C93ECFD3F63EF0D3F6C93ECF15 +:10170000D3F63EFCD3F63E02D3F400003E00D3F401 +:101710000000C93ECFD3F63EFCD3F63E02D3F40020 +:10172000003E03D3F400003ECFD3F600003EF7D3D3 +:10173000F60000C93ECFD3F63EFDD3F600003E00D2 +:10174000D3F40000EE02D3F400DBF40000F5E6FE73 +:10175000EE02D3F40000F1E601C93ECFD3F63EFC21 +:10176000D3F600003E00D3F400003E02D3F40000A4 +:101770003E00D3F40000C93ECFD3F63EFCD3F600C2 +:10178000003E02D3F400003E03D3F400003E02D337 +:10179000F40000C9C54F3ECFD3F63EFCD3F6060891 +:1017A000CB113E0017D3F40000EE02D3F40000EE9C +:1017B00002D3F4000010E979C1C9C53ECFD3F63E8B +:1017C000FDD3F606080E00AFD3F400003E02D3F4BA +:1017D00000DBF4001FCB11AFD3F4000010E979C196 +:1017E000C9E5213C18CDE600E178B7CA3B18050EE3 +:1017F000107CCD0E017DCD0E013E20CDDE007ECDD4 +:101800000E013E20CDDE00230D20F3C5E506000EBF +:1018100010ED427E23FE20DA2418FE7FD22418CD5C +:10182000DE0018053E2ECDDE000DC21318E1C13ECC +:101830000ACDDE003E0DCDDE0018AEC90D0A4241D4 +:1018400053452030202031202032202033202034E6 +:101850002020352020362020372020382020392015 +:1018600020412020422020432020442020452020C9 +:1018700046202041534349490D0A007E23CDDE0016 +:1018800010F9C96461746500C01B73657464617488 +:101890006500581D70696E2000D91A64756D70203E +:1018A00000481A706F75742000EF1A69696E200085 +:1018B000701B696F75742000101B63616C6C2000D5 +:1018C000281A636C7200BC1B6461736D2000A91A36 +:1018D0006A7020000F1A7273740000006C736473D6 +:1018E0006B00D11D73656C64736B2000D51D636440 +:1018F0002000F81D6C7300F41D72756E2000151E1B +:1019000024000F1A6900D91A6F00EF1A2100781A03 +:101910003F00481AFFCDF800212B40CDE6003E3EA7 +:10192000CDDE00AF320040CD2601CA2719FE0DCA18 +:101930007C19FE0ACA2719FE08CA5619F5217B40F0 +:1019400016003A00405F193C320040F177CDDE00CE +:1019500023AF77C327193A0040A7CA27193D3200A1 +:10196000405F1600217B4019AF773E08CDDE003E78 +:1019700020CDDE003E08CDDE00C3271921831811DB +:101980007B407EFEFFCAAE191A477EB0CAB7191A4D +:10199000477EA8B7CA9E197EB7CAB7191805231380 +:1019A00018E6237EB7C2A219232323C37F1921E897 +:1019B00019CDE600C31519E5C1030A6F030A67CD07 +:1019C000C519C31519E921D419CDE600C921FC199F +:1019D000CDE600C90A0D6E6F7420696D706C656D7F +:1019E000656E7465640A0D000A0D696E76616C6936 +:1019F0006420636F6D6D616E640A0D000A0D696E7F +:101A000076616C69642073796E7461780A0D00D513 +:101A1000E1CDF601477BA7C2CD192323CDF6014FB7 +:101A20007BA7C2CD196069E9D5E1CDF601477BA757 +:101A3000C2CD192323CDF6014F7BA7C2CD19606912 +:101A4000CD471ACDF800C9E9D5E1CDF601477BA70E +:101A5000C2CD192323CDF6014F7BA7C2CD19232375 +:101A60007EFE20C2CD1923CDF601F57BA7C2CD198C +:101A7000F1606947CDE117C9D5E1CDF601477BA7F4 +:101A8000C2CD192323CDF6014F7BA7C2CD19232345 +:101A90007EFE00C8FE20C2CD1923CDF601027BA731 +:101AA000C2CD19032323C3901AD5E1CDF601477B9C +:101AB000A7C2CD192323CDF6014F7BA7C2CD192391 +:101AC000237EFE20C2CD1923CDF601F57BA7C2CD22 +:101AD000196069F147CD4702C9D5E1CDF6014F7BC9 +:101AE000A7C2CD19ED78F5CDF800F1CD0E01C9D51D +:101AF000E1CDF6014F7BA7C2CD1923237EFE20C284 +:101B0000CD1923CDF601F57BA7C2CD19F1ED79C929 +:101B1000D5E1CDF601320C407BA7C2CD19232301BC +:101B20000D40AF320B407EFE00CA421BFE20C2CDEC +:101B30001923CDF60102033A0B403C320B4023231C +:101B400018E4210D403A0B40473A0C404FCD9C160B +:101B5000B7C2551BC9215C1BCDE600C90A0D6275D1 +:101B6000732D6572726F723A206E6F2041434B0085 +:101B7000D5E1CDF6014F7BA7C2CD1923237EFE20F0 +:101B8000C2CD1923CDF60147C57BA7C2CD19210BC4 +:101B900040CDC616C1B7C2551B21AF1BCDE60021F3 +:101BA0000B407ECD0E013E20CDDE002310F4C90A8D +:101BB0000D7265632D627566663A2000CDF100C92D +:101BC000CDF800217B1C06010ED0CD9C16B7C25566 +:101BD0001B210B4006080ED0CDC616B7C2551B3AC6 +:101BE0000D40E6301F1F1F1FCD20013A0D40E60FAC +:101BF000CD20013E3ACDDE003A0C40E6701F1F1F9B +:101C00001FCD20013A0C40E60FCD20013E3ACDDE3B +:101C1000003A0B40E6701F1F1F1FCD20013A0B40FA +:101C2000E60FCD20013E20CDDE003A0F40E6301F0A +:101C30001F1F1FCD20013A0F40E60FCD20013E2E81 +:101C4000CDDE003A1040E6101F1F1F1FCD20013AC5 +:101C50001040E60FCD20013E2ECDDE003E32CDDE1F +:101C6000003E30CDDE003A1140E6F01F1F1F1FCDB1 +:101C700020013A1140E60FCD2001C9000A0D456E42 +:101C80007465722044617465202020202830302D36 +:101C9000333129203A20000A0D456E746572204DBB +:101CA0006F6E74682020202830302D313229203A80 +:101CB00020000A0D456E74657220596561722020FE +:101CC00020202830302D393929203A20000A0D45AE +:101CD0006E74657220486F75727320202028303032 +:101CE0002D323329203A20000A0D456E746572208A +:101CF0004D696E75746573202830302D3539292073 +:101D00003A20000A0D456E746572205365636F6E4C +:101D10006473202830302D353929203A200020697D +:101D20006E7661696C6420696E7075742E205265E0 +:101D30007472792100E5CDE600E1CD3801FEFFCADD +:101D40004D1D47CD3801FEFFCA4D1D4FC9E5211E6F +:101D50001DCDE600E1C3351DAF320B40217C1CCD0B +:101D6000351D78CDCC1DE630B132104021971CCD09 +:101D7000351D78CDCC1DE610B132114021B21CCDFD +:101D8000351D78CDCC1DE6F0B132124021CD1CCDF1 +:101D9000351D78CDCC1DE630B1320E4021E81CCD8A +:101DA000351D78CDCC1DE670B1320D4021031DCD1F +:101DB000351D78CDCC1DE670B1320C40130ED00627 +:101DC00008210B40CD9C16B7C2551BC90707070752 +:101DD000C9CD5813C9D5E17EDE453808FE0430046C +:101DE000CD7315C921FC1DCDE60011200001700046 +:101DF000CDA90DC9CD4B23C9CD6024C90A0D496EAB +:101E000076616C6964206472697665206C657474AF +:101E100065720A0D00CD7B25C9CD291ECD4E1ECD84 +:101E2000A61ECD791ECD8C1EC9211D1FCDE600DB5F +:101E3000F6FE00C2421E3E0032094021A61FCDE63A +:101E400000C93EFF320940216E1FCDE600C921388E +:101E50001FCDE6003EFFD3F80000DBF8FEFFC26DA9 +:101E60001E3E00320A4021A61FCDE600C93EFF32C9 +:101E70000A40216E1FCDE600C921E71ECDE600DB3A +:101E800030B7C29F1E21A61FCDE600C921021FCD7B +:101E9000E600DB40B7C29F1E21A61FCDE600C92188 +:101EA0006E1FCDE600C93E06320B4021531FCDE622 +:101EB00000210B4006010ED0CD9C16B7C2D91E21C1 +:101EC0000B4006010ED0CDC6163A0B40B7CAE01E35 +:101ED00021A61FCDE600C3C31B216E1FCDE600C99E +:101EE000217C1FCDE600C90D0A436865636B204461 +:101EF00069736B6374726C2E40303330682E2E2EF3 +:101F000020000D0A436865636B204469736B63743A +:101F1000726C2E40303430682E2E2E20000D0A4375 +:101F20006865636B20494F2D436F6E74726F6C6CE4 +:101F30006572202E2E2E20000D0A436865636B20EB +:101F4000414D4438393131204150552020202E2E2A +:101F50002E20000D0A436865636B204453313330F3 +:101F60003720525443202020202E2E2E20006E6F2A +:101F70007420646574656374656421006E6F7420F9 +:101F80007365742E20436865636B206261747465A9 +:101F9000727920616E642072756E20277365746497 +:101FA0006174652721006F6B212000000000000094 +:101FB0000000000000000000000000000000000021 +:101FC0000000000000000000000000000000000011 +:101FD0000000000000000000000000000000000001 +:101FE00000000000000000000000000000000000F1 +:101FF00000000000000000000000000000000000E1 +:1020000000000000000000000000000000000000D0 +:1020100000000000000000000000000000000000C0 +:1020200000000000000000000000000000000000B0 +:102030000000000000000000000000000000CDF7DC +:102040002221D1403E0111B641CD43153AB641FEA1 +:10205000EBC20B21DD21B641DD7E0D32BB43DD7EBF +:102060000E32B643DD7E0F32B743DD7E1032B84309 +:10207000DD7E1632B943DD7E1732BA43ED4BB943EC +:102080003AB84316005FCDDE2222C543ED43C74375 +:102090002AC44122BD43AF32BF4332C04301C543CE +:1020A00011BD43CDAD22CD1C15DD23DD23DDE5D1F2 +:1020B00001C543CDAD2221C54311D140EDA0EDA016 +:1020C000EDA0EDA021C54311C143EDA0EDA0EDA011 +:1020D000EDA021C543113F44EDA0EDA0EDA0EDA082 +:1020E0002AC7417C6FAF67EB011000CDDE2222BD15 +:1020F00043ED43BF4322CD4311BD4301C143CDADA9 +:10210000223E5C32DF43AF32E043C9CD91010A0D7C +:1021100043616E6E6F742066696E6420626F6F74C7 +:1021200020736563746F722E0A0D00CD1C15DD36A9 +:102130000002C92A31447CB5C24A2121C543113766 +:1021400044EDA0EDA0EDA0EDA0C92A31447C6FAF15 +:1021500067ED4BB64309223344AF3235443236443F +:10216000CD1C15DD23DD23DDE5D1013344CDAD22CA +:10217000213344060111B641CD4315AF3ABB4306A6 +:10218000004FED5B31441B1BCDDE22223744ED4373 +:10219000394401374411C143CDAD223ABB436F26C8 +:1021A00000223B443A3144176F3E00176711B64195 +:1021B00019113144EDA0EDA0C92137440601CD43EA +:1021C00015213744CD99222A3B44AF110100ED522D +:1021D000223B44C03EFF2A314411FFFFED52C8AFFD +:1021E000CD3321C9D521CF43CD2523D1D5213F449E +:1021F00011D140EDA0EDA0EDA0EDA03ACD4332BC51 +:102200004321D140060111B641CD431521B6410EFF +:102210001011CF43CD0F2338360D28071120001998 +:10222000C3112221D140CD99223ABC433D32BC4357 +:10223000CA4B2221D140060111B641CD431521B62A +:10224000410E107EB7CA4B22C31122D13EFFC9D125 +:10225000E5DDE1DD7E1B323244DD7E1A323144DDC4 +:102260007E0B322F44AFDD7E1F1F32CB43DD7E1E3F +:102270001F32CA43DD7E1D1F32C9433E0032CC43AC +:10228000CD3321AFC922BD43AF32BF4332C043116A +:10229000BD4301D140CDAD22C97EC60177237ECE9C +:1022A0000077237ECE0077237ECE0077C9E5C5D5A3 +:1022B0001A6F131A67130A5F030A5719D1C17D02F7 +:1022C000037C02031313C5D51A6F131A67130A5F31 +:1022D000030A57ED5AD1C17D02037C02E1C9794856 +:1022E00021000006102917CB11300719CE00D2F2B9 +:1022F000220C10F1414FC9CD1C15DD23DD23DDE596 +:10230000E111D1401800C506000E04EDB0C1C9E5C9 +:10231000C5060B1A4F7E2313A9200610F6C1E1371C +:10232000C9C1E1AFC9060BE53E20772310FCE106E9 +:102330000D1AB7C805C8FE2E200A1378FE0538F11D +:10234000230518F71A772313C33123213F4411D1F2 +:1023500040EDA0EDA0EDA0EDA0ED5BB943ED53BCC9 +:102360004321D140060111B641CD4315CD91010A5B +:102370000D202046696C656E616D6520202020204F +:10238000436C75737465722053697A650A0D002178 +:10239000B6410E107EE5DDE1E5FE41CA2C24FEE5E6 +:1023A000CA2C24FE00CA5E24DD7E0BFE10CA012466 +:1023B0003E20CDDE003E20CDDE000608CD7B183E5F +:1023C0002ECDDE000603CD7B18CD910120307800A4 +:1023D000DD7E1BCD0E01DD7E1ACD0E01CD910120DB +:1023E00020307800DD7E1FCD0E01DD7E1ECD0E017A +:1023F000DD7E1DCD0E01DD7E1CCD0E01CDF8001859 +:102400002B3E44CDDE003E20CDDE000608CD7B18FD +:10241000CD91012020202020307800DD7E1BCD0EC4 +:1024200001DD7E1ACD0E01CDF80018000D2808E15F +:1024300011200019C39423E126002E01CD8522ED41 +:102440005BBC431BED53BC437AB3C821D1400601AA +:1024500011B641CD431521B6410E10C39423E1C9F5 +:10246000D51AFE2E205E131AFE2E20583A7A40B757 +:10247000CA1C253E2E21CF43772377233E20060B0F +:10248000772310FCCDEC21B7C21C25212E40014C36 +:10249000003E00EDB1E22A25014C003E5CEDB9E2C0 +:1024A0002A2523AF7723773A7A403D327A40D121EB +:1024B0002D403E5C77213744113F44EDA0EDA0ED67 +:1024C000A0EDA0C9D1D5CDE421B7C21C253A2F4437 +:1024D000FE10C232253A7A403C327A40212D403EED +:1024E00000014C00EDB12BE22A253A7A40FE01288A +:1024F000043E5C7723D1EBD5010900EDA0E2242551 +:102500007EFE5C2805B7280218F1AF12213744116E +:102510003F44EDA0EDA0EDA0EDA0D1C9213A25CD1D +:10252000E600D1C9D11BAF121801D1215125CDE64A +:1025300000C9D1216425CDE600C90A0D4E6F207374 +:10254000756368206469726563746F7279210A0D1E +:10255000000A0D496E76616C696420696E7075744D +:10256000210A0D000A0D43616E6E6F7420636420B2 +:10257000746F2066696C65210A0D00D5CDE421B722 +:10258000C2122611B641CDB9213AB641FEC3C22BC3 +:1025900026CD91010A0D4C6F6164696E67200021A0 +:1025A0008140CDE600CD910120746F20307800EDA0 +:1025B0004BC04178CD0E0179CD0E01CD9101202E79 +:1025C0002E2E2000ED434344ED4347442AC4416C82 +:1025D000CB3D260023224544D1CDE421ED5B43448D +:1025E000CDB9212A4344110002192243442A45440B +:1025F0002B2245447CB5280218E2CD91014C6F6135 +:102600006420636F6D706C657465210A0D002A4744 +:1026100044E9D1CD91010A0D46696C65206E6F7455 +:1026200020666F756E64210A0D00C9D1CD91010A33 +:102630000D46696C65206973206E6F7420616E2091 +:1026400065786563757461626C65210A0D00C95A0D +:102650003843204D6F6E69746F722056322E3120D0 +:1026600062792044656E6E69732047756E696120DA +:0C26700028323032322D32303234290052 :00000001FF diff --git a/OperatingSystem/monitor_v2/zout/main.lst b/OperatingSystem/monitor_v2/zout/main.lst index 00bdea2..d204e13 100644 --- a/OperatingSystem/monitor_v2/zout/main.lst +++ b/OperatingSystem/monitor_v2/zout/main.lst @@ -90,15 +90,15 @@ 39: 40: - 0008 org 0x0008 41: - 0008 RST_08 ;Print Char - 42: 10+10 0008 C3040D jp EXEC_RST_08 + 42: 10+10 0008 C3960D jp EXEC_RST_08 43: 44: - 0010 org 0x0010 45: - 0010 RST_10 ;receive char - 46: 20+10 0010 C3080D jp EXEC_RST_10 + 46: 20+10 0010 C39A0D jp EXEC_RST_10 47: 48: - 0018 org 0x0018 49: - 0018 RST_18 ;Buffer length - 50: 30+10 0018 C3140D jp EXEC_RST_18 + 50: 30+10 0018 C3A60D jp EXEC_RST_18 51: 52: ;================================================================ 53: ; Default interrupt vectors @@ -137,83 +137,87 @@ 86: - 400B ..401A 00 defs 16 ;16 bytes space for scratch vars 87: - 401B var_ps2mem: 88: - 401B ..402A 00 defs 16 ;16 bytes space for scratch vars - 89: - 402B var_buffer: - 90: - 402B 00 defb 0 ;var lentgh - 91: - 402C var_idebuffer: - 92: - 402C ..432B 00 defs 768 - 93: - 94: - 0370 dephase - 95: - 0370 mon_var_template_end: - 96: 40+4 0370 00 nop - 97: - 98: ;================================================================ - 99: ; Start of monitor + 89: - 402B var_dir: + 90: - 402B ..407A 00 defs 80 + 91: - 407B var_input: + 92: - 407B ..40CA 00 defs 80 + 93: - 40CB var_idebuffer: + 94: - 40CB ..43CA 00 defs 768 + 95: + 96: - 040F dephase + 97: - 040F mon_var_template_end: + 98: 40+4 040F 00 nop + 99: 100: ;================================================================ - 101: - 0050 org 0x0050 - 102: - 0050 BOOT_PHASE0: ;Setup Hardware - 103: ;Setup Stack-Pointer - 104: 44+10 0050 31FFFF ld sp, STACK_RAM_TOP - 105: ;Disable Interrupts - 106: 54+4 0053 F3 di - 107: ;Setup PIO on MIO Board - 108: 58+7 0054 3ECF LD A,0xCF - 109: 65+11 0056 D3F6 OUT (CS_PIO_AC), A - 110: 76+7 0058 3EF7 LD A,11110111b ;All pins inputs except speaker - 111: 83+11 005A D3F6 OUT (CS_PIO_AC), A - 112: 94+7 005C 3E03 LD A,00000011B ;Preset I2C pins to high - 113: 101+11 005E D3F6 OUT (CS_PIO_AC), A - 114: - 115: ;Set variables - 116: 112+13 0060 320440 ld (var_curserstate),a - 117: 125+13 0063 320540 ld (var_curseron),a - 118: 138+7 0066 3E20 ld a, " " - 119: 145+13 0068 320640 ld (var_curserchar),a - 120: - 121: ;Initialize Console (Serial-Port) - 122: 158+17 006B CD9E00 call CONSOLE_INIT - 123: - 124: - 006E BOOT_PHASE1: ;Copy default values to RAM - 125: 175+10 006E 214400 ld hl,mon_var_template - 126: 185+10 0071 117003 ld de,mon_var_template_end - 127: 195+10 0074 010040 ld bc,SYS_RAM_START - 128: - 0077 BOOT_PHASE1_LOOP: - 129: 205+7 0077 7E ld a,(hl) ;copy values - 130: 212+7 0078 02 ld (bc),a - 131: 219+6 0079 23 inc hl - 132: 225+6 007A 03 inc bc - 133: 231+11 007B E5 push hl ;check if end is reached - 134: 242+15 007C ED52 sbc hl,de - 135: 257+10 007E E1 pop hl - 136: 267+10 007F C27700 jp nz, BOOT_PHASE1_LOOP - 137: ;template copy done - 138: - 139: - 0082 BOOT_PHASE2: ;Hardware initialized. - 140: ; Print banner - 141: 277+17 0082 CDEA00 call print_clear - 142: 294+10 0085 216F1E ld hl, [STR_Banner_Start] - 143: 304+17 0088 CDDF00 call print_str - 144: - 145: ; Power-On Self Tests - 146: 321+17 008B CDDD1C call POST_START - 147: - 148: ; Detect IDE drives - 149: 338+17 008E CDAB14 call ideif_init_all - 150: - 151: ; Beep after start - 152: 355+10 0091 114000 LD DE,0x40 - 153: 365+10 0094 014800 LD BC,0x48 - 154: 375+17 0097 CD170D CALL beep - 155: - 156: ; Start commandline - 157: 392+10 009A C3EB17 jp COMMAND - 158: - 159: ; This instruction should never be reached - 160: 402+4 009D 76 halt - 161: - 162: ;================================================================ - 163: ; Includes (2/2) - 164: ;================================================================ - 165: .include "console.s" + 101: ; Start of monitor + 102: ;================================================================ + 103: - 0050 org 0x0050 + 104: - 0050 BOOT_PHASE0: ;Setup Hardware + 105: ;Setup Stack-Pointer + 106: 44+10 0050 31FFFF ld sp, STACK_RAM_TOP + 107: ;Disable Interrupts + 108: 54+4 0053 F3 di + 109: ;Setup PIO on MIO Board + 110: 58+7 0054 3ECF LD A,0xCF + 111: 65+11 0056 D3F6 OUT (CS_PIO_AC), A + 112: 76+7 0058 3EF7 LD A,11110111b ;All pins inputs except speaker + 113: 83+11 005A D3F6 OUT (CS_PIO_AC), A + 114: 94+7 005C 3E03 LD A,00000011B ;Preset I2C pins to high + 115: 101+11 005E D3F6 OUT (CS_PIO_AC), A + 116: + 117: ;Set variables + 118: 112+13 0060 320440 ld (var_curserstate),a + 119: 125+13 0063 320540 ld (var_curseron),a + 120: 138+7 0066 3E20 ld a, " " + 121: 145+13 0068 320640 ld (var_curserchar),a + 122: ;Initialize Console (Serial-Port) + 123: 158+17 006B CDA500 call CONSOLE_INIT + 124: + 125: - 006E BOOT_PHASE1: ;Copy default values to RAM + 126: 175+10 006E 214400 ld hl,mon_var_template + 127: 185+10 0071 110F04 ld de,mon_var_template_end + 128: 195+10 0074 010040 ld bc,SYS_RAM_START + 129: - 0077 BOOT_PHASE1_LOOP: + 130: 205+7 0077 7E ld a,(hl) ;copy values + 131: 212+7 0078 02 ld (bc),a + 132: 219+6 0079 23 inc hl + 133: 225+6 007A 03 inc bc + 134: 231+11 007B E5 push hl ;check if end is reached + 135: 242+15 007C ED52 sbc hl,de + 136: 257+10 007E E1 pop hl + 137: 267+10 007F C27700 jp nz, BOOT_PHASE1_LOOP + 138: ;template copy done + 139: 277+4 0082 AF xor a ;set dir to empty + 140: 281+13 0083 322B40 ld (var_dir),a + 141: 294+13 0086 322C40 ld (var_dir+1),a + 142: + 143: - 0089 BOOT_PHASE2: ;Hardware initialized. + 144: ; Print banner + 145: 307+17 0089 CDF100 call print_clear + 146: 324+10 008C 214F26 ld hl, [STR_Banner_Start] + 147: 334+17 008F CDE600 call print_str + 148: + 149: ; Power-On Self Tests + 150: 351+17 0092 CD191E call POST_START + 151: + 152: ; Detect IDE drives + 153: 368+17 0095 CD3015 call ideif_init_all + 154: + 155: ; Beep after start + 156: 385+10 0098 114000 LD DE,0x40 + 157: 395+10 009B 014800 LD BC,0x48 + 158: 405+17 009E CDA90D CALL beep + 159: + 160: ; Start commandline + 161: 422+10 00A1 C31519 jp COMMAND + 162: + 163: ; This instruction should never be reached + 164: 432+4 00A4 76 halt + 165: + 166: ;================================================================ + 167: ; Includes (2/2) + 168: ;================================================================ + 169: .include "console.s" **** include/console.s **** 1: ;DIP SWICTHES 2: ;1843200 CLK / x16 SIO CLOCK MODE = 115200 @@ -223,208 +227,292 @@ 6: ;9600 -> 12 / 00110000 7: ; 8: - 9: - 009E CONSOLE_INIT: - 10: - 009E CONSOLE_INIT_CTC: + 9: - 00A5 CONSOLE_INIT: + 10: - 00A5 CONSOLE_INIT_CTC: 11: ;LD A,00001111b ; Set /16 Divider, CPU Trigger, Time COnstant Follows - 12: 406+7 009E 3E4F LD A,01001111b ; External Trigger, Time COnstant Follows - 13: 413+11 00A0 D304 OUT (CS_CTC_0),A - 14: 424+11 00A2 DB01 IN A,(CS_DIP) ; Read BAUD from DIP-Switches + 12: 436+7 00A5 3E4F LD A,01001111b ; External Trigger, Time COnstant Follows + 13: 443+11 00A7 D304 OUT (CS_CTC_0),A + 14: 454+11 00A9 DB01 IN A,(CS_DIP) ; Read BAUD from DIP-Switches 15: ;LD A,39 - 16: 435+11 00A4 D304 OUT (CS_CTC_0),A - 17: - 00A6 CONSOLE_INIT_SIO: - 18: 446+7 00A6 3E30 LD A,00110000b ;write into WR0: error reset, select WR0 - 19: 453+11 00A8 D309 OUT (CS_SIO_A_C),A - 20: 464+7 00AA 3E18 LD a,018h ;write into WR0: channel reset - 21: 471+11 00AC D309 OUT (CS_SIO_A_C),A - 22: 482+7 00AE 3E04 LD a,004h ;write into WR0: select WR4 - 23: 489+11 00B0 D309 OUT (CS_SIO_A_C),A - 24: 500+7 00B2 3E44 LD a,01000100b ;write into WR4: clkx16,1 stop bit, no parity - 25: 507+11 00B4 D309 OUT (CS_SIO_A_C),A - 26: 518+7 00B6 3E05 LD a,005h ;write into WR0: select WR5 - 27: 525+11 00B8 D309 OUT (CS_SIO_A_C),A - 28: 536+7 00BA 3EE8 LD a,11101000b ;DTR inactive, TX 8bit, BREAK off, TX on, RTS inactive - 29: 543+11 00BC D309 OUT (CS_SIO_A_C),A - 30: 554+7 00BE 3E01 LD a,01h ;write into WR0: select WR1 - 31: 561+11 00C0 D309 OUT (CS_SIO_A_C),A - 32: 572+7 00C2 3E04 LD a,00000100b ;no interrupt in CH B, special RX condition affects vect - 33: 579+11 00C4 D309 OUT (CS_SIO_A_C),A - 34: 590+7 00C6 3E02 LD a,02h ;write into WR0: select WR2 - 35: 597+11 00C8 D309 OUT (CS_SIO_A_C),A - 36: 608+7 00CA 3E00 LD a,0h ;write into WR2: cmd line int vect (see int vec table) + 16: 465+11 00AB D304 OUT (CS_CTC_0),A + 17: - 00AD CONSOLE_INIT_SIO: + 18: 476+7 00AD 3E30 LD A,00110000b ;write into WR0: error reset, select WR0 + 19: 483+11 00AF D309 OUT (CS_SIO_A_C),A + 20: 494+7 00B1 3E18 LD a,018h ;write into WR0: channel reset + 21: 501+11 00B3 D309 OUT (CS_SIO_A_C),A + 22: 512+7 00B5 3E04 LD a,004h ;write into WR0: select WR4 + 23: 519+11 00B7 D309 OUT (CS_SIO_A_C),A + 24: 530+7 00B9 3E44 LD a,01000100b ;write into WR4: clkx16,1 stop bit, no parity + 25: 537+11 00BB D309 OUT (CS_SIO_A_C),A + 26: 548+7 00BD 3E05 LD a,005h ;write into WR0: select WR5 + 27: 555+11 00BF D309 OUT (CS_SIO_A_C),A + 28: 566+7 00C1 3EE8 LD a,11101000b ;DTR inactive, TX 8bit, BREAK off, TX on, RTS inactive + 29: 573+11 00C3 D309 OUT (CS_SIO_A_C),A + 30: 584+7 00C5 3E01 LD a,01h ;write into WR0: select WR1 + 31: 591+11 00C7 D309 OUT (CS_SIO_A_C),A + 32: 602+7 00C9 3E04 LD a,00000100b ;no interrupt in CH B, special RX condition affects vect + 33: 609+11 00CB D309 OUT (CS_SIO_A_C),A + 34: 620+7 00CD 3E02 LD a,02h ;write into WR0: select WR2 + 35: 627+11 00CF D309 OUT (CS_SIO_A_C),A + 36: 638+7 00D1 3E00 LD a,0h ;write into WR2: cmd line int vect (see int vec table) 37: ;bits D3,D2,D1 are changed according to RX condition - 38: 615+11 00CC D309 OUT (CS_SIO_A_C),A - 39: 626+7 00CE 3E03 LD a,003h ;write into WR0: select WR3 - 40: 633+11 00D0 D309 OUT (CS_SIO_A_C),A - 41: 644+7 00D2 3EC1 LD a,0C1h ;RX 8bit, auto enable off, RX on - 42: 651+11 00D4 D309 OUT (CS_SIO_A_C),A + 38: 645+11 00D3 D309 OUT (CS_SIO_A_C),A + 39: 656+7 00D5 3E03 LD a,003h ;write into WR0: select WR3 + 40: 663+11 00D7 D309 OUT (CS_SIO_A_C),A + 41: 674+7 00D9 3EC1 LD a,0C1h ;RX 8bit, auto enable off, RX on + 42: 681+11 00DB D309 OUT (CS_SIO_A_C),A 43: ;Channel A RX active - 44: 662+10 00D6 C9 RET + 44: 692+10 00DD C9 RET 45: 46: ; A contains char 47: ; Destroys A - 48: - 00D7 print_char: - 49: 672+11 00D7 F5 push af - 50: 683+11 00D8 D308 out (CS_SIO_A_D),a - 51: 694+17 00DA CDFC00 call print_wait_out - 52: 711+10 00DD F1 pop af + 48: - 00DE print_char: + 49: 702+11 00DE F5 push af + 50: 713+11 00DF D308 out (CS_SIO_A_D),a + 51: 724+17 00E1 CD0301 call print_wait_out + 52: 741+10 00E4 F1 pop af 53: ;call print_char - 54: 721+10 00DE C9 ret + 54: 751+10 00E5 C9 ret 55: ; HL contains pointer to string 56: ; Destroy A, HL 57: - 58: - 00DF print_str: - 59: 731+7 00DF 7E ld a, (hl) - 60: 738+4 00E0 B7 or a - 61: 742+7+5 00E1 2806 jr z,print_str_end - 62: 749+17 00E3 CDD700 call print_char - 63: 766+6 00E6 23 inc hl - 64: 772+12 00E7 18F6 jr print_str - 65: - 00E9 print_str_end: - 66: 784+10 00E9 C9 ret + 58: - 00E6 print_str: + 59: 761+7 00E6 7E ld a, (hl) + 60: 768+4 00E7 B7 or a + 61: 772+7+5 00E8 2806 jr z,print_str_end + 62: 779+17 00EA CDDE00 call print_char + 63: 796+6 00ED 23 inc hl + 64: 802+12 00EE 18F6 jr print_str + 65: - 00F0 print_str_end: + 66: 814+10 00F0 C9 ret 67: - 68: - 00EA print_clear: - 69: 794+10 00EA 214A01 ld hl, [MSG_CLEAR] - 70: 804+17 00ED CDDF00 call print_str - 71: 821+10 00F0 C9 ret + 68: - 00F1 print_clear: + 69: 824+10 00F1 217701 ld hl, [MSG_CLEAR] + 70: 834+17 00F4 CDE600 call print_str + 71: 851+10 00F7 C9 ret 72: - 73: - 00F1 print_newLine: - 74: 831+7 00F1 3E0A ld a,10 - 75: 838+17 00F3 CDD700 call print_char - 76: 855+7 00F6 3E0D ld a,13 - 77: 862+17 00F8 CDD700 call print_char - 78: 879+10 00FB C9 ret + 73: - 00F8 print_newLine: + 74: 861+7 00F8 3E0A ld a,10 + 75: 868+17 00FA CDDE00 call print_char + 76: 885+7 00FD 3E0D ld a,13 + 77: 892+17 00FF CDDE00 call print_char + 78: 909+10 0102 C9 ret 79: ; destroys a - 80: - 00FC print_wait_out: + 80: - 0103 print_wait_out: 81: ; check for TX buffer empty - 82: 889+4 00FC 97 sub a ;clear a, write into WR0: select RR0 - 83: 893+4 00FD 3C inc a ;select RR1 - 84: 897+11 00FE D309 out (CS_SIO_A_C),A - 85: 908+11 0100 DB09 in A,(CS_SIO_A_C) ;read RRx - 86: 919+8 0102 CB47 bit 0,A - 87: 927+7+5 0104 28F6 jr z,print_wait_out - 88: 934+10 0106 C9 ret + 82: 919+4 0103 97 sub a ;clear a, write into WR0: select RR0 + 83: 923+4 0104 3C inc a ;select RR1 + 84: 927+11 0105 D309 out (CS_SIO_A_C),A + 85: 938+11 0107 DB09 in A,(CS_SIO_A_C) ;read RRx + 86: 949+8 0109 CB47 bit 0,A + 87: 957+7+5 010B 28F6 jr z,print_wait_out + 88: 964+10 010D C9 ret 89: - 90: - 0107 print_a_hex: - 91: 944+11 0107 F5 push af - 92: 955+11 0108 C5 push bc - 93: 966+11 0109 D5 push de - 94: 977+17 010A CD9B01 call STRCONV_BYTES_TO_HEX - 95: 994+4 010D 78 ld a,b - 96: 998+17 010E CDD700 call print_char - 97: 1015+4 0111 79 ld a,c - 98: 1019+17 0112 CDD700 call print_char - 99: 1036+10 0115 D1 pop de - 100: 1046+10 0116 C1 pop bc - 101: 1056+10 0117 F1 pop af - 102: 1066+10 0118 C9 ret + 90: - 010E print_a_hex: + 91: 974+11 010E F5 push af + 92: 985+11 010F C5 push bc + 93: 996+11 0110 D5 push de + 94: 1007+17 0111 CD2D02 call STRCONV_BYTES_TO_HEX + 95: 1024+4 0114 78 ld a,b + 96: 1028+17 0115 CDDE00 call print_char + 97: 1045+4 0118 79 ld a,c + 98: 1049+17 0119 CDDE00 call print_char + 99: 1066+10 011C D1 pop de + 100: 1076+10 011D C1 pop bc + 101: 1086+10 011E F1 pop af + 102: 1096+10 011F C9 ret 103: - 104: - 0119 print_bcd: - 105: 1076+7 0119 C630 ADD 48 ;offset for ascii number - 106: 1083+17 011B CDD700 call print_char - 107: 1100+10 011E C9 ret + 104: - 0120 print_bcd: + 105: 1106+7 0120 C630 ADD 48 ;offset for ascii number + 106: 1113+17 0122 CDDE00 call print_char + 107: 1130+10 0125 C9 ret 108: - 109: - 011F read_char: - 110: 1110+17 011F CD5B01 call A_RTS_ON - 111: 1127+4 0122 00 nop - 112: 1131+4 0123 AF xor a ; a = 0 - 113: 1135+11 0124 D309 out (CS_SIO_A_C), a ; select reg 0 - 114: 1146+11 0126 DB09 in a, (CS_SIO_A_C) ; read reg 0 - 115: 1157+7 0128 E601 and 1 ; mask D0 (recieve char available) - 116: 1164+17 012A CD5201 call A_RTS_OFF - 117: 1181+5+6 012D C8 ret Z ; return 0 if no char - 118: 1186+11 012E DB08 in a, (CS_SIO_A_D) ; read char if avail - 119: 1197+10 0130 C9 ret ; return + 109: - 0126 read_char: + 110: 1140+17 0126 CD8801 call A_RTS_ON + 111: 1157+4 0129 00 nop + 112: 1161+4 012A AF xor a ; a = 0 + 113: 1165+11 012B D309 out (CS_SIO_A_C), a ; select reg 0 + 114: 1176+11 012D DB09 in a, (CS_SIO_A_C) ; read reg 0 + 115: 1187+7 012F E601 and 1 ; mask D0 (recieve char available) + 116: 1194+17 0131 CD7F01 call A_RTS_OFF + 117: 1211+5+6 0134 C8 ret Z ; return 0 if no char + 118: 1216+11 0135 DB08 in a, (CS_SIO_A_D) ; read char if avail + 119: 1227+10 0137 C9 ret ; return 120: - 121: - 0131 read_bcd; - 122: 1207+17 0131 CD1F01 call read_char - 123: 1224+10 0134 CA3101 jp z, read_bcd - 124: 1234+17 0137 CDD700 call print_char - 125: 1251+7 013A DE30 sbc 48 ;remove ascii offset - 126: 1258+10 013C DA4701 jp c, _read_bcd_invalid ;if carry, wrong input - 127: 1268+7 013F FE0A cp 10 - 128: 1275+10 0141 CA4701 jp z, _read_bcd_invalid ;if equal or greater than 10, also error - 129: 1285+7 0144 E60F and 0x0F ;mask unused bits - 130: 1292+10 0146 C9 ret - 131: - 0147 _read_bcd_invalid - 132: 1302+7 0147 3EFF ld a, 0xFF - 133: 1309+10 0149 C9 ret + 121: - 0138 read_bcd; + 122: 1237+17 0138 CD2601 call read_char + 123: 1254+10 013B CA3801 jp z, read_bcd + 124: 1264+17 013E CDDE00 call print_char + 125: 1281+7 0141 DE30 sbc 48 ;remove ascii offset + 126: 1288+10 0143 DA4E01 jp c, _read_bcd_invalid ;if carry, wrong input + 127: 1298+7 0146 FE0A cp 10 + 128: 1305+10 0148 CA4E01 jp z, _read_bcd_invalid ;if equal or greater than 10, also error + 129: 1315+7 014B E60F and 0x0F ;mask unused bits + 130: 1322+10 014D C9 ret + 131: - 014E _read_bcd_invalid + 132: 1332+7 014E 3EFF ld a, 0xFF + 133: 1339+10 0150 C9 ret 134: - 135: - 136: ;MSG_CRSR_0: - 137: ; db 0x1B, "[?25h",0 - 138: ;MSG_CRSR_1: - 139: ; db 0x1B, "[?25l",0 - 140: - 014A MSG_CLEAR: - 141: - 014A 1B5B324A db 27, '[2J', 27, '[H',0 + 135: - 0151 print_32_hex: + 136: 1349+19 0151 DD7E03 ld a,(ix+3) + 137: 1368+17 0154 CD0E01 call print_a_hex + 138: 1385+19 0157 DD7E02 ld a,(ix+2) + 139: 1404+17 015A CD0E01 call print_a_hex + 140: 1421+19 015D DD7E01 ld a,(ix+1) + 141: 1440+17 0160 CD0E01 call print_a_hex + 142: 1457+19 0163 DD7E00 ld a,(ix+0) + 143: 1476+17 0166 CD0E01 call print_a_hex + 144: 1493+10 0169 C9 ret + 145: + 146: - 016A print_16_hex: + 147: 1503+19 016A DD7E01 ld a,(ix+1) + 148: 1522+17 016D CD0E01 call print_a_hex + 149: 1539+19 0170 DD7E00 ld a,(ix+0) + 150: 1558+17 0173 CD0E01 call print_a_hex + 151: 1575+10 0176 C9 ret + 152: + 153: + 154: ;MSG_CRSR_0: + 155: ; db 0x1B, "[?25h",0 + 156: ;MSG_CRSR_1: + 157: ; db 0x1B, "[?25l",0 + 158: - 0177 MSG_CLEAR: + 159: - 0177 1B5B324A db 27, '[2J', 27, '[H',0 1B5B4800 - 142: - 143: - 144: - 145: ; Serial Util Functions - 146: - 0152 A_RTS_OFF: - 147: 1319+7 0152 3E05 ld a,005h ;write into WR0: select WR5 - 148: 1326+11 0154 D309 out (CS_SIO_A_C),A - 149: 1337+7 0156 3E68 ld a,068h ;DTR inactive, TX 8bit, BREAK off, TX on, RTS inactive - 150: 1344+11 0158 D309 out (CS_SIO_A_C),A - 151: 1355+10 015A C9 ret - 152: - 015B A_RTS_ON: - 153: 1365+7 015B 3E05 ld a,005h ;write into WR0: select WR5 - 154: 1372+11 015D D309 out (CS_SIO_A_C),A - 155: 1383+7 015F 3EEA ld a,0EAh ;DTR active, TX 8bit, BREAK off, TX on, RTS active - 156: 1390+11 0161 D309 out (CS_SIO_A_C),A + 160: + 161: + 162: + 163: ; Serial Util Functions + 164: - 017F A_RTS_OFF: + 165: 1585+7 017F 3E05 ld a,005h ;write into WR0: select WR5 + 166: 1592+11 0181 D309 out (CS_SIO_A_C),A + 167: 1603+7 0183 3E68 ld a,068h ;DTR inactive, TX 8bit, BREAK off, TX on, RTS inactive + 168: 1610+11 0185 D309 out (CS_SIO_A_C),A + 169: 1621+10 0187 C9 ret + 170: - 0188 A_RTS_ON: + 171: 1631+7 0188 3E05 ld a,005h ;write into WR0: select WR5 + 172: 1638+11 018A D309 out (CS_SIO_A_C),A + 173: 1649+7 018C 3EEA ld a,0EAh ;DTR active, TX 8bit, BREAK off, TX on, RTS active + 174: 1656+11 018E D309 out (CS_SIO_A_C),A + 175: 1667+10 0190 C9 ret + 176: + 177: ;------------------------------------------------------------------------------ + 178: ; PRINTINLINE + 179: ; + 180: ; String output function + 181: ; + 182: ; Prints in-line data (bytes immediately following the PRINTINLINE call) + 183: ; until a string terminator is encountered (0 - null char). + 184: ;------------------------------------------------------------------------------ + 185: - 0191 PRINTINLINE: + 186: 1677+19 0191 E3 EX (SP),HL ; PUSH HL and put RET ADDress into HL + 187: 1696+11 0192 F5 PUSH AF + 188: 1707+11 0193 C5 PUSH BC + 189: - 0194 nxtILC: + 190: 1718+7 0194 7E LD A,(HL) + 191: 1725+7 0195 FE00 CP 0 + 192: 1732+7+5 0197 2806 JR Z,endPrint + 193: 1739+17 0199 CDDE00 CALL print_char + 194: 1756+6 019C 23 INC HL + 195: 1762+12 019D 18F5 JR nxtILC + 196: - 019F endPrint: + 197: 1774+6 019F 23 INC HL ; Get past "null" terminator + 198: 1780+10 01A0 C1 POP BC + 199: 1790+10 01A1 F1 POP AF + 200: 1800+19 01A2 E3 EX (SP),HL ; PUSH new RET ADDress on stack and restore HL + 201: 1819+10 01A3 C9 RET + 202: + 203: - 01A4 print_reg: + 204: 1829+11 01A4 F5 push af + 205: 1840+11 01A5 D5 push de + 206: 1851+11 01A6 C5 push bc + 207: 1862+11 01A7 E5 push hl + 208: 1873+11 01A8 F5 push af + 209: 1884+17 01A9 CD9101 call PRINTINLINE + 210: - 01AC 0A0D413A db 10,13,"A: ",0 + 202000 + 211: 1901+10 01B3 F1 pop af + 212: 1911+17 01B4 CD0E01 call print_a_hex + 213: 1928+17 01B7 CD9101 call PRINTINLINE + 214: - 01BA 0A0D4243 db 10,13,"BC: ",0 + 3A2000 + 215: 1945+4 01C1 78 ld a,b + 216: 1949+17 01C2 CD0E01 call print_a_hex + 217: 1966+4 01C5 79 ld a,c + 218: 1970+17 01C6 CD0E01 call print_a_hex + 219: 1987+17 01C9 CD9101 call PRINTINLINE + 220: - 01CC 0A0D4445 db 10,13,"DE: ",0 + 3A2000 + 221: 2004+4 01D3 7A ld a,d + 222: 2008+17 01D4 CD0E01 call print_a_hex + 223: 2025+4 01D7 7B ld a,e + 224: 2029+17 01D8 CD0E01 call print_a_hex + 225: 2046+10 01DB F1 pop af + 226: 2056+17 01DC CD9101 call PRINTINLINE + 227: - 01DF 0A0D484C db 10,13,"HL: ",0 + 3A2000 + 228: 2073+4 01E6 7C ld a,h + 229: 2077+17 01E7 CD0E01 call print_a_hex + 230: 2094+4 01EA 7D ld a,l + 231: 2098+17 01EB CD0E01 call print_a_hex + 232: 2115+17 01EE CDF800 call print_newLine + 233: 2132+10 01F1 E1 pop hl + 234: 2142+10 01F2 C1 pop bc + 235: 2152+10 01F3 D1 pop de + 236: 2162+10 01F4 F1 pop af **** main.asm **** - 166: 1401+10 0163 C9 ret - 167: .include "conversions.s" + 170: 2172+10 01F5 C9 ret + 171: .include "conversions.s" **** include/conversions.s **** 1: ; HL Contains Address to string 2: ; E is 0xFF if error 3: ; E is 0x00 if okay 4: ; A returns byte 5: ; A,DE are destroyed - 6: - 0164 DHEX_TO_BYTE: - 7: 1411+11 0164 E5 PUSH HL ;Backup pointer + 6: - 01F6 DHEX_TO_BYTE: + 7: 2182+11 01F6 E5 PUSH HL ;Backup pointer 8: ; Load First Byte - 9: 1422+7 0165 7E LD A,(HL) ;Load first char (high) - 10: 1429+17 0166 CD8401 CALL HEX_TO_BIN ;Conv chart to 4bit - 11: 1446+7+5 0169 3815 jr C, DHEX_TO_BYTE_FAILED ;If error jmp to DHEX_TO_BYTE_FAILED - 12: 1453+8 016B CB27 SLA A ;shift result to upper 4 bits - 13: 1461+8 016D CB27 SLA A - 14: 1469+8 016F CB27 SLA A - 15: 1477+8 0171 CB27 SLA A - 16: 1485+4 0173 57 LD D,A ;store result in D + 9: 2193+7 01F7 7E LD A,(HL) ;Load first char (high) + 10: 2200+17 01F8 CD1602 CALL HEX_TO_BIN ;Conv chart to 4bit + 11: 2217+7+5 01FB 3815 jr C, DHEX_TO_BYTE_FAILED ;If error jmp to DHEX_TO_BYTE_FAILED + 12: 2224+8 01FD CB27 SLA A ;shift result to upper 4 bits + 13: 2232+8 01FF CB27 SLA A + 14: 2240+8 0201 CB27 SLA A + 15: 2248+8 0203 CB27 SLA A + 16: 2256+4 0205 57 LD D,A ;store result in D 17: - 18: 1489+6 0174 23 INC HL ;next byte - 19: 1495+7 0175 7E LD A,(HL) ;load 2nd char (lower) - 20: 1502+17 0176 CD8401 CALL HEX_TO_BIN ;Conv chart to 4bit - 21: 1519+7+5 0179 3805 jr C, DHEX_TO_BYTE_FAILED ;If error jmp to DHEX_TO_BYTE_FAILED - 22: 1526+4 017B B2 OR D ;merge D with accumulator + 18: 2260+6 0206 23 INC HL ;next byte + 19: 2266+7 0207 7E LD A,(HL) ;load 2nd char (lower) + 20: 2273+17 0208 CD1602 CALL HEX_TO_BIN ;Conv chart to 4bit + 21: 2290+7+5 020B 3805 jr C, DHEX_TO_BYTE_FAILED ;If error jmp to DHEX_TO_BYTE_FAILED + 22: 2297+4 020D B2 OR D ;merge D with accumulator 23: - 24: 1530+10 017C E1 POP HL ;restor original pointer - 25: 1540+7 017D 1E00 LD E,0x00 ;set error to 0x00 = no error - 26: 1547+10 017F C9 RET - 27: - 0180 DHEX_TO_BYTE_FAILED: - 28: 1557+7 0180 1EFF LD E,0xFF ;set error to oxFF + 24: 2301+10 020E E1 POP HL ;restor original pointer + 25: 2311+7 020F 1E00 LD E,0x00 ;set error to 0x00 = no error + 26: 2318+10 0211 C9 RET + 27: - 0212 DHEX_TO_BYTE_FAILED: + 28: 2328+7 0212 1EFF LD E,0xFF ;set error to oxFF 29: ;LD A,0x00 - 30: 1564+10 0182 E1 POP HL - 31: 1574+10 0183 C9 RET + 30: 2335+10 0214 E1 POP HL + 31: 2345+10 0215 C9 RET 32: 33: ; REG A Contains CHAR-Low 34: ; If failed, Carry is set - 35: - 0184 HEX_TO_BIN: - 36: 1584+7 0184 D630 SUB 48 ; 0 is 0 - 37: 1591+10 0186 EA9901 jp PE, HEX_TO_INVALID_2; to low (SUB overflow) - 38: 1601+7 0189 FE0A CP 10 ; Value is between 0 and 9 - 39: 1608+7+5 018B 3805 JR C, HEX_TO_BIN_2 - 40: 1615+7 018D D607 SUB 7 - 41: 1622+10 018F EA9901 jp PE, HEX_TO_INVALID_2; to low (SUB overflow) - 42: - 0192 HEX_TO_BIN_2: - 43: 1632+7 0192 FE10 CP 16 - 44: 1639+7+5 0194 3003 JR NC, HEX_TO_INVALID_2; if bigger than 15-> fail - 45: 1646+7 0196 E60F AND 0x0F - 46: 1653+10 0198 C9 RET - 47: - 0199 HEX_TO_INVALID_2: - 48: 1663+4 0199 37 SCF ;set carry flag - 49: 1667+10 019A C9 RET + 35: - 0216 HEX_TO_BIN: + 36: 2355+7 0216 D630 SUB 48 ; 0 is 0 + 37: 2362+10 0218 EA2B02 jp PE, HEX_TO_INVALID_2; to low (SUB overflow) + 38: 2372+7 021B FE0A CP 10 ; Value is between 0 and 9 + 39: 2379+7+5 021D 3805 JR C, HEX_TO_BIN_2 + 40: 2386+7 021F D607 SUB 7 + 41: 2393+10 0221 EA2B02 jp PE, HEX_TO_INVALID_2; to low (SUB overflow) + 42: - 0224 HEX_TO_BIN_2: + 43: 2403+7 0224 FE10 CP 16 + 44: 2410+7+5 0226 3003 JR NC, HEX_TO_INVALID_2; if bigger than 15-> fail + 45: 2417+7 0228 E60F AND 0x0F + 46: 2424+10 022A C9 RET + 47: - 022B HEX_TO_INVALID_2: + 48: 2434+4 022B 37 SCF ;set carry flag + 49: 2438+10 022C C9 RET 50: 51: 52: ;***************** @@ -437,36 +525,36 @@ 59: ;Outputs: BC contains 2 Bytes of ASCII (HEX) 60: ; 61: ;Destroys: A, BC, - 62: - 019B STRCONV_BYTES_TO_HEX: - 63: 1677+11 019B F5 PUSH AF;Backup A Register - 64: 1688+4 019C 1F RRA - 65: 1692+4 019D 1F RRA - 66: 1696+4 019E 1F RRA - 67: 1700+4 019F 1F RRA - 68: 1704+17 01A0 CDAA01 CALL STRCONV_BYTES_TO_HEX_1 + 62: - 022D STRCONV_BYTES_TO_HEX: + 63: 2448+11 022D F5 PUSH AF;Backup A Register + 64: 2459+4 022E 1F RRA + 65: 2463+4 022F 1F RRA + 66: 2467+4 0230 1F RRA + 67: 2471+4 0231 1F RRA + 68: 2475+17 0232 CD3C02 CALL STRCONV_BYTES_TO_HEX_1 69: ;LD A,D - 70: 1721+4 01A3 47 LD B,A - 71: 1725+10 01A4 F1 POP AF ; Reload first Byte - 72: 1735+17 01A5 CDAA01 CALL STRCONV_BYTES_TO_HEX_1 + 70: 2492+4 0235 47 LD B,A + 71: 2496+10 0236 F1 POP AF ; Reload first Byte + 72: 2506+17 0237 CD3C02 CALL STRCONV_BYTES_TO_HEX_1 73: ;LD A,D - 74: 1752+4 01A8 4F LD C,A - 75: 1756+10 01A9 C9 RET + 74: 2523+4 023A 4F LD C,A + 75: 2527+10 023B C9 RET 76: - 77: - 01AA STRCONV_BYTES_TO_HEX_1: - 78: 1766+7 01AA E60F AND 0x0F - 79: 1773+7 01AC C630 ADD 48 - 80: 1780+7 01AE FE3A CP 58 ; Check if less than 58 (less than ASCII 9) + 77: - 023C STRCONV_BYTES_TO_HEX_1: + 78: 2537+7 023C E60F AND 0x0F + 79: 2544+7 023E C630 ADD 48 + 80: 2551+7 0240 FE3A CP 58 ; Check if less than 58 (less than ASCII 9) 81: ;JR C, STRCONV_BYTES_TO_HEX_2 - 82: 1787+5+6 01B0 D8 RET C - 83: 1792+7 01B1 C607 ADD 7 ; A-F - 84: 1799+10 01B3 C9 RET - 85: - 01B4 STRCONV_BYTES_TO_HEX_2: + 82: 2558+5+6 0242 D8 RET C + 83: 2563+7 0243 C607 ADD 7 ; A-F + 84: 2570+10 0245 C9 RET + 85: - 0246 STRCONV_BYTES_TO_HEX_2: 86: ;LD D,A - 87: 1809+10 01B4 C9 RET + 87: 2580+10 0246 C9 RET 88: 89: **** main.asm **** - 168: .include "disassembler.s" + 172: .include "disassembler.s" **** include/disassembler.s **** 1: - 4110 var_opcode_start equ PRG_RAM_START ;16 bit pointer to opcode in mem 2: - 4112 var_opcode_table equ PRG_RAM_START+2 ;16 bit pointer to opcode in table @@ -478,253 +566,253 @@ 8: - 411A var_bytes_count equ PRG_RAM_START+10 ;bytes to examine 9: ; HL contains start address 10: ; B contains length - 11: - 01B5 disassemble: - 12: 1819+4 01B5 78 ld a,b - 13: 1823+13 01B6 321A41 ld (var_bytes_count),a - 14: - 01B9 disassemble_next: + 11: - 0247 disassemble: + 12: 2590+4 0247 78 ld a,b + 13: 2594+13 0248 321A41 ld (var_bytes_count),a + 14: - 024B disassemble_next: 15: 16: - 17: 1836+16 01B9 221041 ld (var_opcode_start), hl ;16 bit pointer to opcode in mem - 18: 1852+7 01BC 7E ld a,(hl) ;load opcode to find in A - 19: 1859+13 01BD 321441 ld (var_opcode), a ;8 bit opcode value - 20: 1872+6 01C0 23 inc hl - 21: 1878+7 01C1 7E ld a,(hl) ;load opcode to find in A - 22: 1885+13 01C2 321541 ld (var_opcode_x), a ;8 bit opcode extended value - 23: 1898+6 01C5 2B dec hl - 24: 1904+17 01C6 CDA902 call disassemble_table_seek - 25: 1921+4 01C9 78 ld a,b - 26: 1925+4 01CA B1 or c - 27: 1929+10 01CB CA8B02 jp z, disassemble_err ;if bc==0000h + 17: 2607+16 024B 221041 ld (var_opcode_start), hl ;16 bit pointer to opcode in mem + 18: 2623+7 024E 7E ld a,(hl) ;load opcode to find in A + 19: 2630+13 024F 321441 ld (var_opcode), a ;8 bit opcode value + 20: 2643+6 0252 23 inc hl + 21: 2649+7 0253 7E ld a,(hl) ;load opcode to find in A + 22: 2656+13 0254 321541 ld (var_opcode_x), a ;8 bit opcode extended value + 23: 2669+6 0257 2B dec hl + 24: 2675+17 0258 CD3B03 call disassemble_table_seek + 25: 2692+4 025B 78 ld a,b + 26: 2696+4 025C B1 or c + 27: 2700+10 025D CA1D03 jp z, disassemble_err ;if bc==0000h 28: - 29: 1939+20 01CE ED431241 ld (var_opcode_table), bc ;16 bit pointer to opcode in table + 29: 2710+20 0260 ED431241 ld (var_opcode_table), bc ;16 bit pointer to opcode in table 30: 31: ;load params - 32: 1959+6 01D2 03 inc bc - 33: 1965+6 01D3 03 inc bc - 34: 1971+6 01D4 03 inc bc - 35: 1977+6 01D5 03 inc bc - 36: 1983+7 01D6 0A ld a,(bc) - 37: 1990+13 01D7 321641 ld (var_opcode_length),A ;8 bit opcode length (in bytes) - 38: 2003+6 01DA 03 inc bc - 39: 2009+7 01DB 0A ld a, (bc) - 40: 2016+4 01DC 5F ld e,a - 41: 2020+6 01DD 03 inc bc - 42: 2026+7 01DE 0A ld a, (bc) - 43: 2033+4 01DF 57 ld d,a - 44: 2037+20 01E0 ED531741 ld (var_opcode_string),de ;16 bit pointer to opcode string - 45: 2057+6 01E4 03 inc bc - 46: 2063+7 01E5 0A ld a,(bc) - 47: 2070+13 01E6 321941 ld (var_opcode_pcount),A ;8 bit opcode param count + 32: 2730+6 0264 03 inc bc + 33: 2736+6 0265 03 inc bc + 34: 2742+6 0266 03 inc bc + 35: 2748+6 0267 03 inc bc + 36: 2754+7 0268 0A ld a,(bc) + 37: 2761+13 0269 321641 ld (var_opcode_length),A ;8 bit opcode length (in bytes) + 38: 2774+6 026C 03 inc bc + 39: 2780+7 026D 0A ld a, (bc) + 40: 2787+4 026E 5F ld e,a + 41: 2791+6 026F 03 inc bc + 42: 2797+7 0270 0A ld a, (bc) + 43: 2804+4 0271 57 ld d,a + 44: 2808+20 0272 ED531741 ld (var_opcode_string),de ;16 bit pointer to opcode string + 45: 2828+6 0276 03 inc bc + 46: 2834+7 0277 0A ld a,(bc) + 47: 2841+13 0278 321941 ld (var_opcode_pcount),A ;8 bit opcode param count 48: 49: ;values are prepared. Continue with print 50: - 51: 2083+16 01E9 2A1041 ld hl,(var_opcode_start) ;print address - 52: 2099+17 01EC CDF102 call dasm_print16hex_addr + 51: 2854+16 027B 2A1041 ld hl,(var_opcode_start) ;print address + 52: 2870+17 027E CD8303 call dasm_print16hex_addr 53: - 54: 2116+13 01EF 3A1641 ld a,(var_opcode_length) - 55: 2129+4 01F2 47 ld b, a + 54: 2887+13 0281 3A1641 ld a,(var_opcode_length) + 55: 2900+4 0284 47 ld b, a 56: 57: ;print up to 4 opcode bytes - 58: 2133+16 01F3 2A1041 ld hl,(var_opcode_start) + 58: 2904+16 0285 2A1041 ld hl,(var_opcode_start) 59: - 60: - 01F6 disassemble_print_opcode_raw - 61: 2149+7 01F6 7E ld a,(hl) ;load first byte - 62: 2156+17 01F7 CD0701 call print_a_hex - 63: 2173+6 01FA 23 inc hl - 64: 2179+8+5 01FB 10F9 djnz disassemble_print_opcode_raw + 60: - 0288 disassemble_print_opcode_raw + 61: 2920+7 0288 7E ld a,(hl) ;load first byte + 62: 2927+17 0289 CD0E01 call print_a_hex + 63: 2944+6 028C 23 inc hl + 64: 2950+8+5 028D 10F9 djnz disassemble_print_opcode_raw 65: - 66: 2187+7 01FD 3E68 ld a,"h" - 67: 2194+17 01FF CDD700 call print_char + 66: 2958+7 028F 3E68 ld a,"h" + 67: 2965+17 0291 CDDE00 call print_char 68: ;fill empty spots - 69: 2211+13 0202 3A1641 ld a,(var_opcode_length) - 70: 2224+4 0205 47 ld b,a - 71: 2228+7 0206 3E06 ld a,6 - 72: 2235+4 0208 90 sub b - 73: 2239+4 0209 47 ld b,a + 69: 2982+13 0294 3A1641 ld a,(var_opcode_length) + 70: 2995+4 0297 47 ld b,a + 71: 2999+7 0298 3E06 ld a,6 + 72: 3006+4 029A 90 sub b + 73: 3010+4 029B 47 ld b,a 74: - 75: - 020A disassemble_print_opcode_raw_fill: - 76: 2243+7 020A 3E20 ld a," " - 77: 2250+17 020C CDD700 call print_char - 78: 2267+7 020F 3E20 ld a," " - 79: 2274+17 0211 CDD700 call print_char - 80: 2291+8+5 0214 10F4 djnz disassemble_print_opcode_raw_fill - 81: 2299+7 0216 3E20 ld a," " - 82: 2306+17 0218 CDD700 call print_char + 75: - 029C disassemble_print_opcode_raw_fill: + 76: 3014+7 029C 3E20 ld a," " + 77: 3021+17 029E CDDE00 call print_char + 78: 3038+7 02A1 3E20 ld a," " + 79: 3045+17 02A3 CDDE00 call print_char + 80: 3062+8+5 02A6 10F4 djnz disassemble_print_opcode_raw_fill + 81: 3070+7 02A8 3E20 ld a," " + 82: 3077+17 02AA CDDE00 call print_char 83: - 84: 2323+11 021B E5 push hl + 84: 3094+11 02AD E5 push hl 85: ;print opcode - 86: 2334+16 021C 2A1741 ld hl,(var_opcode_string) - 87: 2350+17 021F CDDF00 call print_str + 86: 3105+16 02AE 2A1741 ld hl,(var_opcode_string) + 87: 3121+17 02B1 CDE600 call print_str 88: 89: 90: ;print params - 91: 2367+13 0222 3A1941 ld a,(var_opcode_pcount) - 92: 2380+4 0225 B7 or a - 93: 2384+10 0226 CA8802 jp z, disassemble_print_opcode_params_end ;skip if no params + 91: 3138+13 02B4 3A1941 ld a,(var_opcode_pcount) + 92: 3151+4 02B7 B7 or a + 93: 3155+10 02B8 CA1A03 jp z, disassemble_print_opcode_params_end ;skip if no params 94: - 95: 2394+16 0229 2A1241 ld hl,(var_opcode_table) - 96: 2410+10 022C 010800 ld bc, 8 - 97: 2420+11 022F 09 add hl,bc ;hl now has address of first param - 98: 2431+13 0230 3A1941 ld a,(var_opcode_pcount) - 99: 2444+4 0233 47 ld b,a - 100: - 0234 disassemble_print_opcode_params_loop: + 95: 3165+16 02BB 2A1241 ld hl,(var_opcode_table) + 96: 3181+10 02BE 010800 ld bc, 8 + 97: 3191+11 02C1 09 add hl,bc ;hl now has address of first param + 98: 3202+13 02C2 3A1941 ld a,(var_opcode_pcount) + 99: 3215+4 02C5 47 ld b,a + 100: - 02C6 disassemble_print_opcode_params_loop: 101: ;ld a,(hl) ;load param 102: ;call print_a_hex - 103: 2448+7 0234 7E ld a,(hl) ;load param + 103: 3219+7 02C6 7E ld a,(hl) ;load param 104: - 105: 2455+7 0235 FE01 cp 0x01 - 106: 2462+10+7 0237 CC1703 call z, param_01 - 107: 2472+7 023A FE02 cp 0x02 - 108: 2479+10+7 023C CC3E03 call z, param_02 - 109: 2489+7 023F FE03 cp 0x03 - 110: 2496+10+7 0241 CC5B03 call z, param_03 - 111: 2506+7 0244 FE04 cp 0x04 - 112: 2513+10+7 0246 CC9703 call z, param_04 - 113: 2523+7 0249 FE05 cp 0x05 - 114: 2530+10+7 024B CCAD03 call z, param_05 - 115: 2540+7 024E FE06 cp 0x06 - 116: 2547+10+7 0250 CCBA03 call z, param_06 - 117: 2557+7 0253 FE07 cp 0x07 - 118: 2564+10+7 0255 CCD403 call z, param_07 - 119: 2574+7 0258 FE08 cp 0x08 - 120: 2581+10+7 025A CCE103 call z, param_08 - 121: 2591+7 025D FE09 cp 0x09 - 122: 2598+10+7 025F CCF603 call z, param_09 - 123: 2608+7 0262 FE10 cp 0x10 - 124: 2615+10+7 0264 CC0B04 call z, param_10 - 125: 2625+7 0267 FE11 cp 0x11 - 126: 2632+10+7 0269 CC1B04 call z, param_11 - 127: 2642+7 026C FE12 cp 0x12 - 128: 2649+10+7 026E CC2304 call z, param_12 - 129: 2659+7 0271 FE13 cp 0x13 - 130: 2666+10+7 0273 CC5B04 call z, param_13 - 131: 2676+7 0276 FE0A cp 0x0A - 132: 2683+10+7 0278 CCED03 call z, param_0A + 105: 3226+7 02C7 FE01 cp 0x01 + 106: 3233+10+7 02C9 CCA903 call z, param_01 + 107: 3243+7 02CC FE02 cp 0x02 + 108: 3250+10+7 02CE CCD003 call z, param_02 + 109: 3260+7 02D1 FE03 cp 0x03 + 110: 3267+10+7 02D3 CCED03 call z, param_03 + 111: 3277+7 02D6 FE04 cp 0x04 + 112: 3284+10+7 02D8 CC2904 call z, param_04 + 113: 3294+7 02DB FE05 cp 0x05 + 114: 3301+10+7 02DD CC3F04 call z, param_05 + 115: 3311+7 02E0 FE06 cp 0x06 + 116: 3318+10+7 02E2 CC4C04 call z, param_06 + 117: 3328+7 02E5 FE07 cp 0x07 + 118: 3335+10+7 02E7 CC6604 call z, param_07 + 119: 3345+7 02EA FE08 cp 0x08 + 120: 3352+10+7 02EC CC7304 call z, param_08 + 121: 3362+7 02EF FE09 cp 0x09 + 122: 3369+10+7 02F1 CC8804 call z, param_09 + 123: 3379+7 02F4 FE10 cp 0x10 + 124: 3386+10+7 02F6 CC9D04 call z, param_10 + 125: 3396+7 02F9 FE11 cp 0x11 + 126: 3403+10+7 02FB CCAD04 call z, param_11 + 127: 3413+7 02FE FE12 cp 0x12 + 128: 3420+10+7 0300 CCB504 call z, param_12 + 129: 3430+7 0303 FE13 cp 0x13 + 130: 3437+10+7 0305 CCED04 call z, param_13 + 131: 3447+7 0308 FE0A cp 0x0A + 132: 3454+10+7 030A CC7F04 call z, param_0A 133: ;strings - 134: 2693+7 027B FE80 cp 0x80 - 135: 2700+10+7 027D CC7A04 call z, param_80 - 136: 2710+7 0280 FE81 cp 0x81 - 137: 2717+10+7 0282 CC7104 call z, param_81 - 138: 2727+6 0285 23 inc hl - 139: 2733+8+5 0286 10AC djnz disassemble_print_opcode_params_loop - 140: - 0288 disassemble_print_opcode_params_end: - 141: 2741+10 0288 E1 pop hl - 142: 2751+12 0289 1810 jr disassemble_continue + 134: 3464+7 030D FE80 cp 0x80 + 135: 3471+10+7 030F CC0C05 call z, param_80 + 136: 3481+7 0312 FE81 cp 0x81 + 137: 3488+10+7 0314 CC0305 call z, param_81 + 138: 3498+6 0317 23 inc hl + 139: 3504+8+5 0318 10AC djnz disassemble_print_opcode_params_loop + 140: - 031A disassemble_print_opcode_params_end: + 141: 3512+10 031A E1 pop hl + 142: 3522+12 031B 1810 jr disassemble_continue 143: 144: - 145: - 028B disassemble_err: - 146: 2763+17 028B CDF102 call dasm_print16hex_addr - 147: 2780+7 028E 7E ld a,(hl) - 148: 2787+17 028F CD0903 call dasm_print8hex ;print value - 149: 2804+6 0292 23 inc hl - 150: 2810+11 0293 E5 push hl - 151: 2821+10 0294 21C60C ld hl, [dasm_UU] - 152: 2831+17 0297 CDDF00 call print_str - 153: 2848+10 029A E1 pop hl + 145: - 031D disassemble_err: + 146: 3534+17 031D CD8303 call dasm_print16hex_addr + 147: 3551+7 0320 7E ld a,(hl) + 148: 3558+17 0321 CD9B03 call dasm_print8hex ;print value + 149: 3575+6 0324 23 inc hl + 150: 3581+11 0325 E5 push hl + 151: 3592+10 0326 21580D ld hl, [dasm_UU] + 152: 3602+17 0329 CDE600 call print_str + 153: 3619+10 032C E1 pop hl 154: - 155: - 029B disassemble_continue: + 155: - 032D disassemble_continue: 156: - 157: 2858+17 029B CDF100 call print_newLine + 157: 3629+17 032D CDF800 call print_newLine 158: ;inc hl - 159: 2875+13 029E 3A1A41 ld a,(var_bytes_count) - 160: 2888+4 02A1 3D dec a - 161: 2892+13 02A2 321A41 ld (var_bytes_count),a - 162: 2905+10 02A5 C2B901 jp nz, disassemble_next - 163: 2915+10 02A8 C9 ret + 159: 3646+13 0330 3A1A41 ld a,(var_bytes_count) + 160: 3659+4 0333 3D dec a + 161: 3663+13 0334 321A41 ld (var_bytes_count),a + 162: 3676+10 0337 C24B02 jp nz, disassemble_next + 163: 3686+10 033A C9 ret 164: 165: 166: 167: ;A contains opcode 168: ;BC contains returned position - 169: - 02A9 disassemble_table_seek: - 170: 2925+11 02A9 E5 push hl - 171: 2936+10 02AA 21C404 ld hl, [dasm_opcode_table] - 172: - 02AD disassemble_table_seek_loop: - 173: 2946+13 02AD 3A1441 ld a,(var_opcode) - 174: 2959+4 02B0 4F ld c,a - 175: 2963+7 02B1 7E ld a,(hl) - 176: 2970+7 02B2 FEFF cp 0xFF ; if null - 177: 2977+10 02B4 CAEB02 jp z, disassemble_table_notfound + 169: - 033B disassemble_table_seek: + 170: 3696+11 033B E5 push hl + 171: 3707+10 033C 215605 ld hl, [dasm_opcode_table] + 172: - 033F disassemble_table_seek_loop: + 173: 3717+13 033F 3A1441 ld a,(var_opcode) + 174: 3730+4 0342 4F ld c,a + 175: 3734+7 0343 7E ld a,(hl) + 176: 3741+7 0344 FEFF cp 0xFF ; if null + 177: 3748+10 0346 CA7D03 jp z, disassemble_table_notfound 178: 179: ;apply mask - 180: 2987+11 02B7 F5 push af - 181: 2998+6 02B8 23 inc hl - 182: 3004+7 02B9 46 ld b,(hl) ;load mask - 183: 3011+6 02BA 2B dec hl - 184: 3017+4 02BB 79 ld a,c - 185: 3021+4 02BC A0 and b ;apply mask - 186: 3025+4 02BD 4F ld c,a - 187: 3029+10 02BE F1 pop af + 180: 3758+11 0349 F5 push af + 181: 3769+6 034A 23 inc hl + 182: 3775+7 034B 46 ld b,(hl) ;load mask + 183: 3782+6 034C 2B dec hl + 184: 3788+4 034D 79 ld a,c + 185: 3792+4 034E A0 and b ;apply mask + 186: 3796+4 034F 4F ld c,a + 187: 3800+10 0350 F1 pop af 188: - 189: 3039+4 02BF B9 cp c ; if match - 190: 3043+7+5 02C0 280B jr z, disassemble_table_first_match - 191: 3050+7 02C2 0600 ld b,0 - 192: 3057+7 02C4 0E07 ld c,7 - 193: 3064+11 02C6 09 add hl,bc - 194: 3075+7 02C7 7E ld a,(hl) - 195: 3082+4 02C8 4F ld c,a - 196: 3086+11 02C9 09 add hl,bc - 197: 3097+6 02CA 23 inc hl - 198: 3103+12 02CB 18E0 jr disassemble_table_seek_loop + 189: 3810+4 0351 B9 cp c ; if match + 190: 3814+7+5 0352 280B jr z, disassemble_table_first_match + 191: 3821+7 0354 0600 ld b,0 + 192: 3828+7 0356 0E07 ld c,7 + 193: 3835+11 0358 09 add hl,bc + 194: 3846+7 0359 7E ld a,(hl) + 195: 3853+4 035A 4F ld c,a + 196: 3857+11 035B 09 add hl,bc + 197: 3868+6 035C 23 inc hl + 198: 3874+12 035D 18E0 jr disassemble_table_seek_loop 199: - 200: - 02CD disassemble_table_first_match - 201: 3115+6 02CD 23 inc hl - 202: 3121+6 02CE 23 inc hl - 203: 3127+7 02CF 4E ld c,(hl) ;load opcode x from table - 204: 3134+6 02D0 23 inc hl - 205: 3140+13 02D1 3A1541 ld a,(var_opcode_x) ;load current opcode x - 206: 3153+7 02D4 46 ld b,(hl) ;load mask - 207: 3160+4 02D5 A0 and b ;apply mask - 208: 3164+4 02D6 B9 cp c ;compare to table - 209: 3168+6 02D7 2B dec hl - 210: 3174+6 02D8 2B dec hl - 211: 3180+6 02D9 2B dec hl - 212: 3186+7+5 02DA 280B jr z, disassemble_table_found ;IF FOUND - 213: 3193+7 02DC 0600 ld b,0 ;else continue with next + 200: - 035F disassemble_table_first_match + 201: 3886+6 035F 23 inc hl + 202: 3892+6 0360 23 inc hl + 203: 3898+7 0361 4E ld c,(hl) ;load opcode x from table + 204: 3905+6 0362 23 inc hl + 205: 3911+13 0363 3A1541 ld a,(var_opcode_x) ;load current opcode x + 206: 3924+7 0366 46 ld b,(hl) ;load mask + 207: 3931+4 0367 A0 and b ;apply mask + 208: 3935+4 0368 B9 cp c ;compare to table + 209: 3939+6 0369 2B dec hl + 210: 3945+6 036A 2B dec hl + 211: 3951+6 036B 2B dec hl + 212: 3957+7+5 036C 280B jr z, disassemble_table_found ;IF FOUND + 213: 3964+7 036E 0600 ld b,0 ;else continue with next 214: - 215: 3200+7 02DE 0E07 ld c,7 - 216: 3207+11 02E0 09 add hl,bc - 217: 3218+7 02E1 7E ld a,(hl) - 218: 3225+4 02E2 4F ld c,a - 219: 3229+11 02E3 09 add hl,bc - 220: 3240+6 02E4 23 inc hl - 221: 3246+12 02E5 18C6 jr disassemble_table_seek_loop + 215: 3971+7 0370 0E07 ld c,7 + 216: 3978+11 0372 09 add hl,bc + 217: 3989+7 0373 7E ld a,(hl) + 218: 3996+4 0374 4F ld c,a + 219: 4000+11 0375 09 add hl,bc + 220: 4011+6 0376 23 inc hl + 221: 4017+12 0377 18C6 jr disassemble_table_seek_loop 222: - 223: - 02E7 disassemble_table_found - 224: 3258+4 02E7 44 ld b,H - 225: 3262+4 02E8 4D ld c,l - 226: 3266+10 02E9 E1 pop hl - 227: 3276+10 02EA C9 ret + 223: - 0379 disassemble_table_found + 224: 4029+4 0379 44 ld b,H + 225: 4033+4 037A 4D ld c,l + 226: 4037+10 037B E1 pop hl + 227: 4047+10 037C C9 ret 228: - 229: - 02EB disassemble_table_notfound - 230: 3286+7 02EB 0600 ld b,0 - 231: 3293+7 02ED 0E00 ld c,0 - 232: 3300+10 02EF E1 pop hl - 233: 3310+10 02F0 C9 ret + 229: - 037D disassemble_table_notfound + 230: 4057+7 037D 0600 ld b,0 + 231: 4064+7 037F 0E00 ld c,0 + 232: 4071+10 0381 E1 pop hl + 233: 4081+10 0382 C9 ret 234: 235: 236: 237: - 238: - 02F1 dasm_print16hex_addr: - 239: 3320+7 02F1 3E24 ld a,"$" - 240: 3327+17 02F3 CDD700 call print_char - 241: 3344+4 02F6 7C ld a,h - 242: 3348+17 02F7 CD0701 call print_a_hex - 243: 3365+4 02FA 7D ld a,l - 244: 3369+17 02FB CD0701 call print_a_hex - 245: 3386+7 02FE 3E68 ld a,"h" - 246: 3393+17 0300 CDD700 call print_char - 247: 3410+7 0303 3E20 ld a," " - 248: 3417+17 0305 CDD700 call print_char - 249: 3434+10 0308 C9 ret + 238: - 0383 dasm_print16hex_addr: + 239: 4091+7 0383 3E24 ld a,"$" + 240: 4098+17 0385 CDDE00 call print_char + 241: 4115+4 0388 7C ld a,h + 242: 4119+17 0389 CD0E01 call print_a_hex + 243: 4136+4 038C 7D ld a,l + 244: 4140+17 038D CD0E01 call print_a_hex + 245: 4157+7 0390 3E68 ld a,"h" + 246: 4164+17 0392 CDDE00 call print_char + 247: 4181+7 0395 3E20 ld a," " + 248: 4188+17 0397 CDDE00 call print_char + 249: 4205+10 039A C9 ret 250: - 251: - 0309 dasm_print8hex: - 252: 3444+17 0309 CD0701 call print_a_hex - 253: 3461+7 030C 3E68 ld a,"h" - 254: 3468+17 030E CDD700 call print_char - 255: 3485+7 0311 3E20 ld a," " - 256: 3492+17 0313 CDD700 call print_char - 257: 3509+10 0316 C9 ret + 251: - 039B dasm_print8hex: + 252: 4215+17 039B CD0E01 call print_a_hex + 253: 4232+7 039E 3E68 ld a,"h" + 254: 4239+17 03A0 CDDE00 call print_char + 255: 4256+7 03A3 3E20 ld a," " + 256: 4263+17 03A5 CDDE00 call print_char + 257: 4280+10 03A8 C9 ret 258: 259: 260: @@ -732,317 +820,317 @@ 262: 263: 264: - 265: - 0317 param_01: ; 0x01 16bit address pointer - 266: 3519+11 0317 E5 push hl - 267: 3530+20 0318 ED5B1041 ld de,(var_opcode_start) - 268: 3550+6 031C 13 inc de - 269: 3556+7 031D 1A ld a,(de) - 270: 3563+4 031E 6F ld l,a - 271: 3567+6 031F 13 inc de - 272: 3573+7 0320 1A ld a,(de) - 273: 3580+4 0321 67 ld h,a + 265: - 03A9 param_01: ; 0x01 16bit address pointer + 266: 4290+11 03A9 E5 push hl + 267: 4301+20 03AA ED5B1041 ld de,(var_opcode_start) + 268: 4321+6 03AE 13 inc de + 269: 4327+7 03AF 1A ld a,(de) + 270: 4334+4 03B0 6F ld l,a + 271: 4338+6 03B1 13 inc de + 272: 4344+7 03B2 1A ld a,(de) + 273: 4351+4 03B3 67 ld h,a 274: - 275: 3584+7 0322 3E24 ld a,"$" - 276: 3591+17 0324 CDD700 call print_char - 277: 3608+4 0327 7C ld a,h - 278: 3612+17 0328 CD0701 call print_a_hex - 279: 3629+4 032B 7D ld a,l - 280: 3633+17 032C CD0701 call print_a_hex - 281: 3650+7 032F 3E68 ld a,"h" - 282: 3657+17 0331 CDD700 call print_char - 283: 3674+7 0334 3E20 ld a," " - 284: 3681+17 0336 CDD700 call print_char - 285: 3698+17 0339 CDB504 call param_comma - 286: 3715+10 033C E1 pop hl - 287: 3725+10 033D C9 ret + 275: 4355+7 03B4 3E24 ld a,"$" + 276: 4362+17 03B6 CDDE00 call print_char + 277: 4379+4 03B9 7C ld a,h + 278: 4383+17 03BA CD0E01 call print_a_hex + 279: 4400+4 03BD 7D ld a,l + 280: 4404+17 03BE CD0E01 call print_a_hex + 281: 4421+7 03C1 3E68 ld a,"h" + 282: 4428+17 03C3 CDDE00 call print_char + 283: 4445+7 03C6 3E20 ld a," " + 284: 4452+17 03C8 CDDE00 call print_char + 285: 4469+17 03CB CD4705 call param_comma + 286: 4486+10 03CE E1 pop hl + 287: 4496+10 03CF C9 ret 288: - 289: - 033E param_02: - 290: 3735+11 033E C5 push bc - 291: 3746+20 033F ED5B1041 ld de,(var_opcode_start) - 292: 3766+7 0343 1A ld a,(de) - 293: 3773+4 0344 1F rra - 294: 3777+4 0345 1F rra - 295: 3781+7 0346 E60E and 0x0E + 289: - 03D0 param_02: + 290: 4506+11 03D0 C5 push bc + 291: 4517+20 03D1 ED5B1041 ld de,(var_opcode_start) + 292: 4537+7 03D5 1A ld a,(de) + 293: 4544+4 03D6 1F rra + 294: 4548+4 03D7 1F rra + 295: 4552+7 03D8 E60E and 0x0E 296: - 297: 3788+11 0348 E5 push hl - 298: 3799+10 0349 21CF0C ld hl, [dasm_printFlags_table] - 299: 3809+7 034C 0600 ld b,0 - 300: 3816+4 034E 4F ld c,a - 301: 3820+11 034F 09 add hl,bc - 302: 3831+17 0350 CDDF00 call print_str - 303: 3848+7 0353 3E20 ld a, " " - 304: 3855+17 0355 CDD700 call print_char - 305: 3872+10 0358 E1 pop hl - 306: 3882+10 0359 C1 pop bc - 307: 3892+10 035A C9 ret + 297: 4559+11 03DA E5 push hl + 298: 4570+10 03DB 21610D ld hl, [dasm_printFlags_table] + 299: 4580+7 03DE 0600 ld b,0 + 300: 4587+4 03E0 4F ld c,a + 301: 4591+11 03E1 09 add hl,bc + 302: 4602+17 03E2 CDE600 call print_str + 303: 4619+7 03E5 3E20 ld a, " " + 304: 4626+17 03E7 CDDE00 call print_char + 305: 4643+10 03EA E1 pop hl + 306: 4653+10 03EB C1 pop bc + 307: 4663+10 03EC C9 ret 308: 309: - 310: - 035B param_03: - 311: 3902+20 035B ED5B1041 ld de,(var_opcode_start) - 312: 3922+6 035F 13 inc de - 313: 3928+7 0360 1A ld a,(de) + 310: - 03ED param_03: + 311: 4673+20 03ED ED5B1041 ld de,(var_opcode_start) + 312: 4693+6 03F1 13 inc de + 313: 4699+7 03F2 1A ld a,(de) 314: - 315: 3935+11 0361 F5 push af - 316: 3946+7 0362 E680 and 0x80 - 317: 3953+10 0364 C27C03 jp nz, param_03_neg - 318: 3963+7 0367 3E24 ld a,"$" - 319: 3970+17 0369 CDD700 call print_char - 320: 3987+7 036C 3E2B ld a,"+" - 321: 3994+17 036E CDD700 call print_char - 322: 4011+10 0371 F1 pop af - 323: 4021+17 0372 CD0701 call print_a_hex - 324: 4038+7 0375 3E68 ld a,"h" - 325: 4045+17 0377 CDD700 call print_char - 326: 4062+12 037A 1817 jr param_03_done + 315: 4706+11 03F3 F5 push af + 316: 4717+7 03F4 E680 and 0x80 + 317: 4724+10 03F6 C20E04 jp nz, param_03_neg + 318: 4734+7 03F9 3E24 ld a,"$" + 319: 4741+17 03FB CDDE00 call print_char + 320: 4758+7 03FE 3E2B ld a,"+" + 321: 4765+17 0400 CDDE00 call print_char + 322: 4782+10 0403 F1 pop af + 323: 4792+17 0404 CD0E01 call print_a_hex + 324: 4809+7 0407 3E68 ld a,"h" + 325: 4816+17 0409 CDDE00 call print_char + 326: 4833+12 040C 1817 jr param_03_done 327: - 328: - 037C param_03_neg: - 329: 4074+7 037C 3E24 ld a,"$" - 330: 4081+17 037E CDD700 call print_char - 331: 4098+7 0381 3E2D ld a,"-" - 332: 4105+17 0383 CDD700 call print_char - 333: 4122+10 0386 F1 pop af - 334: 4132+8 0387 ED44 neg - 335: 4140+17 0389 CD0701 call print_a_hex - 336: 4157+7 038C 3E68 ld a,"h" - 337: 4164+17 038E CDD700 call print_char - 338: 4181+12 0391 1800 jr param_03_done + 328: - 040E param_03_neg: + 329: 4845+7 040E 3E24 ld a,"$" + 330: 4852+17 0410 CDDE00 call print_char + 331: 4869+7 0413 3E2D ld a,"-" + 332: 4876+17 0415 CDDE00 call print_char + 333: 4893+10 0418 F1 pop af + 334: 4903+8 0419 ED44 neg + 335: 4911+17 041B CD0E01 call print_a_hex + 336: 4928+7 041E 3E68 ld a,"h" + 337: 4935+17 0420 CDDE00 call print_char + 338: 4952+12 0423 1800 jr param_03_done 339: - 340: - 0393 param_03_done: - 341: 4193+17 0393 CDB504 call param_comma - 342: 4210+10 0396 C9 ret + 340: - 0425 param_03_done: + 341: 4964+17 0425 CD4705 call param_comma + 342: 4981+10 0428 C9 ret 343: 344: - 345: - 0397 param_04: - 346: 4220+20 0397 ED5B1041 ld de,(var_opcode_start) - 347: 4240+6 039B 13 inc de - 348: 4246+7 039C 1A ld a,(de) - 349: 4253+7 039D FE4D cp 0x4D - 350: 4260+7+5 039F 2806 jr z,param_04_i - 351: 4267+7 03A1 3E4E ld a,"N" - 352: 4274+17 03A3 CDD700 call print_char - 353: 4291+10 03A6 C9 ret - 354: - 03A7 param_04_i: - 355: 4301+7 03A7 3E49 ld a,"I" - 356: 4308+17 03A9 CDD700 call print_char - 357: 4325+10 03AC C9 ret + 345: - 0429 param_04: + 346: 4991+20 0429 ED5B1041 ld de,(var_opcode_start) + 347: 5011+6 042D 13 inc de + 348: 5017+7 042E 1A ld a,(de) + 349: 5024+7 042F FE4D cp 0x4D + 350: 5031+7+5 0431 2806 jr z,param_04_i + 351: 5038+7 0433 3E4E ld a,"N" + 352: 5045+17 0435 CDDE00 call print_char + 353: 5062+10 0438 C9 ret + 354: - 0439 param_04_i: + 355: 5072+7 0439 3E49 ld a,"I" + 356: 5079+17 043B CDDE00 call print_char + 357: 5096+10 043E C9 ret 358: - 359: - 03AD param_05: - 360: 4335+11 03AD C5 push bc - 361: 4346+20 03AE ED5B1041 ld de,(var_opcode_start) - 362: 4366+7 03B2 1A ld a,(de) - 363: 4373+7 03B3 E638 and 0x38 + 359: - 043F param_05: + 360: 5106+11 043F C5 push bc + 361: 5117+20 0440 ED5B1041 ld de,(var_opcode_start) + 362: 5137+7 0444 1A ld a,(de) + 363: 5144+7 0445 E638 and 0x38 364: ; print hex char - 365: 4380+17 03B5 CD0903 call dasm_print8hex - 366: 4397+10 03B8 C1 pop bc - 367: 4407+10 03B9 C9 ret + 365: 5151+17 0447 CD9B03 call dasm_print8hex + 366: 5168+10 044A C1 pop bc + 367: 5178+10 044B C9 ret 368: 369: - 370: - 03BA param_06: - 371: 4417+11 03BA C5 push bc - 372: 4428+20 03BB ED5B1041 ld de,(var_opcode_start) - 373: 4448+7 03BF 1A ld a,(de) - 374: 4455+4 03C0 1F rra - 375: 4459+4 03C1 1F rra - 376: 4463+4 03C2 1F rra - 377: 4467+7 03C3 E607 and 0x07 - 378: 4474+17 03C5 CD9004 call param_printRegister - 379: 4491+7 03C8 3E20 ld a," " - 380: 4498+17 03CA CDD700 call print_char - 381: 4515+7 03CD 3E2C ld a,"," - 382: 4522+17 03CF CDD700 call print_char - 383: 4539+10 03D2 C1 pop bc - 384: 4549+10 03D3 C9 ret + 370: - 044C param_06: + 371: 5188+11 044C C5 push bc + 372: 5199+20 044D ED5B1041 ld de,(var_opcode_start) + 373: 5219+7 0451 1A ld a,(de) + 374: 5226+4 0452 1F rra + 375: 5230+4 0453 1F rra + 376: 5234+4 0454 1F rra + 377: 5238+7 0455 E607 and 0x07 + 378: 5245+17 0457 CD2205 call param_printRegister + 379: 5262+7 045A 3E20 ld a," " + 380: 5269+17 045C CDDE00 call print_char + 381: 5286+7 045F 3E2C ld a,"," + 382: 5293+17 0461 CDDE00 call print_char + 383: 5310+10 0464 C1 pop bc + 384: 5320+10 0465 C9 ret 385: - 386: - 03D4 param_07: - 387: 4559+11 03D4 C5 push bc - 388: 4570+20 03D5 ED5B1041 ld de,(var_opcode_start) - 389: 4590+7 03D9 1A ld a,(de) - 390: 4597+7 03DA E607 and 0x07 + 386: - 0466 param_07: + 387: 5330+11 0466 C5 push bc + 388: 5341+20 0467 ED5B1041 ld de,(var_opcode_start) + 389: 5361+7 046B 1A ld a,(de) + 390: 5368+7 046C E607 and 0x07 391: - 392: 4604+17 03DC CD9004 call param_printRegister - 393: 4621+10 03DF C1 pop bc - 394: 4631+10 03E0 C9 ret + 392: 5375+17 046E CD2205 call param_printRegister + 393: 5392+10 0471 C1 pop bc + 394: 5402+10 0472 C9 ret 395: - 396: - 03E1 param_08: - 397: 4641+11 03E1 C5 push bc - 398: 4652+20 03E2 ED5B1041 ld de,(var_opcode_start) - 399: 4672+6 03E6 13 inc de - 400: 4678+7 03E7 1A ld a,(de) - 401: 4685+17 03E8 CD0903 call dasm_print8hex - 402: 4702+10 03EB C1 pop bc - 403: 4712+10 03EC C9 ret + 396: - 0473 param_08: + 397: 5412+11 0473 C5 push bc + 398: 5423+20 0474 ED5B1041 ld de,(var_opcode_start) + 399: 5443+6 0478 13 inc de + 400: 5449+7 0479 1A ld a,(de) + 401: 5456+17 047A CD9B03 call dasm_print8hex + 402: 5473+10 047D C1 pop bc + 403: 5483+10 047E C9 ret 404: 405: - 406: - 03ED param_0A: - 407: 4722+11 03ED E5 push hl - 408: 4733+20 03EE ED5B1041 ld de,(var_opcode_start) - 409: 4753+6 03F2 13 inc de - 410: 4759+6 03F3 13 inc de - 411: 4765+12 03F4 1806 jr param_09_0A - 412: - 03F6 param_09: - 413: 4777+11 03F6 E5 push hl - 414: 4788+20 03F7 ED5B1041 ld de,(var_opcode_start) - 415: 4808+6 03FB 13 inc de - 416: - 03FC param_09_0A: - 417: 4814+7 03FC 1A ld a,(de) - 418: 4821+4 03FD 6F ld l,a - 419: 4825+6 03FE 13 inc de - 420: 4831+7 03FF 1A ld a,(de) - 421: 4838+4 0400 67 ld h,a - 422: 4842+4 0401 7C ld a,h - 423: 4846+17 0402 CD0701 call print_a_hex - 424: 4863+4 0405 7D ld a,l - 425: 4867+17 0406 CD0701 call print_a_hex - 426: 4884+10 0409 E1 pop hl - 427: 4894+10 040A C9 ret + 406: - 047F param_0A: + 407: 5493+11 047F E5 push hl + 408: 5504+20 0480 ED5B1041 ld de,(var_opcode_start) + 409: 5524+6 0484 13 inc de + 410: 5530+6 0485 13 inc de + 411: 5536+12 0486 1806 jr param_09_0A + 412: - 0488 param_09: + 413: 5548+11 0488 E5 push hl + 414: 5559+20 0489 ED5B1041 ld de,(var_opcode_start) + 415: 5579+6 048D 13 inc de + 416: - 048E param_09_0A: + 417: 5585+7 048E 1A ld a,(de) + 418: 5592+4 048F 6F ld l,a + 419: 5596+6 0490 13 inc de + 420: 5602+7 0491 1A ld a,(de) + 421: 5609+4 0492 67 ld h,a + 422: 5613+4 0493 7C ld a,h + 423: 5617+17 0494 CD0E01 call print_a_hex + 424: 5634+4 0497 7D ld a,l + 425: 5638+17 0498 CD0E01 call print_a_hex + 426: 5655+10 049B E1 pop hl + 427: 5665+10 049C C9 ret 428: - 429: - 040B param_10: - 430: 4904+11 040B C5 push bc - 431: 4915+20 040C ED5B1041 ld de,(var_opcode_start) - 432: 4935+7 0410 1A ld a,(de) - 433: 4942+4 0411 1F rra - 434: 4946+4 0412 1F rra - 435: 4950+4 0413 1F rra - 436: 4954+7 0414 E607 and 0x07 - 437: 4961+17 0416 CD9004 call param_printRegister - 438: 4978+10 0419 C1 pop bc - 439: 4988+10 041A C9 ret + 429: - 049D param_10: + 430: 5675+11 049D C5 push bc + 431: 5686+20 049E ED5B1041 ld de,(var_opcode_start) + 432: 5706+7 04A2 1A ld a,(de) + 433: 5713+4 04A3 1F rra + 434: 5717+4 04A4 1F rra + 435: 5721+4 04A5 1F rra + 436: 5725+7 04A6 E607 and 0x07 + 437: 5732+17 04A8 CD2205 call param_printRegister + 438: 5749+10 04AB C1 pop bc + 439: 5759+10 04AC C9 ret 440: 441: - 442: - 041B param_11: - 443: 4998+11 041B E5 push hl - 444: 5009+11 041C C5 push bc - 445: 5020+20 041D ED5B1041 ld de,(var_opcode_start) - 446: 5040+12 0421 1807 jr param_11_12 - 447: - 0423 param_12: - 448: 5052+11 0423 E5 push hl - 449: 5063+11 0424 C5 push bc - 450: 5074+20 0425 ED5B1041 ld de,(var_opcode_start) - 451: 5094+6 0429 13 inc de + 442: - 04AD param_11: + 443: 5769+11 04AD E5 push hl + 444: 5780+11 04AE C5 push bc + 445: 5791+20 04AF ED5B1041 ld de,(var_opcode_start) + 446: 5811+12 04B3 1807 jr param_11_12 + 447: - 04B5 param_12: + 448: 5823+11 04B5 E5 push hl + 449: 5834+11 04B6 C5 push bc + 450: 5845+20 04B7 ED5B1041 ld de,(var_opcode_start) + 451: 5865+6 04BB 13 inc de 452: - 453: - 042A param_11_12: - 454: 5100+7 042A 1A ld a,(de) - 455: 5107+4 042B 1F rra - 456: 5111+4 042C 1F rra - 457: 5115+4 042D 1F rra - 458: 5119+7 042E E606 and 0x06 - 459: 5126+11 0430 F5 push af + 453: - 04BC param_11_12: + 454: 5871+7 04BC 1A ld a,(de) + 455: 5878+4 04BD 1F rra + 456: 5882+4 04BE 1F rra + 457: 5886+4 04BF 1F rra + 458: 5890+7 04C0 E606 and 0x06 + 459: 5897+11 04C2 F5 push af 460: ;check which table to use - 461: 5137+16 0431 2A1041 ld hl, (var_opcode_start) - 462: 5153+7 0434 7E ld a,(hl) - 463: 5160+7 0435 FEDD cp 0xDD - 464: 5167+7+5 0437 2809 jr z,param_11_12_ix - 465: 5174+7 0439 FEFD cp 0xFD - 466: 5181+7+5 043B 280A jr z,param_11_12_iy - 467: - 043D param_11_12_def: - 468: 5188+10 043D 21DF0C ld hl, [dasm_printRegister8_table] - 469: 5198+12 0440 1808 jr param_11_12_all - 470: - 0442 param_11_12_ix: - 471: 5210+10 0442 21E70C ld hl, [dasm_printRegisterIX_table] - 472: 5220+12 0445 1803 jr param_11_12_all - 473: - 0447 param_11_12_iy: - 474: 5232+10 0447 21EF0C ld hl, [dasm_printRegisterIY_table] - 475: - 044A param_11_12_all: - 476: 5242+10 044A F1 pop af - 477: 5252+7 044B 0600 ld b,0 - 478: 5259+4 044D 4F ld c,a - 479: 5263+11 044E 09 add hl, bc - 480: 5274+7 044F 7E ld a,(hl) - 481: 5281+17 0450 CDD700 call print_char - 482: 5298+6 0453 23 inc hl - 483: 5304+7 0454 7E ld a,(hl) - 484: 5311+17 0455 CDD700 call print_char - 485: 5328+10 0458 C1 pop bc - 486: 5338+10 0459 E1 pop hl - 487: 5348+10 045A C9 ret + 461: 5908+16 04C3 2A1041 ld hl, (var_opcode_start) + 462: 5924+7 04C6 7E ld a,(hl) + 463: 5931+7 04C7 FEDD cp 0xDD + 464: 5938+7+5 04C9 2809 jr z,param_11_12_ix + 465: 5945+7 04CB FEFD cp 0xFD + 466: 5952+7+5 04CD 280A jr z,param_11_12_iy + 467: - 04CF param_11_12_def: + 468: 5959+10 04CF 21710D ld hl, [dasm_printRegister8_table] + 469: 5969+12 04D2 1808 jr param_11_12_all + 470: - 04D4 param_11_12_ix: + 471: 5981+10 04D4 21790D ld hl, [dasm_printRegisterIX_table] + 472: 5991+12 04D7 1803 jr param_11_12_all + 473: - 04D9 param_11_12_iy: + 474: 6003+10 04D9 21810D ld hl, [dasm_printRegisterIY_table] + 475: - 04DC param_11_12_all: + 476: 6013+10 04DC F1 pop af + 477: 6023+7 04DD 0600 ld b,0 + 478: 6030+4 04DF 4F ld c,a + 479: 6034+11 04E0 09 add hl, bc + 480: 6045+7 04E1 7E ld a,(hl) + 481: 6052+17 04E2 CDDE00 call print_char + 482: 6069+6 04E5 23 inc hl + 483: 6075+7 04E6 7E ld a,(hl) + 484: 6082+17 04E7 CDDE00 call print_char + 485: 6099+10 04EA C1 pop bc + 486: 6109+10 04EB E1 pop hl + 487: 6119+10 04EC C9 ret 488: - 489: - 045B param_13: - 490: 5358+11 045B E5 push hl - 491: 5369+11 045C C5 push bc - 492: 5380+20 045D ED5B1041 ld de,(var_opcode_start) - 493: 5400+7 0461 1A ld a,(de) - 494: 5407+4 0462 1F rra - 495: 5411+4 0463 1F rra - 496: 5415+4 0464 1F rra - 497: 5419+7 0465 E606 and 0x06 - 498: 5426+11 0467 F5 push af + 489: - 04ED param_13: + 490: 6129+11 04ED E5 push hl + 491: 6140+11 04EE C5 push bc + 492: 6151+20 04EF ED5B1041 ld de,(var_opcode_start) + 493: 6171+7 04F3 1A ld a,(de) + 494: 6178+4 04F4 1F rra + 495: 6182+4 04F5 1F rra + 496: 6186+4 04F6 1F rra + 497: 6190+7 04F7 E606 and 0x06 + 498: 6197+11 04F9 F5 push af 499: ;check which table to use - 500: 5437+16 0468 2A1041 ld hl, (var_opcode_start) - 501: 5453+7 046B 7E ld a,(hl) - 502: 5460+10 046C 21F70C ld hl, [dasm_printRegisterSP_table] - 503: 5470+12 046F 18D9 jr param_11_12_all ;reuse code from 11_12 + 500: 6208+16 04FA 2A1041 ld hl, (var_opcode_start) + 501: 6224+7 04FD 7E ld a,(hl) + 502: 6231+10 04FE 21890D ld hl, [dasm_printRegisterSP_table] + 503: 6241+12 0501 18D9 jr param_11_12_all ;reuse code from 11_12 504: 505: - 506: - 0471 param_81: - 507: 5482+11 0471 E5 push hl - 508: 5493+11 0472 C5 push bc - 509: 5504+16 0473 2A1741 ld hl, (var_opcode_string) - 510: 5520+7 0476 0602 ld b,2 - 511: 5527+12 0478 1807 jr param_80_seek - 512: - 047A param_80: - 513: 5539+11 047A E5 push hl - 514: 5550+11 047B C5 push bc - 515: 5561+16 047C 2A1741 ld hl, (var_opcode_string) - 516: 5577+7 047F 0601 ld b,1 - 517: - 0481 param_80_seek: - 518: 5584+7 0481 7E ld a,(hl) - 519: 5591+6 0482 23 inc hl - 520: 5597+4 0483 A7 and a - 521: 5601+7+5 0484 20FB jr nz, param_80_seek + 506: - 0503 param_81: + 507: 6253+11 0503 E5 push hl + 508: 6264+11 0504 C5 push bc + 509: 6275+16 0505 2A1741 ld hl, (var_opcode_string) + 510: 6291+7 0508 0602 ld b,2 + 511: 6298+12 050A 1807 jr param_80_seek + 512: - 050C param_80: + 513: 6310+11 050C E5 push hl + 514: 6321+11 050D C5 push bc + 515: 6332+16 050E 2A1741 ld hl, (var_opcode_string) + 516: 6348+7 0511 0601 ld b,1 + 517: - 0513 param_80_seek: + 518: 6355+7 0513 7E ld a,(hl) + 519: 6362+6 0514 23 inc hl + 520: 6368+4 0515 A7 and a + 521: 6372+7+5 0516 20FB jr nz, param_80_seek 522: ;found - 523: 5608+4 0486 05 dec b ;found but counter too high - 524: 5612+10 0487 C28104 jp nz, param_80_seek + 523: 6379+4 0518 05 dec b ;found but counter too high + 524: 6383+10 0519 C21305 jp nz, param_80_seek 525: - 526: 5622+17 048A CDDF00 call print_str - 527: 5639+10 048D C1 pop bc - 528: 5649+10 048E E1 pop hl - 529: 5659+10 048F C9 ret + 526: 6393+17 051C CDE600 call print_str + 527: 6410+10 051F C1 pop bc + 528: 6420+10 0520 E1 pop hl + 529: 6430+10 0521 C9 ret 530: 531: 532: - 533: - 0490 param_printRegister: - 534: 5669+11 0490 E5 push hl - 535: 5680+7 0491 FE06 cp 0x06 - 536: 5687+7+5 0493 2811 jr z, param_printRegisterHL - 537: 5694+7 0495 FE07 cp 0x07 - 538: 5701+7+5 0497 2815 jr z, param_printRegisterA - 539: 5708+10 0499 21DF0C ld hl, [dasm_printRegister8_table] - 540: 5718+7 049C 0600 ld b,0 - 541: 5725+4 049E 4F ld c,a - 542: 5729+11 049F 09 add hl,bc - 543: 5740+7 04A0 7E ld a, (hl) - 544: 5747+17 04A1 CDD700 call print_char - 545: 5764+10 04A4 E1 pop hl - 546: 5774+10 04A5 C9 ret + 533: - 0522 param_printRegister: + 534: 6440+11 0522 E5 push hl + 535: 6451+7 0523 FE06 cp 0x06 + 536: 6458+7+5 0525 2811 jr z, param_printRegisterHL + 537: 6465+7 0527 FE07 cp 0x07 + 538: 6472+7+5 0529 2815 jr z, param_printRegisterA + 539: 6479+10 052B 21710D ld hl, [dasm_printRegister8_table] + 540: 6489+7 052E 0600 ld b,0 + 541: 6496+4 0530 4F ld c,a + 542: 6500+11 0531 09 add hl,bc + 543: 6511+7 0532 7E ld a, (hl) + 544: 6518+17 0533 CDDE00 call print_char + 545: 6535+10 0536 E1 pop hl + 546: 6545+10 0537 C9 ret 547: - 548: - 04A6 param_printRegisterHL: - 549: 5784+10 04A6 21FF0C ld hl, [dasm_printRegister8_table_HL] - 550: 5794+17 04A9 CDDF00 call print_str - 551: 5811+10 04AC E1 pop hl - 552: 5821+10 04AD C9 ret + 548: - 0538 param_printRegisterHL: + 549: 6555+10 0538 21910D ld hl, [dasm_printRegister8_table_HL] + 550: 6565+17 053B CDE600 call print_str + 551: 6582+10 053E E1 pop hl + 552: 6592+10 053F C9 ret 553: - 554: - 04AE param_printRegisterA: - 555: 5831+7 04AE 3E41 ld a,"A" - 556: 5838+17 04B0 CDD700 call print_char - 557: 5855+10 04B3 E1 pop hl - 558: 5865+10 04B4 C9 ret + 554: - 0540 param_printRegisterA: + 555: 6602+7 0540 3E41 ld a,"A" + 556: 6609+17 0542 CDDE00 call print_char + 557: 6626+10 0545 E1 pop hl + 558: 6636+10 0546 C9 ret 559: 560: - 561: - 04B5 param_comma: - 562: 5875+4 04B5 78 ld a,b - 563: 5879+7 04B6 FE01 cp 1 - 564: 5886+5+6 04B8 C8 ret z - 565: 5891+7 04B9 3E20 ld a," " - 566: 5898+17 04BB CDD700 call print_char - 567: 5915+7 04BE 3E2C ld a,"," - 568: 5922+17 04C0 CDD700 call print_char + 561: - 0547 param_comma: + 562: 6646+4 0547 78 ld a,b + 563: 6650+7 0548 FE01 cp 1 + 564: 6657+5+6 054A C8 ret z + 565: 6662+7 054B 3E20 ld a," " + 566: 6669+17 054D CDDE00 call print_char + 567: 6686+7 0550 3E2C ld a,"," + 568: 6693+17 0552 CDDE00 call print_char **** main.asm **** - 169: 5939+10 04C3 C9 ret - 170: .include "disassembler_table.s" + 173: 6710+10 0555 C9 ret + 174: .include "disassembler_table.s" **** include/disassembler_table.s **** 1: ;disassembler tables 2: - 3: - 04C4 dasm_opcode_table: + 3: - 0556 dasm_opcode_table: 4: ;byte 0 = opcode 5: ;byte 1 = opcode mask 6: ;byte 2 = opcode extended @@ -1067,697 +1155,697 @@ 25: ; 0x13 push/pop register lookup 26: ; 0x80 print string suffix 27: ; 0x81 print string suffix 2 - 28: - 04C4 00FF0000 defb 0x00, 0xFF, 0x00, 0x00, 1, [dasm_00], [dasm_00]>>8,0 ;NOP - 011C0900 + 28: - 0556 00FF0000 defb 0x00, 0xFF, 0x00, 0x00, 1, [dasm_00], [dasm_00]>>8,0 ;NOP + 01AE0900 29: ;General-Purpose Arithmetic and CPU Control Groups - 30: - 04CC 27FF0000 defb 0x27, 0xFF, 0x00, 0x00, 1, [dasm_27], [dasm_27]>>8, 0 ;DAA - 01E70900 - 31: - 04D4 2FFF0000 defb 0x2F, 0xFF, 0x00, 0x00, 1, [dasm_2F], [dasm_2F]>>8, 0 ;CPL - 01EB0900 - 32: - 04DC EDFF44FF defb 0xED, 0xFF, 0x44, 0xFF, 2, [dasm_ED_44], [dasm_ED_44]>>8, 0 ;NEG - 02EF0900 - 33: - 04E4 3FFF0000 defb 0x3f, 0xFF, 0x00, 0x00, 1, [dasm_3F], [dasm_3F]>>8, 0 ;CCF - 01F30900 - 34: - 04EC 37FF0000 defb 0x37, 0xFF, 0x00, 0x00, 1, [dasm_37], [dasm_37]>>8, 0 ;SCF - 01F70900 + 30: - 055E 27FF0000 defb 0x27, 0xFF, 0x00, 0x00, 1, [dasm_27], [dasm_27]>>8, 0 ;DAA + 01790A00 + 31: - 0566 2FFF0000 defb 0x2F, 0xFF, 0x00, 0x00, 1, [dasm_2F], [dasm_2F]>>8, 0 ;CPL + 017D0A00 + 32: - 056E EDFF44FF defb 0xED, 0xFF, 0x44, 0xFF, 2, [dasm_ED_44], [dasm_ED_44]>>8, 0 ;NEG + 02810A00 + 33: - 0576 3FFF0000 defb 0x3f, 0xFF, 0x00, 0x00, 1, [dasm_3F], [dasm_3F]>>8, 0 ;CCF + 01850A00 + 34: - 057E 37FF0000 defb 0x37, 0xFF, 0x00, 0x00, 1, [dasm_37], [dasm_37]>>8, 0 ;SCF + 01890A00 35: ;defb 0x00, 0xFF, 0x00, 0x00, 1, [dasm_00], [dasm_00]>>8,0 ;NOP -> already at top for performance reasons - 36: - 04F4 76FF0000 defb 0x76, 0xFF, 0x00, 0x00, 1, [dasm_76], [dasm_76]>>8, 0 ;HALT - 01FB0900 - 37: - 04FC F3FF0000 defb 0xF3, 0xFF, 0x00, 0x00, 1, [dasm_F3], [dasm_F3]>>8, 0 ;DI - 01000A00 - 38: - 0504 FBFF0000 defb 0xFB, 0xFF, 0x00, 0x00, 1, [dasm_FB], [dasm_FB]>>8, 0 ;EI - 01030A00 - 39: - 050C EDFF46FF defb 0xED, 0xFF, 0x46, 0xFF, 2, [dasm_ED_46], [dasm_ED_46]>>8, 0 ;IM 0 - 02060A00 - 40: - 0514 EDFF56FF defb 0xED, 0xFF, 0x56, 0xFF, 2, [dasm_ED_56], [dasm_ED_56]>>8, 0 ;IM 1 - 020B0A00 - 41: - 051C EDFF5EFF defb 0xED, 0xFF, 0x5E, 0xFF, 2, [dasm_ED_5E], [dasm_ED_5E]>>8, 0 ;IM 2 - 02100A00 + 36: - 0586 76FF0000 defb 0x76, 0xFF, 0x00, 0x00, 1, [dasm_76], [dasm_76]>>8, 0 ;HALT + 018D0A00 + 37: - 058E F3FF0000 defb 0xF3, 0xFF, 0x00, 0x00, 1, [dasm_F3], [dasm_F3]>>8, 0 ;DI + 01920A00 + 38: - 0596 FBFF0000 defb 0xFB, 0xFF, 0x00, 0x00, 1, [dasm_FB], [dasm_FB]>>8, 0 ;EI + 01950A00 + 39: - 059E EDFF46FF defb 0xED, 0xFF, 0x46, 0xFF, 2, [dasm_ED_46], [dasm_ED_46]>>8, 0 ;IM 0 + 02980A00 + 40: - 05A6 EDFF56FF defb 0xED, 0xFF, 0x56, 0xFF, 2, [dasm_ED_56], [dasm_ED_56]>>8, 0 ;IM 1 + 029D0A00 + 41: - 05AE EDFF5EFF defb 0xED, 0xFF, 0x5E, 0xFF, 2, [dasm_ED_5E], [dasm_ED_5E]>>8, 0 ;IM 2 + 02A20A00 42: 43: ;Exchange, Block Transfer, and Search Group - 44: - 0524 EBFF0000 defb 0xEB, 0xFF, 0x00, 0x00, 1, [dasm_BE], [dasm_BE]>>8, 0 ;EX DE, HL - 01150A00 - 45: - 052C 08FF0000 defb 0x08, 0xFF, 0x00, 0x00, 1, [dasm_08], [dasm_08]>>8, 0 ;EX AF, AF′ - 011F0A00 - 46: - 0534 D9FF0000 defb 0xD9, 0xFF, 0x00, 0x00, 1, [dasm_D9], [dasm_D9]>>8, 0 ;EXX - 012C0A00 - 47: - 053C E3FF0000 defb 0xE3, 0xFF, 0x00, 0x00, 1, [dasm_E3], [dasm_E3]>>8, 0 ;EX (SP), HL - 01300A00 - 48: - 0544 DDFFE3FF defb 0xDD, 0xFF, 0xE3, 0xFF, 2, [dasm_DD_E3], [dasm_DD_E3]>>8, 0 ;EX (SP), IX - 023C0A00 - 49: - 054C FDFFE3FF defb 0xFD, 0xFF, 0xE3, 0xFF, 2, [dasm_FD_E3], [dasm_FD_E3]>>8, 0 ;EX (SP), IY - 02480A00 - 50: - 0554 EDFFA0FF defb 0xED, 0xFF, 0xA0, 0xFF, 2, [dasm_ED_A0], [dasm_ED_A0]>>8, 0 ;LDI - 02540A00 - 51: - 055C EDFFB0FF defb 0xED, 0xFF, 0xB0, 0xFF, 2, [dasm_ED_B0], [dasm_ED_B0]>>8, 0 ;LDIR - 02580A00 - 52: - 0564 EDFFA8FF defb 0xED, 0xFF, 0xA8, 0xFF, 2, [dasm_ED_A8], [dasm_ED_A8]>>8, 0 ;LDD - 025D0A00 - 53: - 056C EDFFB8FF defb 0xED, 0xFF, 0xB8, 0xFF, 2, [dasm_ED_B8], [dasm_ED_B8]>>8, 0 ;LDDR - 02610A00 - 54: - 0574 EDFFA1FF defb 0xED, 0xFF, 0xA1, 0xFF, 2, [dasm_ED_A1], [dasm_ED_A1]>>8, 0 ;CPI - 02660A00 - 55: - 057C EDFFB1FF defb 0xED, 0xFF, 0xB1, 0xFF, 2, [dasm_ED_B1], [dasm_ED_B1]>>8, 0 ;CPIR - 026A0A00 - 56: - 0584 EDFFA9FF defb 0xED, 0xFF, 0xA9, 0xFF, 2, [dasm_ED_A9], [dasm_ED_A9]>>8, 0 ;CPD - 026F0A00 - 57: - 058C EDFFB9FF defb 0xED, 0xFF, 0xB9, 0xFF, 2, [dasm_ED_B9], [dasm_ED_B9]>>8, 0 ;CPDR - 02730A00 + 44: - 05B6 EBFF0000 defb 0xEB, 0xFF, 0x00, 0x00, 1, [dasm_BE], [dasm_BE]>>8, 0 ;EX DE, HL + 01A70A00 + 45: - 05BE 08FF0000 defb 0x08, 0xFF, 0x00, 0x00, 1, [dasm_08], [dasm_08]>>8, 0 ;EX AF, AF′ + 01B10A00 + 46: - 05C6 D9FF0000 defb 0xD9, 0xFF, 0x00, 0x00, 1, [dasm_D9], [dasm_D9]>>8, 0 ;EXX + 01BE0A00 + 47: - 05CE E3FF0000 defb 0xE3, 0xFF, 0x00, 0x00, 1, [dasm_E3], [dasm_E3]>>8, 0 ;EX (SP), HL + 01C20A00 + 48: - 05D6 DDFFE3FF defb 0xDD, 0xFF, 0xE3, 0xFF, 2, [dasm_DD_E3], [dasm_DD_E3]>>8, 0 ;EX (SP), IX + 02CE0A00 + 49: - 05DE FDFFE3FF defb 0xFD, 0xFF, 0xE3, 0xFF, 2, [dasm_FD_E3], [dasm_FD_E3]>>8, 0 ;EX (SP), IY + 02DA0A00 + 50: - 05E6 EDFFA0FF defb 0xED, 0xFF, 0xA0, 0xFF, 2, [dasm_ED_A0], [dasm_ED_A0]>>8, 0 ;LDI + 02E60A00 + 51: - 05EE EDFFB0FF defb 0xED, 0xFF, 0xB0, 0xFF, 2, [dasm_ED_B0], [dasm_ED_B0]>>8, 0 ;LDIR + 02EA0A00 + 52: - 05F6 EDFFA8FF defb 0xED, 0xFF, 0xA8, 0xFF, 2, [dasm_ED_A8], [dasm_ED_A8]>>8, 0 ;LDD + 02EF0A00 + 53: - 05FE EDFFB8FF defb 0xED, 0xFF, 0xB8, 0xFF, 2, [dasm_ED_B8], [dasm_ED_B8]>>8, 0 ;LDDR + 02F30A00 + 54: - 0606 EDFFA1FF defb 0xED, 0xFF, 0xA1, 0xFF, 2, [dasm_ED_A1], [dasm_ED_A1]>>8, 0 ;CPI + 02F80A00 + 55: - 060E EDFFB1FF defb 0xED, 0xFF, 0xB1, 0xFF, 2, [dasm_ED_B1], [dasm_ED_B1]>>8, 0 ;CPIR + 02FC0A00 + 56: - 0616 EDFFA9FF defb 0xED, 0xFF, 0xA9, 0xFF, 2, [dasm_ED_A9], [dasm_ED_A9]>>8, 0 ;CPD + 02010B00 + 57: - 061E EDFFB9FF defb 0xED, 0xFF, 0xB9, 0xFF, 2, [dasm_ED_B9], [dasm_ED_B9]>>8, 0 ;CPDR + 02050B00 58: 59: ;JUMP Group - 60: - 0594 C3FF0000 defb 0xC3, 0xFF, 0x00, 0x00, 3, [dasm_C3], [dasm_C3]>>8,1, 0x01 ;JP nn - 03200901 + 60: - 0626 C3FF0000 defb 0xC3, 0xFF, 0x00, 0x00, 3, [dasm_C3], [dasm_C3]>>8,1, 0x01 ;JP nn + 03B20901 01 - 61: - 059D C2C70000 defb 0xC2, 0xC7, 0x00, 0x00, 3, [dasm_C3], [dasm_C3]>>8,3, 0x02, 0x80, 0x01 ;JP cc,nn - 03200903 + 61: - 062F C2C70000 defb 0xC2, 0xC7, 0x00, 0x00, 3, [dasm_C3], [dasm_C3]>>8,3, 0x02, 0x80, 0x01 ;JP cc,nn + 03B20903 028001 - 62: - 05A8 18FF0000 defb 0x18, 0xFF, 0x00, 0x00, 2, [dasm_18], [dasm_18]>>8,1, 0x03 ;JR e - 02270901 + 62: - 063A 18FF0000 defb 0x18, 0xFF, 0x00, 0x00, 2, [dasm_18], [dasm_18]>>8,1, 0x03 ;JR e + 02B90901 03 - 63: - 05B1 38FF0000 defb 0x38, 0xFF, 0x00, 0x00, 2, [dasm_38], [dasm_38]>>8,1, 0x03 ;JR C,e - 022B0901 + 63: - 0643 38FF0000 defb 0x38, 0xFF, 0x00, 0x00, 2, [dasm_38], [dasm_38]>>8,1, 0x03 ;JR C,e + 02BD0901 03 - 64: - 05BA 30FF0000 defb 0x30, 0xFF, 0x00, 0x00, 2, [dasm_30], [dasm_30]>>8,1, 0x03 ;JR NC,e - 02320901 + 64: - 064C 30FF0000 defb 0x30, 0xFF, 0x00, 0x00, 2, [dasm_30], [dasm_30]>>8,1, 0x03 ;JR NC,e + 02C40901 03 - 65: - 05C3 28FF0000 defb 0x28, 0xFF, 0x00, 0x00, 2, [dasm_28], [dasm_28]>>8,1, 0x03 ;JR Z,e - 023A0901 + 65: - 0655 28FF0000 defb 0x28, 0xFF, 0x00, 0x00, 2, [dasm_28], [dasm_28]>>8,1, 0x03 ;JR Z,e + 02CC0901 03 - 66: - 05CC 20FF0000 defb 0x20, 0xFF, 0x00, 0x00, 2, [dasm_20], [dasm_20]>>8,1, 0x03 ;JR NZ,e - 02410901 + 66: - 065E 20FF0000 defb 0x20, 0xFF, 0x00, 0x00, 2, [dasm_20], [dasm_20]>>8,1, 0x03 ;JR NZ,e + 02D30901 03 - 67: - 05D5 E9FF0000 defb 0xE9, 0xFF, 0x00, 0x00, 2, [dasm_E9], [dasm_E9]>>8,0 ;JP (HL) - 02490900 - 68: - 05DD DDFFE9FF defb 0xDD, 0xFF, 0xE9, 0xFF, 2, [dasm_DD], [dasm_DD]>>8,0 ;JP (IX) - 02520900 - 69: - 05E5 FDFFE9FF defb 0xFD, 0xFF, 0xE9, 0xFF, 2, [dasm_FD], [dasm_FD]>>8,0 ;JP (IY) - 025B0900 - 70: - 05ED 10FF0000 defb 0x10, 0xFF, 0x00, 0x00, 2, [dasm_10], [dasm_10]>>8,1, 0x03 ;DJNZ, e - 02640901 + 67: - 0667 E9FF0000 defb 0xE9, 0xFF, 0x00, 0x00, 2, [dasm_E9], [dasm_E9]>>8,0 ;JP (HL) + 02DB0900 + 68: - 066F DDFFE9FF defb 0xDD, 0xFF, 0xE9, 0xFF, 2, [dasm_DD], [dasm_DD]>>8,0 ;JP (IX) + 02E40900 + 69: - 0677 FDFFE9FF defb 0xFD, 0xFF, 0xE9, 0xFF, 2, [dasm_FD], [dasm_FD]>>8,0 ;JP (IY) + 02ED0900 + 70: - 067F 10FF0000 defb 0x10, 0xFF, 0x00, 0x00, 2, [dasm_10], [dasm_10]>>8,1, 0x03 ;DJNZ, e + 02F60901 03 71: ;Call and Return Group - 72: - 05F6 CDFF0000 defb 0xCD, 0xFF, 0x00, 0x00, 3, [dasm_CD], [dasm_CD]>>8,1, 0x01 ;CALL nn - 036A0901 + 72: - 0688 CDFF0000 defb 0xCD, 0xFF, 0x00, 0x00, 3, [dasm_CD], [dasm_CD]>>8,1, 0x01 ;CALL nn + 03FC0901 01 - 73: - 05FF C4C70000 defb 0xC4, 0xC7, 0x00, 0x00, 3, [dasm_CD], [dasm_CD]>>8,2, 0x02, 0x01 ;CALL cc,nn - 036A0902 + 73: - 0691 C4C70000 defb 0xC4, 0xC7, 0x00, 0x00, 3, [dasm_CD], [dasm_CD]>>8,2, 0x02, 0x01 ;CALL cc,nn + 03FC0902 0201 - 74: - 0609 C9FF0000 defb 0xC9, 0xFF, 0x00, 0x00, 1, [dasm_C9], [dasm_C9]>>8,0 ;RET - 01700900 - 75: - 0611 C0C70000 defb 0xC0, 0xC7, 0x00, 0x00, 1, [dasm_C9], [dasm_C9]>>8,1, 0x02 ;RET cc - 01700901 + 74: - 069B C9FF0000 defb 0xC9, 0xFF, 0x00, 0x00, 1, [dasm_C9], [dasm_C9]>>8,0 ;RET + 01020A00 + 75: - 06A3 C0C70000 defb 0xC0, 0xC7, 0x00, 0x00, 1, [dasm_C9], [dasm_C9]>>8,1, 0x02 ;RET cc + 01020A01 02 - 76: - 061A EDFF4DFF defb 0xED, 0xFF, 0x4D, 0xFF, 2, [dasm_ED_4D], [dasm_ED_4D]>>8,0 ;RETI - 02750900 - 77: - 0622 EDFF45FF defb 0xED, 0xFF, 0x45, 0xFF, 2, [dasm_ED_45], [dasm_ED_45]>>8,0 ;RETN - 027A0900 + 76: - 06AC EDFF4DFF defb 0xED, 0xFF, 0x4D, 0xFF, 2, [dasm_ED_4D], [dasm_ED_4D]>>8,0 ;RETI + 02070A00 + 77: - 06B4 EDFF45FF defb 0xED, 0xFF, 0x45, 0xFF, 2, [dasm_ED_45], [dasm_ED_45]>>8,0 ;RETN + 020C0A00 78: - 79: - 062A C7C70000 defb 0xC7, 0xC7, 0x00, 0x00, 1, [dasm_FF], [dasm_FF]>>8,1, 0x05 ;RST - 017F0901 + 79: - 06BC C7C70000 defb 0xC7, 0xC7, 0x00, 0x00, 1, [dasm_FF], [dasm_FF]>>8,1, 0x05 ;RST + 01110A01 05 80: ;8-Bit load group - 81: - 0633 0AFF0000 defb 0x0A, 0xFF, 0x00, 0x00, 1, [dasm_0A], [dasm_0A]>>8, 0 ;LD A, (BC) - 01840900 - 82: - 063B 1AFF0000 defb 0x1A, 0xFF, 0x00, 0x00, 1, [dasm_1A], [dasm_1A]>>8, 0 ;LD A, (DE) - 018E0900 - 83: - 0643 3AFF0000 defb 0x3A, 0xFF, 0x00, 0x00, 3, [dasm_3A], [dasm_3A]>>8, 2, 0x09, 0x80 ;LD A, (nn) - 03980902 + 81: - 06C5 0AFF0000 defb 0x0A, 0xFF, 0x00, 0x00, 1, [dasm_0A], [dasm_0A]>>8, 0 ;LD A, (BC) + 01160A00 + 82: - 06CD 1AFF0000 defb 0x1A, 0xFF, 0x00, 0x00, 1, [dasm_1A], [dasm_1A]>>8, 0 ;LD A, (DE) + 01200A00 + 83: - 06D5 3AFF0000 defb 0x3A, 0xFF, 0x00, 0x00, 3, [dasm_3A], [dasm_3A]>>8, 2, 0x09, 0x80 ;LD A, (nn) + 032A0A02 0980 - 84: - 064D 02FF0000 defb 0x02, 0xFF, 0x00, 0x00, 1, [dasm_02], [dasm_02]>>8, 0 ;LD (BC), A - 01A20900 - 85: - 0655 12FF0000 defb 0x12, 0xFF, 0x00, 0x00, 1, [dasm_12], [dasm_12]>>8, 0 ;LD (DE), A - 01AD0900 - 86: - 065D 32FF0000 defb 0x32, 0xFF, 0x00, 0x00, 3, [dasm_32], [dasm_32]>>8, 2, 0x09, 0x80 ;LD (nn), A - 03B80902 + 84: - 06DF 02FF0000 defb 0x02, 0xFF, 0x00, 0x00, 1, [dasm_02], [dasm_02]>>8, 0 ;LD (BC), A + 01340A00 + 85: - 06E7 12FF0000 defb 0x12, 0xFF, 0x00, 0x00, 1, [dasm_12], [dasm_12]>>8, 0 ;LD (DE), A + 013F0A00 + 86: - 06EF 32FF0000 defb 0x32, 0xFF, 0x00, 0x00, 3, [dasm_32], [dasm_32]>>8, 2, 0x09, 0x80 ;LD (nn), A + 034A0A02 0980 - 87: - 0667 EDFF57FF defb 0xED, 0xFF, 0x57, 0xFF, 2, [dasm__ED_57], [dasm__ED_57]>>8, 0 ;LD A, I - 02C70900 - 88: - 066F EDFF5FFF defb 0xED, 0xFF, 0x5F, 0xFF, 2, [dasm__ED_5F], [dasm__ED_5F]>>8, 0 ;LD A, R - 02CF0900 - 89: - 0677 EDFF47FF defb 0xED, 0xFF, 0x47, 0xFF, 2, [dasm__ED_47], [dasm__ED_47]>>8, 0 ;LD I, A - 02D70900 - 90: - 067F EDFF4FFF defb 0xED, 0xFF, 0x4F, 0xFF, 2, [dasm__ED_4F], [dasm__ED_4F]>>8, 0 ;LD R, A - 02DF0900 + 87: - 06F9 EDFF57FF defb 0xED, 0xFF, 0x57, 0xFF, 2, [dasm__ED_57], [dasm__ED_57]>>8, 0 ;LD A, I + 02590A00 + 88: - 0701 EDFF5FFF defb 0xED, 0xFF, 0x5F, 0xFF, 2, [dasm__ED_5F], [dasm__ED_5F]>>8, 0 ;LD A, R + 02610A00 + 89: - 0709 EDFF47FF defb 0xED, 0xFF, 0x47, 0xFF, 2, [dasm__ED_47], [dasm__ED_47]>>8, 0 ;LD I, A + 02690A00 + 90: - 0711 EDFF4FFF defb 0xED, 0xFF, 0x4F, 0xFF, 2, [dasm__ED_4F], [dasm__ED_4F]>>8, 0 ;LD R, A + 02710A00 91: - 92: - 0687 06C70000 defb 0x06, 0xC7, 0x00, 0x00, 2, [dasm__LD], [dasm__LD]>>8, 2, 0x06, 0x08 ;LD r, n - 02C30902 + 92: - 0719 06C70000 defb 0x06, 0xC7, 0x00, 0x00, 2, [dasm__LD], [dasm__LD]>>8, 2, 0x06, 0x08 ;LD r, n + 02550A02 0608 - 93: - 0691 40C00000 defb 0x40, 0xC0, 0x00, 0x00, 1, [dasm__LD], [dasm__LD]>>8, 2, 0x06, 0x07 ;LD r, r' / LD r, (HL) / LD (HL), r - 01C30902 + 93: - 0723 40C00000 defb 0x40, 0xC0, 0x00, 0x00, 1, [dasm__LD], [dasm__LD]>>8, 2, 0x06, 0x07 ;LD r, r' / LD r, (HL) / LD (HL), r + 01550A02 0607 94: 95: ;8-Bit Arithmetic Group - 96: - 069B 80F80000 defb 0x80, 0xF8, 0x00, 0x00, 1, [dasm_80C6], [dasm_80C6]>>8, 1, 0x07 ;ADD A, r / ADD A, (HL) - 01780A01 + 96: - 072D 80F80000 defb 0x80, 0xF8, 0x00, 0x00, 1, [dasm_80C6], [dasm_80C6]>>8, 1, 0x07 ;ADD A, r / ADD A, (HL) + 010A0B01 07 - 97: - 06A4 C6FF0000 defb 0xC6, 0xFF, 0x00, 0x00, 2, [dasm_80C6], [dasm_80C6]>>8, 1, 0x08 ;ADD A, n - 02780A01 + 97: - 0736 C6FF0000 defb 0xC6, 0xFF, 0x00, 0x00, 2, [dasm_80C6], [dasm_80C6]>>8, 1, 0x08 ;ADD A, n + 020A0B01 08 - 98: - 06AD DDFF86FF defb 0xDD, 0xFF, 0x86, 0xFF, 3, [dasm_DD_86], [dasm_DD_86]>>8, 2, 0x08, 0x80 ;ADD A, (IX + d) - 03800A02 + 98: - 073F DDFF86FF defb 0xDD, 0xFF, 0x86, 0xFF, 3, [dasm_DD_86], [dasm_DD_86]>>8, 2, 0x08, 0x80 ;ADD A, (IX + d) + 03120B02 0880 - 99: - 06B7 FDFF86FF defb 0xFD, 0xFF, 0x86, 0xFF, 3, [dasm_FD_86], [dasm_FD_86]>>8, 2, 0x08, 0x80 ;ADD A, (IY + d) - 038F0A02 + 99: - 0749 FDFF86FF defb 0xFD, 0xFF, 0x86, 0xFF, 3, [dasm_FD_86], [dasm_FD_86]>>8, 2, 0x08, 0x80 ;ADD A, (IY + d) + 03210B02 0880 - 100: - 06C1 C8F80000 defb 0xC8, 0xF8, 0x00, 0x00, 1, [dasm_C88E], [dasm_C88E]>>8, 1, 0x07 ;ADC A, r / ADC A, (HL) - 019E0A01 + 100: - 0753 C8F80000 defb 0xC8, 0xF8, 0x00, 0x00, 1, [dasm_C88E], [dasm_C88E]>>8, 1, 0x07 ;ADC A, r / ADC A, (HL) + 01300B01 07 - 101: - 06CA 8EF80000 defb 0x8E, 0xF8, 0x00, 0x00, 2, [dasm_C88E], [dasm_C88E]>>8, 1, 0x08 ;ADC A, n - 029E0A01 + 101: - 075C 8EF80000 defb 0x8E, 0xF8, 0x00, 0x00, 2, [dasm_C88E], [dasm_C88E]>>8, 1, 0x08 ;ADC A, n + 02300B01 08 - 102: - 06D3 DDFF8EFF defb 0xDD, 0xFF, 0x8E, 0xFF, 3, [dasm_DD_8E], [dasm_DD_8E]>>8, 2, 0x08, 0x80 ;ADC A, (IX + d) - 03A60A02 + 102: - 0765 DDFF8EFF defb 0xDD, 0xFF, 0x8E, 0xFF, 3, [dasm_DD_8E], [dasm_DD_8E]>>8, 2, 0x08, 0x80 ;ADC A, (IX + d) + 03380B02 0880 - 103: - 06DD FDFF8EFF defb 0xFD, 0xFF, 0x8E, 0xFF, 3, [dasm_FD_8E], [dasm_FD_8E]>>8, 2, 0x08, 0x80 ;ADC A, (IY + d) - 03B50A02 + 103: - 076F FDFF8EFF defb 0xFD, 0xFF, 0x8E, 0xFF, 3, [dasm_FD_8E], [dasm_FD_8E]>>8, 2, 0x08, 0x80 ;ADC A, (IY + d) + 03470B02 0880 - 104: - 06E7 90F80000 defb 0x90, 0xF8, 0x00, 0x00, 1, [dasm__SUB], [dasm__SUB]>>8, 1, 0x07 ;SUB r / SUB A, (HL) - 01C40A01 + 104: - 0779 90F80000 defb 0x90, 0xF8, 0x00, 0x00, 1, [dasm__SUB], [dasm__SUB]>>8, 1, 0x07 ;SUB r / SUB A, (HL) + 01560B01 07 - 105: - 06F0 D6FF0000 defb 0xD6, 0xFF, 0x00, 0x00, 2, [dasm__SUB], [dasm__SUB]>>8, 1, 0x08 ;SUB n - 02C40A01 + 105: - 0782 D6FF0000 defb 0xD6, 0xFF, 0x00, 0x00, 2, [dasm__SUB], [dasm__SUB]>>8, 1, 0x08 ;SUB n + 02560B01 08 - 106: - 06F9 DDFF96FF defb 0xDD, 0xFF, 0x96, 0xFF, 3, [dasm_DD_96], [dasm_DD_96]>>8, 2, 0x08, 0x80 ;SUB (IX + d) - 03C90A02 + 106: - 078B DDFF96FF defb 0xDD, 0xFF, 0x96, 0xFF, 3, [dasm_DD_96], [dasm_DD_96]>>8, 2, 0x08, 0x80 ;SUB (IX + d) + 035B0B02 0880 - 107: - 0703 FDFF96FF defb 0xFD, 0xFF, 0x96, 0xFF, 3, [dasm_FD_96], [dasm_FD_96]>>8, 2, 0x08, 0x80 ;SUB (IY + d) - 03D50A02 + 107: - 0795 FDFF96FF defb 0xFD, 0xFF, 0x96, 0xFF, 3, [dasm_FD_96], [dasm_FD_96]>>8, 2, 0x08, 0x80 ;SUB (IY + d) + 03670B02 0880 - 108: - 070D 94F80000 defb 0x94, 0xF8, 0x00, 0x00, 1, [dasm__SBC], [dasm__SBC]>>8, 1, 0x07 ;SBC A,r / SBC A, (HL) - 01E10A01 - 07 - 109: - 0716 DEFF0000 defb 0xDE, 0xFF, 0x00, 0x00, 2, [dasm__SBC], [dasm__SBC]>>8, 1, 0x08 ;SBC A,n - 02E10A01 - 08 - 110: - 071F DDFF9EFF defb 0xDD, 0xFF, 0x9E, 0xFF, 3, [dasm_DD_9E], [dasm_DD_9E]>>8, 2, 0x08, 0x80 ;SBC A,(IX + d) - 03E90A02 - 0880 - 111: - 0729 FDFF9EFF defb 0xFD, 0xFF, 0x9E, 0xFF, 3, [dasm_FD_9E], [dasm_FD_9E]>>8, 2, 0x08, 0x80 ;SBC A,(IY + d) - 03F70A02 - 0880 - 112: - 0733 A0F80000 defb 0xA0, 0xF8, 0x00, 0x00, 1, [dasm__AND], [dasm__AND]>>8, 1, 0x07 ;AND A,r / AND A, (HL) - 01050B01 - 07 - 113: - 073C E6FF0000 defb 0xE6, 0xFF, 0x00, 0x00, 2, [dasm__AND], [dasm__AND]>>8, 1, 0x08 ;AND A,n - 02050B01 - 08 - 114: - 0745 DDFFA6FF defb 0xDD, 0xFF, 0xA6, 0xFF, 3, [dasm_DD_A6], [dasm_DD_A6]>>8, 2, 0x08, 0x80 ;AND A,(IX + d) - 030A0B02 - 0880 - 115: - 074F FDFFA6FF defb 0xFD, 0xFF, 0xA6, 0xFF, 3, [dasm_FD_A6], [dasm_FD_A6]>>8, 2, 0x08, 0x80 ;AND A,(IY + d) - 03160B02 - 0880 - 116: - 0759 B0F80000 defb 0xB0, 0xF8, 0x00, 0x00, 1, [dasm__OR], [dasm__OR]>>8, 1, 0x07 ;OR A,r / OR A, (HL) - 01220B01 - 07 - 117: - 0762 F6FF0000 defb 0xF6, 0xFF, 0x00, 0x00, 2, [dasm__OR], [dasm__OR]>>8, 1, 0x08 ;OR A,n - 02220B01 - 08 - 118: - 076B DDFFB6FF defb 0xDD, 0xFF, 0xB6, 0xFF, 3, [dasm_DD_B6], [dasm_DD_B6]>>8, 2, 0x08, 0x80 ;OR A,(IX + d) - 03260B02 - 0880 - 119: - 0775 FDFFB6FF defb 0xFD, 0xFF, 0xB6, 0xFF, 3, [dasm_FD_B6], [dasm_FD_B6]>>8, 2, 0x08, 0x80 ;OR A,(IY + d) - 03310B02 - 0880 - 120: - 077F A8F80000 defb 0xA8, 0xF8, 0x00, 0x00, 1, [dasm__XOR], [dasm__XOR]>>8, 1, 0x07 ;XOR A,r / XOR A, (HL) - 013C0B01 - 07 - 121: - 0788 EEFF0000 defb 0xEE, 0xFF, 0x00, 0x00, 2, [dasm__XOR], [dasm__XOR]>>8, 1, 0x08 ;XOR A,n - 023C0B01 - 08 - 122: - 0791 DDFFAEFF defb 0xDD, 0xFF, 0xAE, 0xFF, 3, [dasm_DD_AE], [dasm_DD_AE]>>8, 2, 0x08, 0x80 ;XOR A,(IX + d) - 03410B02 - 0880 - 123: - 079B FDFFAEFF defb 0xFD, 0xFF, 0xAE, 0xFF, 3, [dasm_FD_AE], [dasm_FD_AE]>>8, 2, 0x08, 0x80 ;XOR A,(IY + d) - 034D0B02 - 0880 - 124: - 07A5 B8F80000 defb 0xB8, 0xF8, 0x00, 0x00, 1, [dasm__CP], [dasm__CP]>>8, 1, 0x07 ;CP A,r / CP A, (HL) - 01590B01 - 07 - 125: - 07AE FEFF0000 defb 0xFE, 0xFF, 0x00, 0x00, 2, [dasm__CP], [dasm__CP]>>8, 1, 0x08 ;CP A,n - 02590B01 - 08 - 126: - 07B7 DDFFBEFF defb 0xDD, 0xFF, 0xBE, 0xFF, 3, [dasm_DD_BE], [dasm_DD_BE]>>8, 2, 0x08, 0x80 ;CP A,(IX + d) - 035D0B02 - 0880 - 127: - 07C1 FDFFBEFF defb 0xFD, 0xFF, 0xBE, 0xFF, 3, [dasm_FD_BE], [dasm_FD_BE]>>8, 2, 0x08, 0x80 ;CP A,(IY + d) - 03680B02 - 0880 - 128: - 07CB 04C70000 defb 0x04, 0xC7, 0x00, 0x00, 1, [dasm__INC], [dasm__INC]>>8, 1, 0x10 ;INC r / INC (HL) + 108: - 079F 94F80000 defb 0x94, 0xF8, 0x00, 0x00, 1, [dasm__SBC], [dasm__SBC]>>8, 1, 0x07 ;SBC A,r / SBC A, (HL) 01730B01 + 07 + 109: - 07A8 DEFF0000 defb 0xDE, 0xFF, 0x00, 0x00, 2, [dasm__SBC], [dasm__SBC]>>8, 1, 0x08 ;SBC A,n + 02730B01 + 08 + 110: - 07B1 DDFF9EFF defb 0xDD, 0xFF, 0x9E, 0xFF, 3, [dasm_DD_9E], [dasm_DD_9E]>>8, 2, 0x08, 0x80 ;SBC A,(IX + d) + 037B0B02 + 0880 + 111: - 07BB FDFF9EFF defb 0xFD, 0xFF, 0x9E, 0xFF, 3, [dasm_FD_9E], [dasm_FD_9E]>>8, 2, 0x08, 0x80 ;SBC A,(IY + d) + 03890B02 + 0880 + 112: - 07C5 A0F80000 defb 0xA0, 0xF8, 0x00, 0x00, 1, [dasm__AND], [dasm__AND]>>8, 1, 0x07 ;AND A,r / AND A, (HL) + 01970B01 + 07 + 113: - 07CE E6FF0000 defb 0xE6, 0xFF, 0x00, 0x00, 2, [dasm__AND], [dasm__AND]>>8, 1, 0x08 ;AND A,n + 02970B01 + 08 + 114: - 07D7 DDFFA6FF defb 0xDD, 0xFF, 0xA6, 0xFF, 3, [dasm_DD_A6], [dasm_DD_A6]>>8, 2, 0x08, 0x80 ;AND A,(IX + d) + 039C0B02 + 0880 + 115: - 07E1 FDFFA6FF defb 0xFD, 0xFF, 0xA6, 0xFF, 3, [dasm_FD_A6], [dasm_FD_A6]>>8, 2, 0x08, 0x80 ;AND A,(IY + d) + 03A80B02 + 0880 + 116: - 07EB B0F80000 defb 0xB0, 0xF8, 0x00, 0x00, 1, [dasm__OR], [dasm__OR]>>8, 1, 0x07 ;OR A,r / OR A, (HL) + 01B40B01 + 07 + 117: - 07F4 F6FF0000 defb 0xF6, 0xFF, 0x00, 0x00, 2, [dasm__OR], [dasm__OR]>>8, 1, 0x08 ;OR A,n + 02B40B01 + 08 + 118: - 07FD DDFFB6FF defb 0xDD, 0xFF, 0xB6, 0xFF, 3, [dasm_DD_B6], [dasm_DD_B6]>>8, 2, 0x08, 0x80 ;OR A,(IX + d) + 03B80B02 + 0880 + 119: - 0807 FDFFB6FF defb 0xFD, 0xFF, 0xB6, 0xFF, 3, [dasm_FD_B6], [dasm_FD_B6]>>8, 2, 0x08, 0x80 ;OR A,(IY + d) + 03C30B02 + 0880 + 120: - 0811 A8F80000 defb 0xA8, 0xF8, 0x00, 0x00, 1, [dasm__XOR], [dasm__XOR]>>8, 1, 0x07 ;XOR A,r / XOR A, (HL) + 01CE0B01 + 07 + 121: - 081A EEFF0000 defb 0xEE, 0xFF, 0x00, 0x00, 2, [dasm__XOR], [dasm__XOR]>>8, 1, 0x08 ;XOR A,n + 02CE0B01 + 08 + 122: - 0823 DDFFAEFF defb 0xDD, 0xFF, 0xAE, 0xFF, 3, [dasm_DD_AE], [dasm_DD_AE]>>8, 2, 0x08, 0x80 ;XOR A,(IX + d) + 03D30B02 + 0880 + 123: - 082D FDFFAEFF defb 0xFD, 0xFF, 0xAE, 0xFF, 3, [dasm_FD_AE], [dasm_FD_AE]>>8, 2, 0x08, 0x80 ;XOR A,(IY + d) + 03DF0B02 + 0880 + 124: - 0837 B8F80000 defb 0xB8, 0xF8, 0x00, 0x00, 1, [dasm__CP], [dasm__CP]>>8, 1, 0x07 ;CP A,r / CP A, (HL) + 01EB0B01 + 07 + 125: - 0840 FEFF0000 defb 0xFE, 0xFF, 0x00, 0x00, 2, [dasm__CP], [dasm__CP]>>8, 1, 0x08 ;CP A,n + 02EB0B01 + 08 + 126: - 0849 DDFFBEFF defb 0xDD, 0xFF, 0xBE, 0xFF, 3, [dasm_DD_BE], [dasm_DD_BE]>>8, 2, 0x08, 0x80 ;CP A,(IX + d) + 03EF0B02 + 0880 + 127: - 0853 FDFFBEFF defb 0xFD, 0xFF, 0xBE, 0xFF, 3, [dasm_FD_BE], [dasm_FD_BE]>>8, 2, 0x08, 0x80 ;CP A,(IY + d) + 03FA0B02 + 0880 + 128: - 085D 04C70000 defb 0x04, 0xC7, 0x00, 0x00, 1, [dasm__INC], [dasm__INC]>>8, 1, 0x10 ;INC r / INC (HL) + 01050C01 10 - 129: - 07D4 DDFF34FF defb 0xDD, 0xFF, 0x34, 0xFF, 3, [dasm_DD_34], [dasm_DD_34]>>8, 2, 0x08, 0x80 ;INC (IX + d) - 03780B02 + 129: - 0866 DDFF34FF defb 0xDD, 0xFF, 0x34, 0xFF, 3, [dasm_DD_34], [dasm_DD_34]>>8, 2, 0x08, 0x80 ;INC (IX + d) + 030A0C02 0880 - 130: - 07DE FDFF34FF defb 0xFD, 0xFF, 0x34, 0xFF, 3, [dasm_FD_34], [dasm_FD_34]>>8, 2, 0x08, 0x80 ;INC (IY + d) - 03840B02 + 130: - 0870 FDFF34FF defb 0xFD, 0xFF, 0x34, 0xFF, 3, [dasm_FD_34], [dasm_FD_34]>>8, 2, 0x08, 0x80 ;INC (IY + d) + 03160C02 0880 - 131: - 07E8 05C70000 defb 0x05, 0xC7, 0x00, 0x00, 1, [dasm__DEC], [dasm__DEC]>>8, 1, 0x10 ;DEC r / DEC (HL) - 01900B01 + 131: - 087A 05C70000 defb 0x05, 0xC7, 0x00, 0x00, 1, [dasm__DEC], [dasm__DEC]>>8, 1, 0x10 ;DEC r / DEC (HL) + 01220C01 10 - 132: - 07F1 DDFF35FF defb 0xDD, 0xFF, 0x35, 0xFF, 3, [dasm_DD_35], [dasm_DD_35]>>8, 2, 0x08, 0x80 ;DEC (IX + d) - 03950B02 + 132: - 0883 DDFF35FF defb 0xDD, 0xFF, 0x35, 0xFF, 3, [dasm_DD_35], [dasm_DD_35]>>8, 2, 0x08, 0x80 ;DEC (IX + d) + 03270C02 0880 - 133: - 07FB FDFF35FF defb 0xFD, 0xFF, 0x35, 0xFF, 3, [dasm_FD_35], [dasm_FD_35]>>8, 2, 0x08, 0x80 ;DEC (IY + d) - 03A10B02 + 133: - 088D FDFF35FF defb 0xFD, 0xFF, 0x35, 0xFF, 3, [dasm_FD_35], [dasm_FD_35]>>8, 2, 0x08, 0x80 ;DEC (IY + d) + 03330C02 0880 134: ;16-Bit Arithmetic Group - 135: - 0805 09CF0000 defb 0x09, 0xCF, 0x00, 0x00, 1, [dasm_09], [dasm_09]>>8, 1, 0x11 ;ADD HL, ss - 01AD0B01 + 135: - 0897 09CF0000 defb 0x09, 0xCF, 0x00, 0x00, 1, [dasm_09], [dasm_09]>>8, 1, 0x11 ;ADD HL, ss + 013F0C01 11 - 136: - 080E EDFF4ACF defb 0xED, 0xFF, 0x4A, 0xCF, 2, [dasm_ED_4A], [dasm_ED_4A]>>8, 1, 0x12 ;ADC HL, ss - 02B60B01 + 136: - 08A0 EDFF4ACF defb 0xED, 0xFF, 0x4A, 0xCF, 2, [dasm_ED_4A], [dasm_ED_4A]>>8, 1, 0x12 ;ADC HL, ss + 02480C01 12 - 137: - 0817 EDFF42CF defb 0xED, 0xFF, 0x42, 0xCF, 2, [dasm_ED_42], [dasm_ED_42]>>8, 1, 0x12 ;SBC HL, ss - 02BF0B01 + 137: - 08A9 EDFF42CF defb 0xED, 0xFF, 0x42, 0xCF, 2, [dasm_ED_42], [dasm_ED_42]>>8, 1, 0x12 ;SBC HL, ss + 02510C01 12 - 138: - 0820 DDFF09CF defb 0xDD, 0xFF, 0x09, 0xCF, 2, [dasm_DD_09], [dasm_DD_09]>>8, 1, 0x12 ;ADD IX, ss - 02C80B01 + 138: - 08B2 DDFF09CF defb 0xDD, 0xFF, 0x09, 0xCF, 2, [dasm_DD_09], [dasm_DD_09]>>8, 1, 0x12 ;ADD IX, ss + 025A0C01 12 - 139: - 0829 FDFF09CF defb 0xFD, 0xFF, 0x09, 0xCF, 2, [dasm_FD_09], [dasm_FD_09]>>8, 1, 0x12 ;ADD IY, ss - 02D10B01 + 139: - 08BB FDFF09CF defb 0xFD, 0xFF, 0x09, 0xCF, 2, [dasm_FD_09], [dasm_FD_09]>>8, 1, 0x12 ;ADD IY, ss + 02630C01 12 - 140: - 0832 03CF0000 defb 0x03, 0xCF, 0x00, 0x00, 1, [dasm_03], [dasm_03]>>8, 1, 0x11 ;INC ss - 01DA0B01 + 140: - 08C4 03CF0000 defb 0x03, 0xCF, 0x00, 0x00, 1, [dasm_03], [dasm_03]>>8, 1, 0x11 ;INC ss + 016C0C01 11 - 141: - 083B DDFF23FF defb 0xDD, 0xFF, 0x23, 0xFF, 2, [dasm_DD_23], [dasm_DD_23]>>8, 0 ;INC IX - 02DF0B00 - 142: - 0843 FDFF23FF defb 0xFD, 0xFF, 0x23, 0xFF, 2, [dasm_FD_23], [dasm_FD_23]>>8, 0 ;INC IY - 02E80B00 - 143: - 084B 0BCF0000 defb 0x0B, 0xCF, 0x00, 0x00, 1, [dasm_0B], [dasm_0B]>>8, 1, 0x11 ;DEC ss - 01F10B01 + 141: - 08CD DDFF23FF defb 0xDD, 0xFF, 0x23, 0xFF, 2, [dasm_DD_23], [dasm_DD_23]>>8, 0 ;INC IX + 02710C00 + 142: - 08D5 FDFF23FF defb 0xFD, 0xFF, 0x23, 0xFF, 2, [dasm_FD_23], [dasm_FD_23]>>8, 0 ;INC IY + 027A0C00 + 143: - 08DD 0BCF0000 defb 0x0B, 0xCF, 0x00, 0x00, 1, [dasm_0B], [dasm_0B]>>8, 1, 0x11 ;DEC ss + 01830C01 11 - 144: - 0854 DDFF2BFF defb 0xDD, 0xFF, 0x2B, 0xFF, 2, [dasm_DD_2B], [dasm_DD_2B]>>8, 0 ;DEC IX - 02F60B00 - 145: - 085C FDFF2BFF defb 0xFD, 0xFF, 0x2B, 0xFF, 2, [dasm_FD_2B], [dasm_FD_2B]>>8, 0 ;DEC IY - 02FF0B00 + 144: - 08E6 DDFF2BFF defb 0xDD, 0xFF, 0x2B, 0xFF, 2, [dasm_DD_2B], [dasm_DD_2B]>>8, 0 ;DEC IX + 02880C00 + 145: - 08EE FDFF2BFF defb 0xFD, 0xFF, 0x2B, 0xFF, 2, [dasm_FD_2B], [dasm_FD_2B]>>8, 0 ;DEC IY + 02910C00 146: ;16-Bit Load Group - 147: - 0864 01CF0000 defb 0x01, 0xCF, 0x00, 0x00, 3, [dasm_01], [dasm_01]>>8, 3, 0x11, 0x80, 0x09 ;LD dd, nn - 03080C03 + 147: - 08F6 01CF0000 defb 0x01, 0xCF, 0x00, 0x00, 3, [dasm_01], [dasm_01]>>8, 3, 0x11, 0x80, 0x09 ;LD dd, nn + 039A0C03 118009 - 148: - 086F DDFF21FF defb 0xDD, 0xFF, 0x21, 0xFF, 4, [dasm_DD_01], [dasm_DD_01]>>8, 1, 0x0A ;LD IX, nn - 040F0C01 + 148: - 0901 DDFF21FF defb 0xDD, 0xFF, 0x21, 0xFF, 4, [dasm_DD_01], [dasm_DD_01]>>8, 1, 0x0A ;LD IX, nn + 04A10C01 0A - 149: - 0878 FDFF21FF defb 0xFD, 0xFF, 0x21, 0xFF, 4, [dasm_FD_01], [dasm_FD_01]>>8, 1, 0x0A ;LD IY, nn - 04170C01 + 149: - 090A FDFF21FF defb 0xFD, 0xFF, 0x21, 0xFF, 4, [dasm_FD_01], [dasm_FD_01]>>8, 1, 0x0A ;LD IY, nn + 04A90C01 0A - 150: - 0881 2AFF0000 defb 0x2A, 0xFF, 0x00, 0x00, 3, [dasm_2A], [dasm_2A]>>8, 2, 0x09, 0x80 ;LD HL, (nn) - 031F0C02 + 150: - 0913 2AFF0000 defb 0x2A, 0xFF, 0x00, 0x00, 3, [dasm_2A], [dasm_2A]>>8, 2, 0x09, 0x80 ;LD HL, (nn) + 03B10C02 0980 - 151: - 088B EDFF4BCF defb 0xED, 0xFF, 0x4B, 0xCF, 4, [dasm_ED_4B], [dasm_ED_4B]>>8, 4, 0x12, 0x80, 0x0A, 0x81 ;LD dd, (nn) - 042B0C04 + 151: - 091D EDFF4BCF defb 0xED, 0xFF, 0x4B, 0xCF, 4, [dasm_ED_4B], [dasm_ED_4B]>>8, 4, 0x12, 0x80, 0x0A, 0x81 ;LD dd, (nn) + 04BD0C04 12800A81 - 152: - 0897 DDFF2AFF defb 0xDD, 0xFF, 0x2A, 0xFF, 4, [dasm_DD_2A], [dasm_DD_2A]>>8, 1, 0x0A ;LD IX, (nn) - 04360C01 + 152: - 0929 DDFF2AFF defb 0xDD, 0xFF, 0x2A, 0xFF, 4, [dasm_DD_2A], [dasm_DD_2A]>>8, 1, 0x0A ;LD IX, (nn) + 04C80C01 0A - 153: - 08A0 FDFF2AFF defb 0xFD, 0xFF, 0x2A, 0xFF, 4, [dasm_FD_2A], [dasm_FD_2A]>>8, 1, 0x0A ;LD IY, (nn) - 04420C01 + 153: - 0932 FDFF2AFF defb 0xFD, 0xFF, 0x2A, 0xFF, 4, [dasm_FD_2A], [dasm_FD_2A]>>8, 1, 0x0A ;LD IY, (nn) + 04D40C01 0A - 154: - 08A9 22FF0000 defb 0x22, 0xFF, 0x00, 0x00, 3, [dasm_22], [dasm_22]>>8, 2, 0x0A, 0x80 ;LD (nn), HL - 034E0C02 + 154: - 093B 22FF0000 defb 0x22, 0xFF, 0x00, 0x00, 3, [dasm_22], [dasm_22]>>8, 2, 0x0A, 0x80 ;LD (nn), HL + 03E00C02 0A80 - 155: - 08B3 EDFF43CF defb 0xED, 0xFF, 0x43, 0xCF, 4, [dasm_ED_43], [dasm_ED_43]>>8, 3, 0x0A, 0x80, 0x12 ;LD (nn), dd - 045A0C03 + 155: - 0945 EDFF43CF defb 0xED, 0xFF, 0x43, 0xCF, 4, [dasm_ED_43], [dasm_ED_43]>>8, 3, 0x0A, 0x80, 0x12 ;LD (nn), dd + 04EC0C03 0A8012 - 156: - 08BE DDFF22CF defb 0xDD, 0xFF, 0x22, 0xCF, 4, [dasm_DD_22], [dasm_DD_22]>>8, 2, 0x0A, 0x80 ;LD (nn), IX - 04640C02 + 156: - 0950 DDFF22CF defb 0xDD, 0xFF, 0x22, 0xCF, 4, [dasm_DD_22], [dasm_DD_22]>>8, 2, 0x0A, 0x80 ;LD (nn), IX + 04F60C02 0A80 - 157: - 08C8 FDFF22CF defb 0xFD, 0xFF, 0x22, 0xCF, 4, [dasm_FD_22], [dasm_FD_22]>>8, 2, 0x0A, 0x80 ;LD (nn), IY - 04700C02 + 157: - 095A FDFF22CF defb 0xFD, 0xFF, 0x22, 0xCF, 4, [dasm_FD_22], [dasm_FD_22]>>8, 2, 0x0A, 0x80 ;LD (nn), IY + 04020D02 0A80 - 158: - 08D2 F9FF0000 defb 0xF9, 0xFF, 0x00, 0x00, 1, [dasm_F9], [dasm_F9]>>8, 0 ;LD SP, HL - 017C0C00 - 159: - 08DA DDFFF9FF defb 0xDD, 0xFF, 0xF9, 0xFF, 2, [dasm_DD_F9], [dasm_DD_F9]>>8, 0 ;LD SP, IX - 02860C00 - 160: - 08E2 FDFFF9FF defb 0xFD, 0xFF, 0xF9, 0xFF, 2, [dasm_FD_F9], [dasm_FD_F9]>>8, 0 ;LD SP, IY - 02900C00 - 161: - 08EA C5CF0000 defb 0xC5, 0xCF, 0x00, 0x00, 1, [dasm_E5], [dasm_E5]>>8, 1, 0x13 ;PUSH qq - 019A0C01 + 158: - 0964 F9FF0000 defb 0xF9, 0xFF, 0x00, 0x00, 1, [dasm_F9], [dasm_F9]>>8, 0 ;LD SP, HL + 010E0D00 + 159: - 096C DDFFF9FF defb 0xDD, 0xFF, 0xF9, 0xFF, 2, [dasm_DD_F9], [dasm_DD_F9]>>8, 0 ;LD SP, IX + 02180D00 + 160: - 0974 FDFFF9FF defb 0xFD, 0xFF, 0xF9, 0xFF, 2, [dasm_FD_F9], [dasm_FD_F9]>>8, 0 ;LD SP, IY + 02220D00 + 161: - 097C C5CF0000 defb 0xC5, 0xCF, 0x00, 0x00, 1, [dasm_E5], [dasm_E5]>>8, 1, 0x13 ;PUSH qq + 012C0D01 13 - 162: - 08F3 DDFFE5FF defb 0xDD, 0xFF, 0xE5, 0xFF, 2, [dasm_DD_E5], [dasm_DD_E5]>>8, 0 ;PUSH IX - 02A00C00 - 163: - 08FB FDFFE5FF defb 0xFD, 0xFF, 0xE5, 0xFF, 2, [dasm_FD_E5], [dasm_FD_E5]>>8, 0 ;PUSH IY - 02A80C00 - 164: - 0903 C1CF0000 defb 0xC1, 0xCF, 0x00, 0x00, 1, [dasm_E1], [dasm_E1]>>8, 1, 0x13 ;POP qq - 01B00C01 + 162: - 0985 DDFFE5FF defb 0xDD, 0xFF, 0xE5, 0xFF, 2, [dasm_DD_E5], [dasm_DD_E5]>>8, 0 ;PUSH IX + 02320D00 + 163: - 098D FDFFE5FF defb 0xFD, 0xFF, 0xE5, 0xFF, 2, [dasm_FD_E5], [dasm_FD_E5]>>8, 0 ;PUSH IY + 023A0D00 + 164: - 0995 C1CF0000 defb 0xC1, 0xCF, 0x00, 0x00, 1, [dasm_E1], [dasm_E1]>>8, 1, 0x13 ;POP qq + 01420D01 13 - 165: - 090C DDFFE1FF defb 0xDD, 0xFF, 0xE1, 0xFF, 2, [dasm_DD_E1], [dasm_DD_E1]>>8, 0 ;POP IX - 02B60C00 - 166: - 0914 FDFFE1FF defb 0xFD, 0xFF, 0xE1, 0xFF, 2, [dasm_FD_E1], [dasm_FD_E1]>>8, 0 ;POP IY - 02BE0C00 + 165: - 099E DDFFE1FF defb 0xDD, 0xFF, 0xE1, 0xFF, 2, [dasm_DD_E1], [dasm_DD_E1]>>8, 0 ;POP IX + 02480D00 + 166: - 09A6 FDFFE1FF defb 0xFD, 0xFF, 0xE1, 0xFF, 2, [dasm_FD_E1], [dasm_FD_E1]>>8, 0 ;POP IY + 02500D00 167: 168: - 169: - 091C 4E4F5000 dasm_00: db "NOP",0x00 + 169: - 09AE 4E4F5000 dasm_00: db "NOP",0x00 170: ;JUMP Group - 171: - 0920 4A502000 dasm_C3: db "JP ",0x00,", ",0x00 + 171: - 09B2 4A502000 dasm_C3: db "JP ",0x00,", ",0x00 2C2000 - 172: - 0927 4A522000 dasm_18: db "JR ",0x00 - 173: - 092B 4A522043 dasm_38: db "JR C, ",0x00 + 172: - 09B9 4A522000 dasm_18: db "JR ",0x00 + 173: - 09BD 4A522043 dasm_38: db "JR C, ",0x00 2C2000 - 174: - 0932 4A52204E dasm_30: db "JR NC, ",0x00 + 174: - 09C4 4A52204E dasm_30: db "JR NC, ",0x00 432C2000 - 175: - 093A 4A52205A dasm_28: db "JR Z, ",0x00 + 175: - 09CC 4A52205A dasm_28: db "JR Z, ",0x00 2C2000 - 176: - 0941 4A52204E dasm_20: db "JR NZ, ",0x00 + 176: - 09D3 4A52204E dasm_20: db "JR NZ, ",0x00 5A2C2000 - 177: - 0949 4A502028 dasm_E9: db "JP (HL) ",0x00 + 177: - 09DB 4A502028 dasm_E9: db "JP (HL) ",0x00 484C2920 00 - 178: - 0952 4A502028 dasm_DD: db "JP (IX) ",0x00 + 178: - 09E4 4A502028 dasm_DD: db "JP (IX) ",0x00 49582920 00 - 179: - 095B 4A502028 dasm_FD: db "JP (IY) ",0x00 + 179: - 09ED 4A502028 dasm_FD: db "JP (IY) ",0x00 49592920 00 - 180: - 0964 444A4E5A dasm_10: db "DJNZ ",0x00 + 180: - 09F6 444A4E5A dasm_10: db "DJNZ ",0x00 2000 181: ;Call and Return Group - 182: - 096A 43414C4C dasm_CD: db "CALL ",0x00 + 182: - 09FC 43414C4C dasm_CD: db "CALL ",0x00 2000 - 183: - 0970 52455420 dasm_C9: db "RET ",0x00 + 183: - 0A02 52455420 dasm_C9: db "RET ",0x00 00 - 184: - 0975 52455449 dasm_ED_4D: db "RETI",0x00 + 184: - 0A07 52455449 dasm_ED_4D: db "RETI",0x00 00 - 185: - 097A 5245544E dasm_ED_45: db "RETN",0x00 + 185: - 0A0C 5245544E dasm_ED_45: db "RETN",0x00 00 - 186: - 097F 52535420 dasm_FF: db "RST ",0x00 + 186: - 0A11 52535420 dasm_FF: db "RST ",0x00 00 187: ;8-Bit load group - 188: - 0984 4C442041 dasm_0A: db "LD A,(BC)",0x00 + 188: - 0A16 4C442041 dasm_0A: db "LD A,(BC)",0x00 2C284243 2900 - 189: - 098E 4C442041 dasm_1A: db "LD A,(DE)",0x00 + 189: - 0A20 4C442041 dasm_1A: db "LD A,(DE)",0x00 2C284445 2900 - 190: - 0998 4C442041 dasm_3A: db "LD A,(",0x00, "h)",0x00 + 190: - 0A2A 4C442041 dasm_3A: db "LD A,(",0x00, "h)",0x00 2C280068 2900 - 191: - 09A2 4C442028 dasm_02: db "LD (BC), A",0x00 + 191: - 0A34 4C442028 dasm_02: db "LD (BC), A",0x00 4243292C 204100 - 192: - 09AD 4C442028 dasm_12: db "LD (DE), A",0x00 + 192: - 0A3F 4C442028 dasm_12: db "LD (DE), A",0x00 4445292C 204100 - 193: - 09B8 4C442028 dasm_32: db "LD (",0x00, "h), A",0x00 + 193: - 0A4A 4C442028 dasm_32: db "LD (",0x00, "h), A",0x00 0068292C 204100 - 194: - 09C3 4C442000 dasm__LD: db "LD ",0x00 - 195: - 09C7 4C442041 dasm__ED_57: db "LD A, I",0x00 + 194: - 0A55 4C442000 dasm__LD: db "LD ",0x00 + 195: - 0A59 4C442041 dasm__ED_57: db "LD A, I",0x00 2C204900 - 196: - 09CF 4C442041 dasm__ED_5F: db "LD A, R",0x00 + 196: - 0A61 4C442041 dasm__ED_5F: db "LD A, R",0x00 2C205200 - 197: - 09D7 4C442049 dasm__ED_47: db "LD I, A",0x00 + 197: - 0A69 4C442049 dasm__ED_47: db "LD I, A",0x00 2C204100 - 198: - 09DF 4C442052 dasm__ED_4F: db "LD R, A",0x00 + 198: - 0A71 4C442052 dasm__ED_4F: db "LD R, A",0x00 2C204100 199: ;General-Purpose Arithmetic and CPU Control Groups - 200: - 09E7 44414100 dasm_27: db "DAA",0x00 - 201: - 09EB 43504C00 dasm_2F: db "CPL",0x00 - 202: - 09EF 4E454700 dasm_ED_44: db "NEG",0x00 - 203: - 09F3 43434600 dasm_3F: db "CCF",0x00 - 204: - 09F7 53434600 dasm_37: db "SCF",0x00 - 205: - 09FB 48414C54 dasm_76: db "HALT",0x00 + 200: - 0A79 44414100 dasm_27: db "DAA",0x00 + 201: - 0A7D 43504C00 dasm_2F: db "CPL",0x00 + 202: - 0A81 4E454700 dasm_ED_44: db "NEG",0x00 + 203: - 0A85 43434600 dasm_3F: db "CCF",0x00 + 204: - 0A89 53434600 dasm_37: db "SCF",0x00 + 205: - 0A8D 48414C54 dasm_76: db "HALT",0x00 00 - 206: - 0A00 444900 dasm_F3: db "DI",0x00 - 207: - 0A03 454900 dasm_FB: db "EI",0x00 - 208: - 0A06 494D2030 dasm_ED_46: db "IM 0",0x00 + 206: - 0A92 444900 dasm_F3: db "DI",0x00 + 207: - 0A95 454900 dasm_FB: db "EI",0x00 + 208: - 0A98 494D2030 dasm_ED_46: db "IM 0",0x00 00 - 209: - 0A0B 494D2031 dasm_ED_56: db "IM 1",0x00 + 209: - 0A9D 494D2031 dasm_ED_56: db "IM 1",0x00 00 - 210: - 0A10 494D2032 dasm_ED_5E: db "IM 2",0x00 + 210: - 0AA2 494D2032 dasm_ED_5E: db "IM 2",0x00 00 211: ;Exchange, Block Transfer, and Search Group - 212: - 0A15 45582044 dasm_BE: db "EX DE, HL",0x00 + 212: - 0AA7 45582044 dasm_BE: db "EX DE, HL",0x00 452C2048 4C00 - 213: - 0A1F 45582041 dasm_08: db "EX AF, AF′",0x00 + 213: - 0AB1 45582041 dasm_08: db "EX AF, AF′",0x00 462C2041 46E280B2 00 - 214: - 0A2C 45585800 dasm_D9: db "EXX",0x00 - 215: - 0A30 45582028 dasm_E3: db "EX (SP), HL",0x00 + 214: - 0ABE 45585800 dasm_D9: db "EXX",0x00 + 215: - 0AC2 45582028 dasm_E3: db "EX (SP), HL",0x00 5350292C 20484C00 - 216: - 0A3C 45582028 dasm_DD_E3: db "EX (SP), IX",0x00 + 216: - 0ACE 45582028 dasm_DD_E3: db "EX (SP), IX",0x00 5350292C 20495800 - 217: - 0A48 45582028 dasm_FD_E3: db "EX (SP), IY",0x00 + 217: - 0ADA 45582028 dasm_FD_E3: db "EX (SP), IY",0x00 5350292C 20495900 - 218: - 0A54 4C444900 dasm_ED_A0: db "LDI",0x00 - 219: - 0A58 4C444952 dasm_ED_B0: db "LDIR",0x00 + 218: - 0AE6 4C444900 dasm_ED_A0: db "LDI",0x00 + 219: - 0AEA 4C444952 dasm_ED_B0: db "LDIR",0x00 00 - 220: - 0A5D 4C444400 dasm_ED_A8: db "LDD",0x00 - 221: - 0A61 4C444452 dasm_ED_B8: db "LDDR",0x00 + 220: - 0AEF 4C444400 dasm_ED_A8: db "LDD",0x00 + 221: - 0AF3 4C444452 dasm_ED_B8: db "LDDR",0x00 00 - 222: - 0A66 43504900 dasm_ED_A1: db "CPI",0x00 - 223: - 0A6A 43504952 dasm_ED_B1: db "CPIR",0x00 + 222: - 0AF8 43504900 dasm_ED_A1: db "CPI",0x00 + 223: - 0AFC 43504952 dasm_ED_B1: db "CPIR",0x00 00 - 224: - 0A6F 43504400 dasm_ED_A9: db "CPD",0x00 - 225: - 0A73 43504452 dasm_ED_B9: db "CPDR",0x00 + 224: - 0B01 43504400 dasm_ED_A9: db "CPD",0x00 + 225: - 0B05 43504452 dasm_ED_B9: db "CPDR",0x00 00 226: ;8-Bit Arithmetic Group - 227: - 0A78 41444420 dasm_80C6: db "ADD A, ", 0x00 + 227: - 0B0A 41444420 dasm_80C6: db "ADD A, ", 0x00 412C2000 - 228: - 0A80 41444420 dasm_DD_86: db "ADD A, (IX+", 0x00, "h)",0x00 + 228: - 0B12 41444420 dasm_DD_86: db "ADD A, (IX+", 0x00, "h)",0x00 412C2028 49582B00 682900 - 229: - 0A8F 41444420 dasm_FD_86: db "ADD A, (IY+", 0x00, "h)",0x00 + 229: - 0B21 41444420 dasm_FD_86: db "ADD A, (IY+", 0x00, "h)",0x00 412C2028 49592B00 682900 - 230: - 0A9E 41444320 dasm_C88E: db "ADC A, ", 0x00 + 230: - 0B30 41444320 dasm_C88E: db "ADC A, ", 0x00 412C2000 - 231: - 0AA6 41444320 dasm_DD_8E: db "ADC A, (IX+", 0x00, "h)",0x00 + 231: - 0B38 41444320 dasm_DD_8E: db "ADC A, (IX+", 0x00, "h)",0x00 412C2028 49582B00 682900 - 232: - 0AB5 41444320 dasm_FD_8E: db "ADC A, (IY+", 0x00, "h)",0x00 + 232: - 0B47 41444320 dasm_FD_8E: db "ADC A, (IY+", 0x00, "h)",0x00 412C2028 49592B00 682900 - 233: - 0AC4 53554220 dasm__SUB: db "SUB ", 0x00 + 233: - 0B56 53554220 dasm__SUB: db "SUB ", 0x00 00 - 234: - 0AC9 53554220 dasm_DD_96: db "SUB (IX+", 0x00, "h)",0x00 + 234: - 0B5B 53554220 dasm_DD_96: db "SUB (IX+", 0x00, "h)",0x00 2849582B 00682900 - 235: - 0AD5 53554220 dasm_FD_96: db "SUB (IY+", 0x00, "h)",0x00 + 235: - 0B67 53554220 dasm_FD_96: db "SUB (IY+", 0x00, "h)",0x00 2849592B 00682900 - 236: - 0AE1 53424320 dasm__SBC: db "SBC A, ", 0x00 + 236: - 0B73 53424320 dasm__SBC: db "SBC A, ", 0x00 412C2000 - 237: - 0AE9 53424320 dasm_DD_9E: db "SBC A,(IX+", 0x00, "h)",0x00 + 237: - 0B7B 53424320 dasm_DD_9E: db "SBC A,(IX+", 0x00, "h)",0x00 412C2849 582B0068 2900 - 238: - 0AF7 53424320 dasm_FD_9E: db "SBC A,(IY+", 0x00, "h)",0x00 + 238: - 0B89 53424320 dasm_FD_9E: db "SBC A,(IY+", 0x00, "h)",0x00 412C2849 592B0068 2900 - 239: - 0B05 414E4420 dasm__AND: db "AND ", 0x00 + 239: - 0B97 414E4420 dasm__AND: db "AND ", 0x00 00 - 240: - 0B0A 414E4420 dasm_DD_A6: db "AND (IX+", 0x00, "h)",0x00 + 240: - 0B9C 414E4420 dasm_DD_A6: db "AND (IX+", 0x00, "h)",0x00 2849582B 00682900 - 241: - 0B16 414E4420 dasm_FD_A6: db "AND (IY+", 0x00, "h)",0x00 + 241: - 0BA8 414E4420 dasm_FD_A6: db "AND (IY+", 0x00, "h)",0x00 2849592B 00682900 - 242: - 0B22 4F522000 dasm__OR: db "OR ", 0x00 - 243: - 0B26 4F522028 dasm_DD_B6: db "OR (IX+", 0x00, "h)",0x00 + 242: - 0BB4 4F522000 dasm__OR: db "OR ", 0x00 + 243: - 0BB8 4F522028 dasm_DD_B6: db "OR (IX+", 0x00, "h)",0x00 49582B00 682900 - 244: - 0B31 4F522028 dasm_FD_B6: db "OR (IY+", 0x00, "h)",0x00 + 244: - 0BC3 4F522028 dasm_FD_B6: db "OR (IY+", 0x00, "h)",0x00 49592B00 682900 - 245: - 0B3C 584F5220 dasm__XOR: db "XOR ", 0x00 + 245: - 0BCE 584F5220 dasm__XOR: db "XOR ", 0x00 00 - 246: - 0B41 584F5220 dasm_DD_AE: db "XOR (IX+", 0x00, "h)",0x00 + 246: - 0BD3 584F5220 dasm_DD_AE: db "XOR (IX+", 0x00, "h)",0x00 2849582B 00682900 - 247: - 0B4D 584F5220 dasm_FD_AE: db "XOR (IY+", 0x00, "h)",0x00 + 247: - 0BDF 584F5220 dasm_FD_AE: db "XOR (IY+", 0x00, "h)",0x00 2849592B 00682900 - 248: - 0B59 43502000 dasm__CP: db "CP ", 0x00 - 249: - 0B5D 43502028 dasm_DD_BE: db "CP (IX+", 0x00, "h)",0x00 + 248: - 0BEB 43502000 dasm__CP: db "CP ", 0x00 + 249: - 0BEF 43502028 dasm_DD_BE: db "CP (IX+", 0x00, "h)",0x00 49582B00 682900 - 250: - 0B68 43502028 dasm_FD_BE: db "CP (IY+", 0x00, "h)",0x00 + 250: - 0BFA 43502028 dasm_FD_BE: db "CP (IY+", 0x00, "h)",0x00 49592B00 682900 - 251: - 0B73 494E4320 dasm__INC: db "INC ", 0x00 + 251: - 0C05 494E4320 dasm__INC: db "INC ", 0x00 00 - 252: - 0B78 494E4320 dasm_DD_34: db "INC (IX+", 0x00, "h)",0x00 + 252: - 0C0A 494E4320 dasm_DD_34: db "INC (IX+", 0x00, "h)",0x00 2849582B 00682900 - 253: - 0B84 494E4320 dasm_FD_34: db "INC (IY+", 0x00, "h)",0x00 + 253: - 0C16 494E4320 dasm_FD_34: db "INC (IY+", 0x00, "h)",0x00 2849592B 00682900 - 254: - 0B90 44454320 dasm__DEC: db "DEC ", 0x00 + 254: - 0C22 44454320 dasm__DEC: db "DEC ", 0x00 00 - 255: - 0B95 44454320 dasm_DD_35: db "DEC (IX+", 0x00, "h)",0x00 + 255: - 0C27 44454320 dasm_DD_35: db "DEC (IX+", 0x00, "h)",0x00 2849582B 00682900 - 256: - 0BA1 44454320 dasm_FD_35: db "DEC (IY+", 0x00, "h)",0x00 + 256: - 0C33 44454320 dasm_FD_35: db "DEC (IY+", 0x00, "h)",0x00 2849592B 00682900 257: ;16-Bit Arithmetic Group - 258: - 0BAD 41444420 dasm_09: db "ADD HL, ",0x00 + 258: - 0C3F 41444420 dasm_09: db "ADD HL, ",0x00 484C2C20 00 - 259: - 0BB6 41444320 dasm_ED_4A: db "ADC HL, ",0x00 + 259: - 0C48 41444320 dasm_ED_4A: db "ADC HL, ",0x00 484C2C20 00 - 260: - 0BBF 53424320 dasm_ED_42: db "SBC HL, ",0x00 + 260: - 0C51 53424320 dasm_ED_42: db "SBC HL, ",0x00 484C2C20 00 - 261: - 0BC8 41444420 dasm_DD_09: db "ADD IX, ",0x00 + 261: - 0C5A 41444420 dasm_DD_09: db "ADD IX, ",0x00 49582C20 00 - 262: - 0BD1 41444420 dasm_FD_09: db "ADD IY, ",0x00 + 262: - 0C63 41444420 dasm_FD_09: db "ADD IY, ",0x00 49592C20 00 - 263: - 0BDA 494E4320 dasm_03: db "INC ",0x00 + 263: - 0C6C 494E4320 dasm_03: db "INC ",0x00 00 - 264: - 0BDF 494E4320 dasm_DD_23: db "INC IX, ",0x00 + 264: - 0C71 494E4320 dasm_DD_23: db "INC IX, ",0x00 49582C20 00 - 265: - 0BE8 494E4320 dasm_FD_23: db "INC IY, ",0x00 + 265: - 0C7A 494E4320 dasm_FD_23: db "INC IY, ",0x00 49592C20 00 - 266: - 0BF1 44454320 dasm_0B: db "DEC ",0x00 + 266: - 0C83 44454320 dasm_0B: db "DEC ",0x00 00 - 267: - 0BF6 44454320 dasm_DD_2B: db "DEC IX, ",0x00 + 267: - 0C88 44454320 dasm_DD_2B: db "DEC IX, ",0x00 49582C20 00 - 268: - 0BFF 44454320 dasm_FD_2B: db "DEC IY, ",0x00 + 268: - 0C91 44454320 dasm_FD_2B: db "DEC IY, ",0x00 49592C20 00 269: ;16-Bit Load Group - 270: - 0C08 4C442000 dasm_01: db "LD ",0x00, ", ",0x00 + 270: - 0C9A 4C442000 dasm_01: db "LD ",0x00, ", ",0x00 2C2000 - 271: - 0C0F 4C442049 dasm_DD_01: db "LD IX, ",0x00 + 271: - 0CA1 4C442049 dasm_DD_01: db "LD IX, ",0x00 582C2000 - 272: - 0C17 4C442049 dasm_FD_01: db "LD IY, ",0x00 + 272: - 0CA9 4C442049 dasm_FD_01: db "LD IY, ",0x00 592C2000 - 273: - 0C1F 4C442048 dasm_2A: db "LD HL, (",0x00,"h)",0x00 + 273: - 0CB1 4C442048 dasm_2A: db "LD HL, (",0x00,"h)",0x00 4C2C2028 00682900 - 274: - 0C2B 4C442000 dasm_ED_4B: db "LD ",0x00,", (",0x00,"h)",0x00 + 274: - 0CBD 4C442000 dasm_ED_4B: db "LD ",0x00,", (",0x00,"h)",0x00 2C202800 682900 - 275: - 0C36 4C442049 dasm_DD_2A: db "LD IX, (",0x00,"h)",0x00 + 275: - 0CC8 4C442049 dasm_DD_2A: db "LD IX, (",0x00,"h)",0x00 582C2028 00682900 - 276: - 0C42 4C442049 dasm_FD_2A: db "LD IY, (",0x00,"h)",0x00 + 276: - 0CD4 4C442049 dasm_FD_2A: db "LD IY, (",0x00,"h)",0x00 592C2028 00682900 - 277: - 0C4E 4C442028 dasm_22: db "LD (",0x00,"h), HL",0x00 + 277: - 0CE0 4C442028 dasm_22: db "LD (",0x00,"h), HL",0x00 0068292C 20484C00 - 278: - 0C5A 4C442028 dasm_ED_43: db "LD (",0x00,"h), ",0x00 + 278: - 0CEC 4C442028 dasm_ED_43: db "LD (",0x00,"h), ",0x00 0068292C 2000 - 279: - 0C64 4C442028 dasm_DD_22: db "LD (",0x00,"h), IX",0x00 + 279: - 0CF6 4C442028 dasm_DD_22: db "LD (",0x00,"h), IX",0x00 0068292C 20495800 - 280: - 0C70 4C442028 dasm_FD_22: db "LD (",0x00,"h), IY",0x00 + 280: - 0D02 4C442028 dasm_FD_22: db "LD (",0x00,"h), IY",0x00 0068292C 20495900 - 281: - 0C7C 4C442053 dasm_F9: db "LD SP, HL",0x00 + 281: - 0D0E 4C442053 dasm_F9: db "LD SP, HL",0x00 502C2048 4C00 - 282: - 0C86 4C442053 dasm_DD_F9: db "LD SP, IX",0x00 + 282: - 0D18 4C442053 dasm_DD_F9: db "LD SP, IX",0x00 502C2049 5800 - 283: - 0C90 4C442053 dasm_FD_F9: db "LD SP, IY",0x00 + 283: - 0D22 4C442053 dasm_FD_F9: db "LD SP, IY",0x00 502C2049 5900 - 284: - 0C9A 50555348 dasm_E5: db "PUSH ",0x00 + 284: - 0D2C 50555348 dasm_E5: db "PUSH ",0x00 2000 - 285: - 0CA0 50555348 dasm_DD_E5: db "PUSH IX",0x00 + 285: - 0D32 50555348 dasm_DD_E5: db "PUSH IX",0x00 20495800 - 286: - 0CA8 50555348 dasm_FD_E5: db "PUSH IY",0x00 + 286: - 0D3A 50555348 dasm_FD_E5: db "PUSH IY",0x00 20495900 - 287: - 0CB0 50555348 dasm_E1: db "PUSH ",0x00 + 287: - 0D42 50555348 dasm_E1: db "PUSH ",0x00 2000 - 288: - 0CB6 50555348 dasm_DD_E1: db "PUSH IX",0x00 + 288: - 0D48 50555348 dasm_DD_E1: db "PUSH IX",0x00 20495800 - 289: - 0CBE 50555348 dasm_FD_E1: db "PUSH IY",0x00 + 289: - 0D50 50555348 dasm_FD_E1: db "PUSH IY",0x00 20495900 290: 291: ;Misc - 292: - 0CC6 2E3F2E00 dasm_UU: db ".?.",0x00 - 293: - 0CCA 20202020 dasm_UW: db " ",0x00 + 292: - 0D58 2E3F2E00 dasm_UU: db ".?.",0x00 + 293: - 0D5C 20202020 dasm_UW: db " ",0x00 00 294: - 295: - 0CCF dasm_printFlags_table: - 296: - 0CCF 4E5A db "NZ" - 297: - 0CD1 5A00 db "Z",0 - 298: - 0CD3 4E43 db "NC" - 299: - 0CD5 4300 db "C",0 - 300: - 0CD7 504F db "PO" - 301: - 0CD9 5045 db "PE" - 302: - 0CDB 5000 db "P",0 - 303: - 0CDD 4D00 db "M",0 + 295: - 0D61 dasm_printFlags_table: + 296: - 0D61 4E5A db "NZ" + 297: - 0D63 5A00 db "Z",0 + 298: - 0D65 4E43 db "NC" + 299: - 0D67 4300 db "C",0 + 300: - 0D69 504F db "PO" + 301: - 0D6B 5045 db "PE" + 302: - 0D6D 5000 db "P",0 + 303: - 0D6F 4D00 db "M",0 304: - 305: - 0CDF dasm_printRegister8_table: - 306: - 0CDF 42 db "B" - 307: - 0CE0 43 db "C" - 308: - 0CE1 44 db "D" - 309: - 0CE2 45 db "E" - 310: - 0CE3 48 db "H" - 311: - 0CE4 4C db "L" - 312: - 0CE5 53 db "S" ;only 18 bit (SP) - 313: - 0CE6 50 db "P" ;only 18 bit (SP) + 305: - 0D71 dasm_printRegister8_table: + 306: - 0D71 42 db "B" + 307: - 0D72 43 db "C" + 308: - 0D73 44 db "D" + 309: - 0D74 45 db "E" + 310: - 0D75 48 db "H" + 311: - 0D76 4C db "L" + 312: - 0D77 53 db "S" ;only 18 bit (SP) + 313: - 0D78 50 db "P" ;only 18 bit (SP) 314: - 315: - 0CE7 dasm_printRegisterIX_table: - 316: - 0CE7 4243 db "BC" - 317: - 0CE9 4445 db "DE" - 318: - 0CEB 4958 db "IX" - 319: - 0CED 5350 db "SP" - 320: - 0CEF dasm_printRegisterIY_table: - 321: - 0CEF 4243 db "BC" - 322: - 0CF1 4445 db "DE" - 323: - 0CF3 4959 db "IY" - 324: - 0CF5 5350 db "SP" + 315: - 0D79 dasm_printRegisterIX_table: + 316: - 0D79 4243 db "BC" + 317: - 0D7B 4445 db "DE" + 318: - 0D7D 4958 db "IX" + 319: - 0D7F 5350 db "SP" + 320: - 0D81 dasm_printRegisterIY_table: + 321: - 0D81 4243 db "BC" + 322: - 0D83 4445 db "DE" + 323: - 0D85 4959 db "IY" + 324: - 0D87 5350 db "SP" 325: - 326: - 0CF7 dasm_printRegisterSP_table: - 327: - 0CF7 4243 db "BC" - 328: - 0CF9 4445 db "DE" - 329: - 0CFB 484C db "HL" - 330: - 0CFD 4146 db "AF" + 326: - 0D89 dasm_printRegisterSP_table: + 327: - 0D89 4243 db "BC" + 328: - 0D8B 4445 db "DE" + 329: - 0D8D 484C db "HL" + 330: - 0D8F 4146 db "AF" 331: - 332: - 0CFF dasm_printRegister8_table_HL: + 332: - 0D91 dasm_printRegister8_table_HL: **** main.asm **** - 171: - 0CFF 28484C29 db "(HL)", 0 + 175: - 0D91 28484C29 db "(HL)", 0 00 - 172: .include "rst.s" + 176: .include "rst.s" **** include/rst.s **** - 1: - 0D04 EXEC_RST_08: - 2: 5949+17 0D04 CDD700 call print_char - 3: 5966+10 0D07 C9 ret + 1: - 0D96 EXEC_RST_08: + 2: 6720+17 0D96 CDDE00 call print_char + 3: 6737+10 0D99 C9 ret 4: 5: - 6: - 0D08 EXEC_RST_10: - 7: 5976+11 0D08 C5 push bc - 8: 5987+11 0D09 D5 push de - 9: 5998+11 0D0A E5 push hl + 6: - 0D9A EXEC_RST_10: + 7: 6747+11 0D9A C5 push bc + 8: 6758+11 0D9B D5 push de + 9: 6769+11 0D9C E5 push hl 10: ;call vdp_cursor_on - 11: 6009+17 0D0B CD1F01 call read_char - 12: 6026+11 0D0E F5 push af + 11: 6780+17 0D9D CD2601 call read_char + 12: 6797+11 0DA0 F5 push af 13: ;call vdp_cursor_off - 14: 6037+10 0D0F F1 pop af - 15: 6047+10 0D10 E1 pop hl - 16: 6057+10 0D11 D1 pop de - 17: 6067+10 0D12 C1 pop bc - 18: 6077+10 0D13 C9 ret + 14: 6808+10 0DA1 F1 pop af + 15: 6818+10 0DA2 E1 pop hl + 16: 6828+10 0DA3 D1 pop de + 17: 6838+10 0DA4 C1 pop bc + 18: 6848+10 0DA5 C9 ret 19: - 20: - 0D14 EXEC_RST_18: - 21: 6087+7 0D14 3E00 ld a,0 - 22: 6094+10 0D16 C9 ret + 20: - 0DA6 EXEC_RST_18: + 21: 6858+7 0DA6 3E00 ld a,0 + 22: 6865+10 0DA8 C9 ret **** main.asm **** - 173: .include "beep.s" + 177: .include "beep.s" **** include/beep.s **** 1: ;------------------------------------------------------------------------------ 2: ; beep @@ -1765,39 +1853,39 @@ 4: ; Beeps the speaker 5: ; DE sets duration 6: ;------------------------------------------------------------------------------ - 7: - 0D17 beep: - 8: 6104+11 0D17 F5 push AF - 9: 6115+11 0D18 D5 push DE - 10: - 0D19 beep_loop: - 11: 6126+7 0D19 3E08 LD A,0x08 - 12: 6133+11 0D1B D3F4 OUT (CS_PIO_AD), A - 13: 6144+17 0D1D CD2F0D CALL beep_pause - 14: 6161+7 0D20 3E00 LD A,0x00 - 15: 6168+11 0D22 D3F4 OUT (CS_PIO_AD), A - 16: 6179+17 0D24 CD2F0D CALL beep_pause - 17: 6196+6 0D27 1B DEC DE - 18: 6202+4 0D28 7A ld A,D - 19: 6206+4 0D29 B3 or E - 20: 6210+7+5 0D2A 20ED jr NZ, beep_loop - 21: 6217+10 0D2C D1 pop de - 22: 6227+10 0D2D F1 pop af - 23: 6237+10 0D2E C9 ret + 7: - 0DA9 beep: + 8: 6875+11 0DA9 F5 push AF + 9: 6886+11 0DAA D5 push DE + 10: - 0DAB beep_loop: + 11: 6897+7 0DAB 3E08 LD A,0x08 + 12: 6904+11 0DAD D3F4 OUT (CS_PIO_AD), A + 13: 6915+17 0DAF CDC10D CALL beep_pause + 14: 6932+7 0DB2 3E00 LD A,0x00 + 15: 6939+11 0DB4 D3F4 OUT (CS_PIO_AD), A + 16: 6950+17 0DB6 CDC10D CALL beep_pause + 17: 6967+6 0DB9 1B DEC DE + 18: 6973+4 0DBA 7A ld A,D + 19: 6977+4 0DBB B3 or E + 20: 6981+7+5 0DBC 20ED jr NZ, beep_loop + 21: 6988+10 0DBE D1 pop de + 22: 6998+10 0DBF F1 pop af + 23: 7008+10 0DC0 C9 ret 24: - 25: - 0D2F beep_pause: - 26: 6247+11 0D2F C5 PUSH BC - 27: - 0D30 _beep_pause_l1: + 25: - 0DC1 beep_pause: + 26: 7018+11 0DC1 C5 PUSH BC + 27: - 0DC2 _beep_pause_l1: 28: ;NEG ; 8 T-states 29: ;NEG ; 8 T-states - 30: 6258+8 0D30 ED44 NEG ; 8 T-states - 31: 6266+8 0D32 ED44 NEG ; 8 T-states - 32: 6274+6 0D34 0B DEC BC ; 6 T-states - 33: 6280+4 0D35 79 LD A,C ; 9 T-states - 34: 6284+4 0D36 B0 OR B ; 4 T-states - 35: 6288+10 0D37 C2300D JP NZ,_beep_pause_l1 ; 10 T-states - 36: 6298+10 0D3A C1 POP BC + 30: 7029+8 0DC2 ED44 NEG ; 8 T-states + 31: 7037+8 0DC4 ED44 NEG ; 8 T-states + 32: 7045+6 0DC6 0B DEC BC ; 6 T-states + 33: 7051+4 0DC7 79 LD A,C ; 9 T-states + 34: 7055+4 0DC8 B0 OR B ; 4 T-states + 35: 7059+10 0DC9 C2C20D JP NZ,_beep_pause_l1 ; 10 T-states + 36: 7069+10 0DCC C1 POP BC **** main.asm **** - 174: 6308+10 0D3B C9 RET ; Pause complete, RETurn - 175: .include "kdrv_ide8255.s" ;include ide interface driver. + 178: 7079+10 0DCD C9 RET ; Pause complete, RETurn + 179: .include "kdrv_ide8255.s" ;include ide interface driver. **** include/kdrv_ide8255.s **** 1: ;---------------------------------------------------------------- 2: ;BIOS Driver for IDE Interface 82C55 @@ -1848,16 +1936,16 @@ 47: ; 48: ; resets drives on bus 49: ;------------------------------------------------------------------------------ - 50: - 0D3C ide_reset: + 50: - 0DCE ide_reset: 51: - 52: 6318+7 0D3C 3E80 LD A, 10000000b ;CommandByte-A, Mode 0, PA Out, PC Out, PB Out - 53: 6325+11 0D3E D333 OUT (CS_PIA_CR), A ;Set Data direction to out - 54: 6336+7 0D40 3E80 LD A, IDE_RST - 55: 6343+11 0D42 D332 OUT (CS_PIA_PC), A ;Reset IDE Device - 56: 6354+4 0D44 00 NOP - 57: 6358+4 0D45 AF XOR A - 58: 6362+11 0D46 D332 OUT (CS_PIA_PC), A ;end device reset - 59: 6373+10 0D48 C9 RET + 52: 7089+7 0DCE 3E80 LD A, 10000000b ;CommandByte-A, Mode 0, PA Out, PC Out, PB Out + 53: 7096+11 0DD0 D333 OUT (CS_PIA_CR), A ;Set Data direction to out + 54: 7107+7 0DD2 3E80 LD A, IDE_RST + 55: 7114+11 0DD4 D332 OUT (CS_PIA_PC), A ;Reset IDE Device + 56: 7125+4 0DD6 00 NOP + 57: 7129+4 0DD7 AF XOR A + 58: 7133+11 0DD8 D332 OUT (CS_PIA_PC), A ;end device reset + 59: 7144+10 0DDA C9 RET 60: 61: 62: ;------------------------------------------------------------------------------ @@ -1867,28 +1955,28 @@ 66: ; A contains DATA 67: ; B contains register number 68: ;------------------------------------------------------------------------------ - 69: - 0D49 ide_regwrite_8: - 70: 6383+11 0D49 F5 PUSH AF ;store date to stack + 69: - 0DDB ide_regwrite_8: + 70: 7154+11 0DDB F5 PUSH AF ;store date to stack 71: ; Prepare PIA Data Direction - 72: 6394+7 0D4A 3E80 LD A, 10000000b ;CommandByte-A, Mode 0, PA Out, PC Out, PB Out - 73: 6401+11 0D4C D333 OUT (CS_PIA_CR), A ;Set Data direction to out + 72: 7165+7 0DDC 3E80 LD A, 10000000b ;CommandByte-A, Mode 0, PA Out, PC Out, PB Out + 73: 7172+11 0DDE D333 OUT (CS_PIA_CR), A ;Set Data direction to out 74: ; Write Data out - 75: 6412+10 0D4E F1 POP AF - 76: 6422+11 0D4F D330 OUT (CS_PIA_PA), A ;Write Data to bit 0-7 + 75: 7183+10 0DE0 F1 POP AF + 76: 7193+11 0DE1 D330 OUT (CS_PIA_PA), A ;Write Data to bit 0-7 77: ;Prepare Address - 78: 6433+4 0D51 78 LD A, B ;Load register address - 79: 6437+7 0D52 E61F AND 00011111b ;Mask unused bits - 80: 6444+11 0D54 D332 OUT (CS_PIA_PC), A ;Write Data to bit controll lines - 81: 6455+7 0D56 F620 OR IDE_WR ;Set Write bit - 82: 6462+11 0D58 D332 OUT (CS_PIA_PC), A ;Set write signal - 83: 6473+4 0D5A 00 NOP ;delay to wait for processing - 84: 6477+4 0D5B 78 LD A, B ;Load register address - 85: 6481+7 0D5C E61F AND 00011111b ;Mask unused bits - 86: 6488+11 0D5E D332 OUT (CS_PIA_PC), A ;disable write signal - 87: 6499+4 0D60 00 NOP - 88: 6503+4 0D61 AF XOR A ;clear register A - 89: 6507+11 0D62 D332 OUT (CS_PIA_PC), A ;clear controll lines - 90: 6518+10 0D64 C9 RET + 78: 7204+4 0DE3 78 LD A, B ;Load register address + 79: 7208+7 0DE4 E61F AND 00011111b ;Mask unused bits + 80: 7215+11 0DE6 D332 OUT (CS_PIA_PC), A ;Write Data to bit controll lines + 81: 7226+7 0DE8 F620 OR IDE_WR ;Set Write bit + 82: 7233+11 0DEA D332 OUT (CS_PIA_PC), A ;Set write signal + 83: 7244+4 0DEC 00 NOP ;delay to wait for processing + 84: 7248+4 0DED 78 LD A, B ;Load register address + 85: 7252+7 0DEE E61F AND 00011111b ;Mask unused bits + 86: 7259+11 0DF0 D332 OUT (CS_PIA_PC), A ;disable write signal + 87: 7270+4 0DF2 00 NOP + 88: 7274+4 0DF3 AF XOR A ;clear register A + 89: 7278+11 0DF4 D332 OUT (CS_PIA_PC), A ;clear controll lines + 90: 7289+10 0DF6 C9 RET 91: 92: 93: ;------------------------------------------------------------------------------ @@ -1898,30 +1986,30 @@ 97: ; B contains register number 98: ; A returns data 99: ;------------------------------------------------------------------------------ - 100: - 0D65 ide_regread_8: - 101: 6528+7 0D65 3E92 LD A, 10010010b ;CommandByte-A, Mode 0, PA IN, PC Out, PB IN - 102: 6535+11 0D67 D333 OUT (CS_PIA_CR), A ;Set Data direction to in + 100: - 0DF7 ide_regread_8: + 101: 7299+7 0DF7 3E92 LD A, 10010010b ;CommandByte-A, Mode 0, PA IN, PC Out, PB IN + 102: 7306+11 0DF9 D333 OUT (CS_PIA_CR), A ;Set Data direction to in 103: ;Prepare Address - 104: 6546+4 0D69 78 LD A, B ;Load register address - 105: 6550+7 0D6A E61F AND 00011111b ;Mask unused bits - 106: 6557+11 0D6C D332 OUT (CS_PIA_PC), A ;Write Data to bit controll lines - 107: 6568+7 0D6E F640 OR IDE_RD ;Set Write bit - 108: 6575+11 0D70 D332 OUT (CS_PIA_PC), A ;Write Data to bit controll lines - 109: 6586+4 0D72 00 NOP ;delay to wait for processing - 110: 6590+11 0D73 F5 PUSH AF - 111: 6601+10 0D74 F1 POP AF - 112: 6611+11 0D75 F5 PUSH AF - 113: 6622+10 0D76 F1 POP AF - 114: 6632+11 0D77 F5 PUSH AF - 115: 6643+10 0D78 F1 POP AF - 116: 6653+11 0D79 F5 PUSH AF - 117: 6664+10 0D7A F1 POP AF - 118: 6674+11 0D7B DB30 IN A,(CS_PIA_PA) ;read data from ide device to b (because a is used later) - 119: 6685+11 0D7D F5 PUSH AF - 120: 6696+4 0D7E AF XOR A ;clear register A - 121: 6700+11 0D7F D332 OUT (CS_PIA_PC), A ;clear controll lines - 122: 6711+10 0D81 F1 POP AF ;put data in accumulator - 123: 6721+10 0D82 C9 RET + 104: 7317+4 0DFB 78 LD A, B ;Load register address + 105: 7321+7 0DFC E61F AND 00011111b ;Mask unused bits + 106: 7328+11 0DFE D332 OUT (CS_PIA_PC), A ;Write Data to bit controll lines + 107: 7339+7 0E00 F640 OR IDE_RD ;Set Write bit + 108: 7346+11 0E02 D332 OUT (CS_PIA_PC), A ;Write Data to bit controll lines + 109: 7357+4 0E04 00 NOP ;delay to wait for processing + 110: 7361+11 0E05 F5 PUSH AF + 111: 7372+10 0E06 F1 POP AF + 112: 7382+11 0E07 F5 PUSH AF + 113: 7393+10 0E08 F1 POP AF + 114: 7403+11 0E09 F5 PUSH AF + 115: 7414+10 0E0A F1 POP AF + 116: 7424+11 0E0B F5 PUSH AF + 117: 7435+10 0E0C F1 POP AF + 118: 7445+11 0E0D DB30 IN A,(CS_PIA_PA) ;read data from ide device to b (because a is used later) + 119: 7456+11 0E0F F5 PUSH AF + 120: 7467+4 0E10 AF XOR A ;clear register A + 121: 7471+11 0E11 D332 OUT (CS_PIA_PC), A ;clear controll lines + 122: 7482+10 0E13 F1 POP AF ;put data in accumulator + 123: 7492+10 0E14 C9 RET 124: 125: 126: ;------------------------------------------------------------------------------ @@ -1930,136 +2018,131 @@ 129: ; Reads IDE Data 130: ; HL contains destination address 131: ;------------------------------------------------------------------------------ - 132: - 0D83 ide_readsector_256: - 133: 6731+7 0D83 0EFF LD C,255 ;Setup counter for 256 words + 132: - 0E15 ide_readsector_256: + 133: 7502+7 0E15 0E00 LD C,0 ;Setup counter for 256 words 134: - 135: - 0D85 ide_readsector_256_waitloop: - 136: 6738+7 0D85 060F LD B, IDE_REG_CMDSTS - 137: 6745+17 0D87 CD650D CALL ide_regread_8 - 138: 6762+8 0D8A CB47 BIT 0,a ;Error Bit set. - 139: 6770+10 0D8C C2040E JP NZ, ide_printerror - 140: 6780+8 0D8F CB5F BIT 3,a ;DRQ Bit set. If set, disk has data - 141: 6788+7+5 0D91 28F2 JR Z, ide_readsector_256_waitloop ;If not set, wait + 135: - 0E17 ide_readsector_256_waitloop: + 136: 7509+7 0E17 060F LD B, IDE_REG_CMDSTS + 137: 7516+17 0E19 CDF70D CALL ide_regread_8 + 138: 7533+8 0E1C CB47 BIT 0,a ;Error Bit set. + 139: 7541+10 0E1E C2890E JP NZ, ide_printerror + 140: 7551+8 0E21 CB5F BIT 3,a ;DRQ Bit set. If set, disk has data + 141: 7559+7+5 0E23 28F2 JR Z, ide_readsector_256_waitloop ;If not set, wait 142: - 143: 6795+7 0D93 3E92 LD A, 10010010b ;CommandByte-A, Mode 0, PA IN, PC Out, PB IN - 144: 6802+11 0D95 D333 OUT (CS_PIA_CR), A ;Set Data direction to IN - 145: 6813+7 0D97 3E08 LD A, IDE_REG_DATA ;CS0 and A=0 -> I/O register - 146: 6820+11 0D99 D332 OUT (CS_PIA_PC), A ;set register - 147: 6831+7 0D9B F640 OR IDE_RD ;Set Read bit - 148: 6838+11 0D9D D332 OUT (CS_PIA_PC), A ;Write Read to bit controll lines - 149: 6849+4 0D9F 00 NOP - 150: 6853+4 0DA0 00 NOP - 151: 6857+4 0DA1 00 NOP - 152: 6861+11 0DA2 DB31 IN A,(CS_PIA_PB) ;Load 16-Bit data to buffer - 153: 6872+7 0DA4 77 LD (HL), A - 154: 6879+6 0DA5 23 INC HL - 155: 6885+11 0DA6 DB30 IN A,(CS_PIA_PA) - 156: 6896+7 0DA8 77 LD (HL), A - 157: 6903+6 0DA9 23 INC HL - 158: - 159: 6909+4 0DAA 79 LD A,C - 160: 6913+4 0DAB B7 OR A - 161: 6917+10 0DAC CAB20D JP Z,ide_readsector_256_done - 162: 6927+4 0DAF 0D DEC C - 163: 6931+12 0DB0 18D3 JR ide_readsector_256_waitloop - 164: - 165: - 0DB2 ide_readsector_256_done: - 166: 6943+10 0DB2 C9 RET - 167: - 168: - 0DB3 ide_readsector_512_inv: - 169: 6953+7 0DB3 0EFF LD C,255 ;Setup counter for 256 words - 170: 6960+10 0DB5 110010 LD DE, 4096 ;Timeout counter - 171: - 0DB8 ide_readsector_512_inv_waitloop: - 172: 6970+6 0DB8 1B DEC DE - 173: 6976+4 0DB9 7A LD A,D - 174: 6980+4 0DBA B3 OR E - 175: 6984+10 0DBB CAEE0D JP Z, ide_readsector_timeout - 176: 6994+7 0DBE 060F LD B, IDE_REG_CMDSTS - 177: 7001+17 0DC0 CD650D CALL ide_regread_8 - 178: 7018+8 0DC3 CB47 BIT 0,a ;Error Bit set. - 179: 7026+10 0DC5 C2040E JP NZ, ide_printerror - 180: 7036+8 0DC8 CB5F BIT 3,a ;DRQ Bit set. If set, disk has data - 181: 7044+7+5 0DCA 28EC JR Z, ide_readsector_512_inv_waitloop ;If not set, wait - 182: 7051+10 0DCC 110008 LD DE, 2048 ;Timeout counter - 183: 7061+7 0DCF 3E92 LD A, 10010010b ;CommandByte-A, Mode 0, PA IN, PC Out, PB IN - 184: 7068+11 0DD1 D333 OUT (CS_PIA_CR), A ;Set Data direction to IN - 185: 7079+7 0DD3 3E08 LD A, IDE_REG_DATA ;CS0 and A=0 -> I/O register - 186: 7086+11 0DD5 D332 OUT (CS_PIA_PC), A ;set register - 187: 7097+7 0DD7 F640 OR IDE_RD ;Set Read bit - 188: 7104+11 0DD9 D332 OUT (CS_PIA_PC), A ;Write Read to bit controll lines - 189: 7115+4 0DDB 00 NOP - 190: 7119+4 0DDC 00 NOP - 191: 7123+4 0DDD 00 NOP - 192: 7127+11 0DDE DB30 IN A,(CS_PIA_PA) ;Load 16-Bit data to buffer - 193: 7138+7 0DE0 77 LD (HL), A - 194: 7145+6 0DE1 23 INC HL - 195: 7151+11 0DE2 DB31 IN A,(CS_PIA_PB) - 196: 7162+7 0DE4 77 LD (HL), A - 197: 7169+6 0DE5 23 INC HL - 198: - 199: 7175+4 0DE6 79 LD A,C - 200: 7179+4 0DE7 B7 OR A - 201: 7183+10 0DE8 CAB20D JP Z,ide_readsector_256_done - 202: 7193+4 0DEB 0D DEC C - 203: 7197+12 0DEC 18CA JR ide_readsector_512_inv_waitloop - 204: - 205: - 0DEE ide_readsector_timeout: - 206: 7209+10 0DEE 21660E LD HL, [str_error_time] - 207: 7219+17 0DF1 CDDF00 CALL print_str - 208: 7236+4 0DF4 79 LD A, C - 209: 7240+17 0DF5 CD0701 CALL print_a_hex - 210: 7257+7 0DF8 3E0A LD A,10 - 211: 7264+17 0DFA CDD700 CALL print_char - 212: 7281+7 0DFD 3E0D LD A,13 - 213: 7288+17 0DFF CDD700 CALL print_char - 214: 7305+10 0E02 C9 RET - 215: - 216: - 217: - 218: + 143: 7566+7 0E25 3E92 LD A, 10010010b ;CommandByte-A, Mode 0, PA IN, PC Out, PB IN + 144: 7573+11 0E27 D333 OUT (CS_PIA_CR), A ;Set Data direction to IN + 145: 7584+7 0E29 3E08 LD A, IDE_REG_DATA ;CS0 and A=0 -> I/O register + 146: 7591+11 0E2B D332 OUT (CS_PIA_PC), A ;set register + 147: 7602+7 0E2D F640 OR IDE_RD ;Set Read bit + 148: 7609+11 0E2F D332 OUT (CS_PIA_PC), A ;Write Read to bit controll lines + 149: 7620+4 0E31 00 NOP + 150: ;NOP + 151: ;NOP + 152: 7624+11 0E32 DB31 IN A,(CS_PIA_PB) ;Load 16-Bit data to buffer + 153: 7635+7 0E34 77 LD (HL), A + 154: 7642+6 0E35 23 INC HL + 155: 7648+11 0E36 DB30 IN A,(CS_PIA_PA) + 156: 7659+7 0E38 77 LD (HL), A + 157: 7666+6 0E39 23 INC HL + 158: 7672+4 0E3A 0D DEC C + 159: 7676+5+6 0E3B C8 RET Z + 160: 7681+12 0E3C 18D9 JR ide_readsector_256_waitloop + 161: + 162: - 0E3E ide_readsector_512_inv: + 163: 7693+7 0E3E 0E00 LD C,0 ;Setup counter for 256 words + 164: 7700+10 0E40 110010 LD DE, 4096 ;Timeout counter + 165: - 0E43 ide_readsector_512_inv_waitloop: + 166: 7710+6 0E43 1B DEC DE + 167: 7716+4 0E44 7A LD A,D + 168: 7720+4 0E45 B3 OR E + 169: 7724+10 0E46 CA730E JP Z, ide_readsector_timeout + 170: ;timeout checked. continue + 171: 7734+7 0E49 060F LD B, IDE_REG_CMDSTS + 172: 7741+17 0E4B CDF70D CALL ide_regread_8 + 173: 7758+8 0E4E CB47 BIT 0,a ;Error Bit set. + 174: 7766+10 0E50 C2890E JP NZ, ide_printerror + 175: 7776+8 0E53 CB5F BIT 3,a ;DRQ Bit set. If set, disk has data + 176: 7784+7+5 0E55 28EC JR Z, ide_readsector_512_inv_waitloop ;If not set, wait + 177: 7791+10 0E57 110008 LD DE, 2048 ;Timeout counter + 178: + 179: 7801+7 0E5A 3E92 LD A, 10010010b ;CommandByte-A, Mode 0, PA IN, PC Out, PB IN + 180: 7808+11 0E5C D333 OUT (CS_PIA_CR), A ;Set Data direction to IN + 181: 7819+7 0E5E 3E08 LD A, IDE_REG_DATA ;CS0 and A=0 -> I/O register + 182: 7826+11 0E60 D332 OUT (CS_PIA_PC), A ;set register + 183: 7837+7 0E62 F640 OR IDE_RD ;Set Read bit + 184: 7844+11 0E64 D332 OUT (CS_PIA_PC), A ;Write Read to bit controll lines + 185: ;NOP + 186: ;NOP + 187: 7855+4 0E66 00 NOP + 188: + 189: 7859+11 0E67 DB30 IN A,(CS_PIA_PA) ;Load 16-Bit data to buffer + 190: 7870+7 0E69 77 LD (HL), A + 191: 7877+6 0E6A 23 INC HL + 192: 7883+11 0E6B DB31 IN A,(CS_PIA_PB) + 193: 7894+7 0E6D 77 LD (HL), A + 194: 7901+6 0E6E 23 INC HL + 195: + 196: 7907+4 0E6F 0D DEC C + 197: 7911+5+6 0E70 C8 RET Z + 198: 7916+12 0E71 18D0 JR ide_readsector_512_inv_waitloop + 199: + 200: - 0E73 ide_readsector_timeout: + 201: 7928+10 0E73 21EB0E LD HL, [str_error_time] + 202: 7938+17 0E76 CDE600 CALL print_str + 203: 7955+4 0E79 79 LD A, C + 204: 7959+17 0E7A CD0E01 CALL print_a_hex + 205: 7976+7 0E7D 3E0A LD A,10 + 206: 7983+17 0E7F CDDE00 CALL print_char + 207: 8000+7 0E82 3E0D LD A,13 + 208: 8007+17 0E84 CDDE00 CALL print_char + 209: 8024+10 0E87 C9 RET + 210: + 211: + 212: + 213: + 214: ;------------------------------------------------------------------------------ + 215: ; ide_writesector_256 + 216: ; + 217: ; Writes 512 bytes (256 words) of IDE Data + 218: ; HL contains data start address 219: ;------------------------------------------------------------------------------ - 220: ; ide_writesector_256 - 221: ; - 222: ; Writes 512 bytes (256 words) of IDE Data - 223: ; HL contains data start address - 224: ;------------------------------------------------------------------------------ - 225: - 0E03 ide_writesector_256: - 226: 7315+10 0E03 C9 RET ;NOT IMPLEMENTED + 220: - 0E88 ide_writesector_256: + 221: 8034+10 0E88 C9 RET ;NOT IMPLEMENTED + 222: + 223: + 224: ;================================================================ + 225: ; utility functions + 226: ;================================================================ 227: - 228: - 229: ;================================================================ - 230: ; utility functions - 231: ;================================================================ - 232: - 233: ;------------------------------------------------------------------------------ - 234: ; ide_printerror - 235: ; - 236: ; prints IDE error to console - 237: ;------------------------------------------------------------------------------ - 238: - 0E04 ide_printerror: - 239: 7325+10 0E04 21370E LD HL, [str_error_start] - 240: 7335+17 0E07 CDDF00 CALL print_str - 241: 7352+7 0E0A 060F LD B, IDE_REG_CMDSTS - 242: 7359+17 0E0C CD650D CALL ide_regread_8 - 243: 7376+17 0E0F CD0701 CALL print_a_hex - 244: 7393+10 0E12 21540E LD HL, [str_error_start1] - 245: 7403+17 0E15 CDDF00 CALL print_str - 246: 7420+13 0E18 3A2C40 LD A,(MEM_IDE_DEVICE) - 247: 7433+17 0E1B CD0701 CALL print_a_hex - 248: 7450+10 0E1E 215D0E LD HL, [str_error_start2] - 249: 7460+17 0E21 CDDF00 CALL print_str - 250: 7477+7 0E24 0609 LD B, IDE_REG_ERROR - 251: 7484+17 0E26 CD650D CALL ide_regread_8 - 252: 7501+17 0E29 CD0701 CALL print_a_hex - 253: 7518+7 0E2C 3E0A LD A,10 - 254: 7525+17 0E2E CDD700 CALL print_char - 255: 7542+7 0E31 3E0D LD A,13 - 256: 7549+17 0E33 CDD700 CALL print_char - 257: - 258: 7566+10 0E36 C9 RET - 259: - 260: - 0E37 str_error_start: - 261: - 0E37 0D0A4469 db 13,10,"Disk I/O error. Status: 0x",0 + 228: ;------------------------------------------------------------------------------ + 229: ; ide_printerror + 230: ; + 231: ; prints IDE error to console + 232: ;------------------------------------------------------------------------------ + 233: - 0E89 ide_printerror: + 234: 8044+10 0E89 21BC0E LD HL, [str_error_start] + 235: 8054+17 0E8C CDE600 CALL print_str + 236: 8071+7 0E8F 060F LD B, IDE_REG_CMDSTS + 237: 8078+17 0E91 CDF70D CALL ide_regread_8 + 238: 8095+17 0E94 CD0E01 CALL print_a_hex + 239: 8112+10 0E97 21D90E LD HL, [str_error_start1] + 240: 8122+17 0E9A CDE600 CALL print_str + 241: 8139+13 0E9D 3ACB40 LD A,(MEM_IDE_DEVICE) + 242: 8152+17 0EA0 CD0E01 CALL print_a_hex + 243: 8169+10 0EA3 21E20E LD HL, [str_error_start2] + 244: 8179+17 0EA6 CDE600 CALL print_str + 245: 8196+7 0EA9 0609 LD B, IDE_REG_ERROR + 246: 8203+17 0EAB CDF70D CALL ide_regread_8 + 247: 8220+17 0EAE CD0E01 CALL print_a_hex + 248: 8237+7 0EB1 3E0A LD A,10 + 249: 8244+17 0EB3 CDDE00 CALL print_char + 250: 8261+7 0EB6 3E0D LD A,13 + 251: 8268+17 0EB8 CDDE00 CALL print_char + 252: + 253: 8285+10 0EBB C9 RET + 254: + 255: - 0EBC str_error_start: + 256: - 0EBC 0D0A4469 db 13,10,"Disk I/O error. Status: 0x",0 736B2049 2F4F2065 72726F72 @@ -2067,17 +2150,17 @@ 61747573 3A203078 00 - 262: - 0E54 str_error_start1: - 263: - 0E54 20446576 db " Dev: 0x",0 + 257: - 0ED9 str_error_start1: + 258: - 0ED9 20446576 db " Dev: 0x",0 3A203078 00 - 264: - 0E5D str_error_start2: - 265: - 0E5D 20457272 db " Err: 0x",0 + 259: - 0EE2 str_error_start2: + 260: - 0EE2 20457272 db " Err: 0x",0 3A203078 00 - 266: - 267: - 0E66 str_error_time: - 268: - 0E66 0D0A4469 db 13,10,"Disk I/O error. Data timeout @ 0x",0 + 261: + 262: - 0EEB str_error_time: + 263: - 0EEB 0D0A4469 db 13,10,"Disk I/O error. Data timeout @ 0x",0 736B2049 2F4F2065 72726F72 @@ -2087,7 +2170,7 @@ 75742040 20307800 **** main.asm **** - 176: .include "kdrv_ideif.s" ;include ide driver. + 180: .include "kdrv_ideif.s" ;include ide driver. **** include/kdrv_ideif.s **** 1: ;---------------------------------------------------------------- 2: ;BIOS Driver for IDE Access @@ -2103,32 +2186,32 @@ 12: ;================================================================ 13: ; IDE Variables 14: ;================================================================ - 15: - 402C phase var_idebuffer - 16: - 402C MEM_IDE_DEVICE: - 17: - 402C ..402C 00 defs 1 - 18: - 402D MEM_IDE_STATUS: - 19: - 402D ..402D 00 defs 1 ;1Byte: 0x00 if status is okay - 20: - 402E MEM_IDE_PARTITION: - 21: - 402E ..4031 00 defs 4 ;4*16Bytes: LBA first sector - 22: - 4032 MEM_IDE_POINTER: - 23: - 4032 ..4035 00 defs 4 ;4*16Bytes: LBA first sector - 24: - 4036 MEM_IDE_DEV_TABLE: - 25: - 4036 ..4075 00 defs 16*4 - 26: - 4076 MEM_IDE_SELECTED: - 27: - 4076 ..4076 00 defs 1 - 28: - 4077 MEM_IDE_STRING_0: - 29: - 4077 ..409E 00 defs 40 - 30: - 409F MEM_IDE_STRING_1: - 31: - 409F ..40C6 00 defs 40 - 32: - 40C7 MEM_IDE_STRING_2: - 33: - 40C7 ..40EE 00 defs 40 - 34: - 40EF MEM_IDE_STRING_3: - 35: - 40EF ..4116 00 defs 40 - 36: - 4117 MEM_IDE_BUFFER: - 37: - 4117 ..4316 00 defs 512 - 38: - 4317 MEM_IDE_FSBUFFER: - 39: - 4317 ..4416 00 defs 256 - 40: - 1275 dephase + 15: - 40CB phase var_idebuffer + 16: - 40CB MEM_IDE_DEVICE: + 17: - 40CB ..40CB 00 defs 1 + 18: - 40CC MEM_IDE_STATUS: + 19: - 40CC ..40CC 00 defs 1 ;1Byte: 0x00 if status is okay + 20: - 40CD MEM_IDE_PARTITION: + 21: - 40CD ..40D0 00 defs 4 ;4*16Bytes: LBA first sector + 22: - 40D1 MEM_IDE_POINTER: + 23: - 40D1 ..40D4 00 defs 4 ;4*16Bytes: LBA first sector + 24: - 40D5 MEM_IDE_DEV_TABLE: + 25: - 40D5 ..4114 00 defs 16*4 + 26: - 4115 MEM_IDE_SELECTED: + 27: - 4115 ..4115 00 defs 1 + 28: - 4116 MEM_IDE_STRING_0: + 29: - 4116 ..413D 00 defs 40 + 30: - 413E MEM_IDE_STRING_1: + 31: - 413E ..4165 00 defs 40 + 32: - 4166 MEM_IDE_STRING_2: + 33: - 4166 ..418D 00 defs 40 + 34: - 418E MEM_IDE_STRING_3: + 35: - 418E ..41B5 00 defs 40 + 36: - 41B6 MEM_IDE_BUFFER: + 37: - 41B6 ..43B5 00 defs 512 + 38: - 43B6 MEM_IDE_FSBUFFER: + 39: - 43B6 ..44B5 00 defs 256 + 40: - 12FA dephase 41: ;DEV-Table layout 42: ; 0x00 0x00 43: ;Status: 0x00 -> Ready @@ -2138,23 +2221,23 @@ 47: ;Type: File system type 48: 49: - 50: - 1275 IDE_DEV_TABLE: - 51: - 1275 FF000000 db 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, [MEM_IDE_STRING_0], [MEM_IDE_STRING_0]>>8, 0x00, 0x00 + 50: - 12FA IDE_DEV_TABLE: + 51: - 12FA FF000000 db 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, [MEM_IDE_STRING_0], [MEM_IDE_STRING_0]>>8, 0x00, 0x00 00000000 00003000 - 77400000 - 52: - 1285 FF000000 db 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x01, [MEM_IDE_STRING_1], [MEM_IDE_STRING_1]>>8, 0x00, 0x00 + 16410000 + 52: - 130A FF000000 db 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x01, [MEM_IDE_STRING_1], [MEM_IDE_STRING_1]>>8, 0x00, 0x00 00000000 00003001 - 9F400000 - 53: - 1295 FF000000 db 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, [MEM_IDE_STRING_2], [MEM_IDE_STRING_2]>>8, 0x00, 0x00 + 3E410000 + 53: - 131A FF000000 db 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, [MEM_IDE_STRING_2], [MEM_IDE_STRING_2]>>8, 0x00, 0x00 00000000 00004000 - C7400000 - 54: - 12A5 FF000000 db 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x01, [MEM_IDE_STRING_3], [MEM_IDE_STRING_3]>>8, 0x00, 0x00 + 66410000 + 54: - 132A FF000000 db 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x01, [MEM_IDE_STRING_3], [MEM_IDE_STRING_3]>>8, 0x00, 0x00 00000000 00004001 - EF400000 + 8E410000 55: 56: ;================================================================ 57: ; IDE funtions @@ -2165,317 +2248,317 @@ 62: ; 63: ; initializes drive table 64: ;------------------------------------------------------------------------------ - 65: - 12B5 ideif_init_devtable: + 65: - 133A ideif_init_devtable: 66: ;copy default values to ram - 67: 7576+10 12B5 217512 ld hl,[IDE_DEV_TABLE] - 68: 7586+10 12B8 113640 ld de,[MEM_IDE_DEV_TABLE] - 69: 7596+10 12BB 014000 ld bc,16*4 - 70: 7606+16+5 12BE EDB0 ldir + 67: 8295+10 133A 21FA12 ld hl,[IDE_DEV_TABLE] + 68: 8305+10 133D 11D540 ld de,[MEM_IDE_DEV_TABLE] + 69: 8315+10 1340 014000 ld bc,16*4 + 70: 8325+16+5 1343 EDB0 ldir 71: ;set selected device - 72: 7622+7 12C0 3E00 ld a,0 - 73: 7629+13 12C2 327640 ld (MEM_IDE_SELECTED),a + 72: 8341+7 1345 3E00 ld a,0 + 73: 8348+13 1347 321541 ld (MEM_IDE_SELECTED),a 74: ;set empty names - 75: 7642+4 12C5 AF xor a - 76: 7646+13 12C6 327740 ld (MEM_IDE_STRING_0),a - 77: 7659+13 12C9 329F40 ld (MEM_IDE_STRING_1),a - 78: 7672+13 12CC 32C740 ld (MEM_IDE_STRING_2),a - 79: 7685+13 12CF 32EF40 ld (MEM_IDE_STRING_3),a - 80: 7698+10 12D2 C9 ret + 75: 8361+4 134A AF xor a + 76: 8365+13 134B 321641 ld (MEM_IDE_STRING_0),a + 77: 8378+13 134E 323E41 ld (MEM_IDE_STRING_1),a + 78: 8391+13 1351 326641 ld (MEM_IDE_STRING_2),a + 79: 8404+13 1354 328E41 ld (MEM_IDE_STRING_3),a + 80: 8417+10 1357 C9 ret 81: 82: ;------------------------------------------------------------------------------ 83: ; ideif_prnt_devtable 84: ; 85: ; prints drive table 86: ;------------------------------------------------------------------------------ - 87: - 12D3 ideif_prnt_devtable: - 88: 7708+17 12D3 CDF100 call print_newLine - 89: 7725+10 12D6 211015 ld hl,[_ideif_prnt_devtable_hdr] - 90: 7735+17 12D9 CDDF00 call print_str - 91: 7752+10 12DC 213640 ld hl,[MEM_IDE_DEV_TABLE] - 92: 7762+7 12DF 0600 ld b,0 ;device number - 93: - 12E1 _ideif_prnt_devtable_l1: ;loop 1 -> for each device + 87: - 1358 ideif_prnt_devtable: + 88: 8427+17 1358 CDF800 call print_newLine + 89: 8444+10 135B 21EB15 ld hl,[_ideif_prnt_devtable_hdr] + 90: 8454+17 135E CDE600 call print_str + 91: 8471+10 1361 21D540 ld hl,[MEM_IDE_DEV_TABLE] + 92: 8481+7 1364 0600 ld b,0 ;device number + 93: - 1366 _ideif_prnt_devtable_l1: ;loop 1 -> for each device 94: ;print if selected - 95: 7769+13 12E1 3A7640 ld a,(MEM_IDE_SELECTED) - 96: 7782+4 12E4 B8 cp b - 97: 7786+10 12E5 CAEC12 jp z,_ideif_prnt_devtable_l1_sel - 98: 7796+7 12E8 3E20 ld a, ' ' - 99: 7803+12 12EA 1802 jr _ideif_prnt_devtable_l1_nxt - 100: - 12EC _ideif_prnt_devtable_l1_sel: - 101: 7815+7 12EC 3E2A ld a, '*' - 102: - 12EE _ideif_prnt_devtable_l1_nxt: - 103: 7822+17 12EE CDD700 call print_char + 95: 8488+13 1366 3A1541 ld a,(MEM_IDE_SELECTED) + 96: 8501+4 1369 B8 cp b + 97: 8505+10 136A CA7113 jp z,_ideif_prnt_devtable_l1_sel + 98: 8515+7 136D 3E20 ld a, ' ' + 99: 8522+12 136F 1802 jr _ideif_prnt_devtable_l1_nxt + 100: - 1371 _ideif_prnt_devtable_l1_sel: + 101: 8534+7 1371 3E2A ld a, '*' + 102: - 1373 _ideif_prnt_devtable_l1_nxt: + 103: 8541+17 1373 CDDE00 call print_char 104: ;print drive letter - 105: 7839+4 12F1 78 ld a,b - 106: 7843+7 12F2 C645 add 69 ;offset letter to D - 107: 7850+17 12F4 CDD700 call print_char - 108: 7867+7 12F7 3E3A ld a, ':' - 109: 7874+17 12F9 CDD700 call print_char - 110: 7891+7 12FC 3E20 ld a, ' ' - 111: 7898+17 12FE CDD700 call print_char + 105: 8558+4 1376 78 ld a,b + 106: 8562+7 1377 C645 add 69 ;offset letter to D + 107: 8569+17 1379 CDDE00 call print_char + 108: 8586+7 137C 3E3A ld a, ':' + 109: 8593+17 137E CDDE00 call print_char + 110: 8610+7 1381 3E20 ld a, ' ' + 111: 8617+17 1383 CDDE00 call print_char 112: ;print status - 113: 7915+11 1301 E5 push hl - 114: 7926+7 1302 7E ld a,(HL) - 115: 7933+4 1303 B7 or a - 116: 7937+7+5 1304 280E jr z, _ideif_prnt_devtable_l1_s00 - 117: 7944+7 1306 FE01 cp 0x01 - 118: 7951+7+5 1308 280F jr z, _ideif_prnt_devtable_l1_s01 - 119: 7958+7 130A FE02 cp 0x02 - 120: 7965+7+5 130C 2810 jr z, _ideif_prnt_devtable_l1_s02 - 121: 7972+7 130E FEFF cp 0xFF - 122: 7979+7+5 1310 2811 jr z, _ideif_prnt_devtable_l1_sFF - 123: 7986+12 1312 180F jr _ideif_prnt_devtable_l1_sFF - 124: - 1314 _ideif_prnt_devtable_l1_s00 - 125: 7998+10 1314 214815 ld hl,[_ideif_prnt_devtable_s00] - 126: 8008+12 1317 180D jr _ideif_prnt_devtable_l1_es - 127: - 1319 _ideif_prnt_devtable_l1_s01 - 128: 8020+10 1319 215315 ld hl,[_ideif_prnt_devtable_s01] - 129: 8030+12 131C 1808 jr _ideif_prnt_devtable_l1_es - 130: - 131E _ideif_prnt_devtable_l1_s02 - 131: 8042+10 131E 215E15 ld hl,[_ideif_prnt_devtable_s02] - 132: 8052+12 1321 1803 jr _ideif_prnt_devtable_l1_es - 133: - 1323 _ideif_prnt_devtable_l1_sFF - 134: 8064+10 1323 216915 ld hl,[_ideif_prnt_devtable_sFF] - 135: - 1326 _ideif_prnt_devtable_l1_es - 136: 8074+17 1326 CDDF00 call print_str - 137: 8091+10 1329 E1 pop hl - 138: 8101+6 132A 23 inc hl + 113: 8634+11 1386 E5 push hl + 114: 8645+7 1387 7E ld a,(HL) + 115: 8652+4 1388 B7 or a + 116: 8656+7+5 1389 280E jr z, _ideif_prnt_devtable_l1_s00 + 117: 8663+7 138B FE01 cp 0x01 + 118: 8670+7+5 138D 280F jr z, _ideif_prnt_devtable_l1_s01 + 119: 8677+7 138F FE02 cp 0x02 + 120: 8684+7+5 1391 2810 jr z, _ideif_prnt_devtable_l1_s02 + 121: 8691+7 1393 FEFF cp 0xFF + 122: 8698+7+5 1395 2811 jr z, _ideif_prnt_devtable_l1_sFF + 123: 8705+12 1397 180F jr _ideif_prnt_devtable_l1_sFF + 124: - 1399 _ideif_prnt_devtable_l1_s00 + 125: 8717+10 1399 212316 ld hl,[_ideif_prnt_devtable_s00] + 126: 8727+12 139C 180D jr _ideif_prnt_devtable_l1_es + 127: - 139E _ideif_prnt_devtable_l1_s01 + 128: 8739+10 139E 212E16 ld hl,[_ideif_prnt_devtable_s01] + 129: 8749+12 13A1 1808 jr _ideif_prnt_devtable_l1_es + 130: - 13A3 _ideif_prnt_devtable_l1_s02 + 131: 8761+10 13A3 213916 ld hl,[_ideif_prnt_devtable_s02] + 132: 8771+12 13A6 1803 jr _ideif_prnt_devtable_l1_es + 133: - 13A8 _ideif_prnt_devtable_l1_sFF + 134: 8783+10 13A8 214416 ld hl,[_ideif_prnt_devtable_sFF] + 135: - 13AB _ideif_prnt_devtable_l1_es + 136: 8793+17 13AB CDE600 call print_str + 137: 8810+10 13AE E1 pop hl + 138: 8820+6 13AF 23 inc hl 139: ;print FS-Type - 140: 8107+7 132B 3E30 ld a,'0' - 141: 8114+17 132D CDD700 call print_char - 142: 8131+7 1330 3E78 ld a,'x' - 143: 8138+17 1332 CDD700 call print_char - 144: 8155+7 1335 7E ld a,(HL) - 145: 8162+17 1336 CD0701 call print_a_hex - 146: 8179+7 1339 3E20 ld a,' ' - 147: 8186+17 133B CDD700 call print_char - 148: 8203+6 133E 23 inc hl + 140: 8826+7 13B0 3E30 ld a,'0' + 141: 8833+17 13B2 CDDE00 call print_char + 142: 8850+7 13B5 3E78 ld a,'x' + 143: 8857+17 13B7 CDDE00 call print_char + 144: 8874+7 13BA 7E ld a,(HL) + 145: 8881+17 13BB CD0E01 call print_a_hex + 146: 8898+7 13BE 3E20 ld a,' ' + 147: 8905+17 13C0 CDDE00 call print_char + 148: 8922+6 13C3 23 inc hl 149: ;print first sector - 150: 8209+11 133F E5 push hl - 151: 8220+14 1340 DDE1 pop ix + 150: 8928+11 13C4 E5 push hl + 151: 8939+14 13C5 DDE1 pop ix 152: - 153: 8234+6 1342 23 inc hl - 154: 8240+6 1343 23 inc hl - 155: 8246+6 1344 23 inc hl - 156: 8252+6 1345 23 inc hl - 157: 8258+6 1346 23 inc hl - 158: 8264+6 1347 23 inc hl - 159: 8270+6 1348 23 inc hl - 160: 8276+6 1349 23 inc hl + 153: 8953+6 13C7 23 inc hl + 154: 8959+6 13C8 23 inc hl + 155: 8965+6 13C9 23 inc hl + 156: 8971+6 13CA 23 inc hl + 157: 8977+6 13CB 23 inc hl + 158: 8983+6 13CC 23 inc hl + 159: 8989+6 13CD 23 inc hl + 160: 8995+6 13CE 23 inc hl 161: - 162: 8282+19 134A DD7E03 ld a,(ix+3) - 163: 8301+17 134D CD0701 call print_a_hex - 164: 8318+19 1350 DD7E02 ld a,(ix+2) - 165: 8337+17 1353 CD0701 call print_a_hex - 166: 8354+19 1356 DD7E01 ld a,(ix+1) - 167: 8373+17 1359 CD0701 call print_a_hex - 168: 8390+19 135C DD7E00 ld a,(ix+0) - 169: 8409+17 135F CD0701 call print_a_hex - 170: 8426+7 1362 3E20 ld a,' ' - 171: 8433+17 1364 CDD700 call print_char + 162: 9001+19 13CF DD7E03 ld a,(ix+3) + 163: 9020+17 13D2 CD0E01 call print_a_hex + 164: 9037+19 13D5 DD7E02 ld a,(ix+2) + 165: 9056+17 13D8 CD0E01 call print_a_hex + 166: 9073+19 13DB DD7E01 ld a,(ix+1) + 167: 9092+17 13DE CD0E01 call print_a_hex + 168: 9109+19 13E1 DD7E00 ld a,(ix+0) + 169: 9128+17 13E4 CD0E01 call print_a_hex + 170: 9145+7 13E7 3E20 ld a,' ' + 171: 9152+17 13E9 CDDE00 call print_char 172: ;print length - 173: 8450+19 1367 DD7E07 ld a,(ix+7) - 174: 8469+17 136A CD0701 call print_a_hex - 175: 8486+19 136D DD7E06 ld a,(ix+6) - 176: 8505+17 1370 CD0701 call print_a_hex - 177: 8522+19 1373 DD7E05 ld a,(ix+5) - 178: 8541+17 1376 CD0701 call print_a_hex - 179: 8558+19 1379 DD7E04 ld a,(ix+4) - 180: 8577+17 137C CD0701 call print_a_hex - 181: 8594+7 137F 3E20 ld a,' ' - 182: 8601+17 1381 CDD700 call print_char + 173: 9169+19 13EC DD7E07 ld a,(ix+7) + 174: 9188+17 13EF CD0E01 call print_a_hex + 175: 9205+19 13F2 DD7E06 ld a,(ix+6) + 176: 9224+17 13F5 CD0E01 call print_a_hex + 177: 9241+19 13F8 DD7E05 ld a,(ix+5) + 178: 9260+17 13FB CD0E01 call print_a_hex + 179: 9277+19 13FE DD7E04 ld a,(ix+4) + 180: 9296+17 1401 CD0E01 call print_a_hex + 181: 9313+7 1404 3E20 ld a,' ' + 182: 9320+17 1406 CDDE00 call print_char 183: ;print Port - 184: 8618+7 1384 3E30 ld a,'0' - 185: 8625+17 1386 CDD700 call print_char - 186: 8642+7 1389 3E78 ld a,'x' - 187: 8649+17 138B CDD700 call print_char - 188: 8666+7 138E 7E ld a,(HL) - 189: 8673+17 138F CD0701 call print_a_hex - 190: 8690+7 1392 3E20 ld a,' ' - 191: 8697+17 1394 CDD700 call print_char - 192: 8714+6 1397 23 inc hl + 184: 9337+7 1409 3E30 ld a,'0' + 185: 9344+17 140B CDDE00 call print_char + 186: 9361+7 140E 3E78 ld a,'x' + 187: 9368+17 1410 CDDE00 call print_char + 188: 9385+7 1413 7E ld a,(HL) + 189: 9392+17 1414 CD0E01 call print_a_hex + 190: 9409+7 1417 3E20 ld a,' ' + 191: 9416+17 1419 CDDE00 call print_char + 192: 9433+6 141C 23 inc hl 193: ;print M/S - 194: 8720+7 1398 7E ld a,(HL) - 195: 8727+11 1399 E5 push hl - 196: 8738+4 139A B7 or a - 197: 8742+10 139B CAA413 jp z,_ideif_prnt_devtable_l1_ms - 198: 8752+10 139E 217C15 ld hl,[_ideif_prnt_devtable_slave] - 199: 8762+10 13A1 C3A713 jp _ideif_prnt_devtable_l1_e2 - 200: - 13A4 _ideif_prnt_devtable_l1_ms - 201: 8772+10 13A4 217415 ld hl,[_ideif_prnt_devtable_master] - 202: - 13A7 _ideif_prnt_devtable_l1_e2 - 203: 8782+17 13A7 CDDF00 call print_str - 204: 8799+10 13AA E1 pop hl - 205: 8809+6 13AB 23 inc hl + 194: 9439+7 141D 7E ld a,(HL) + 195: 9446+11 141E E5 push hl + 196: 9457+4 141F B7 or a + 197: 9461+10 1420 CA2914 jp z,_ideif_prnt_devtable_l1_ms + 198: 9471+10 1423 215716 ld hl,[_ideif_prnt_devtable_slave] + 199: 9481+10 1426 C32C14 jp _ideif_prnt_devtable_l1_e2 + 200: - 1429 _ideif_prnt_devtable_l1_ms + 201: 9491+10 1429 214F16 ld hl,[_ideif_prnt_devtable_master] + 202: - 142C _ideif_prnt_devtable_l1_e2 + 203: 9501+17 142C CDE600 call print_str + 204: 9518+10 142F E1 pop hl + 205: 9528+6 1430 23 inc hl 206: ;print str - 207: 8815+11 13AC C5 push bc - 208: 8826+7 13AD 7E ld a,(hl) - 209: 8833+4 13AE 4F ld c,a - 210: 8837+6 13AF 23 inc hl - 211: 8843+7 13B0 7E ld a,(hl) - 212: 8850+4 13B1 47 ld b,a - 213: 8854+6 13B2 23 inc hl - 214: 8860+11 13B3 E5 push hl - 215: 8871+4 13B4 60 ld h,b - 216: 8875+4 13B5 69 ld l,c - 217: 8879+17 13B6 CDDF00 call print_str - 218: 8896+17 13B9 CDF100 call print_newLine - 219: 8913+10 13BC E1 pop hl - 220: 8923+10 13BD C1 pop bc + 207: 9534+11 1431 C5 push bc + 208: 9545+7 1432 7E ld a,(hl) + 209: 9552+4 1433 4F ld c,a + 210: 9556+6 1434 23 inc hl + 211: 9562+7 1435 7E ld a,(hl) + 212: 9569+4 1436 47 ld b,a + 213: 9573+6 1437 23 inc hl + 214: 9579+11 1438 E5 push hl + 215: 9590+4 1439 60 ld h,b + 216: 9594+4 143A 69 ld l,c + 217: 9598+17 143B CDE600 call print_str + 218: 9615+17 143E CDF800 call print_newLine + 219: 9632+10 1441 E1 pop hl + 220: 9642+10 1442 C1 pop bc 221: ;next - 222: 8933+6 13BE 23 inc hl - 223: 8939+6 13BF 23 inc hl - 224: 8945+4 13C0 04 inc b - 225: 8949+4 13C1 78 ld a,b - 226: 8953+7 13C2 FE04 cp 4 - 227: 8960+5+6 13C4 C8 ret z - 228: 8965+10 13C5 C3E112 jp _ideif_prnt_devtable_l1 + 222: 9652+6 1443 23 inc hl + 223: 9658+6 1444 23 inc hl + 224: 9664+4 1445 04 inc b + 225: 9668+4 1446 78 ld a,b + 226: 9672+7 1447 FE04 cp 4 + 227: 9679+5+6 1449 C8 ret z + 228: 9684+10 144A C36613 jp _ideif_prnt_devtable_l1 229: ;------------------------------------------------------------------------------ 230: ; ideif_init_drive 231: ; 232: ; initializes selected drive in table 233: ;------------------------------------------------------------------------------ - 234: - 13C8 ideif_init_drive: - 235: 8975+17 13C8 CD9714 call ideif_get_drv_pointer + 234: - 144D ideif_init_drive: + 235: 9694+17 144D CD1C15 call ideif_get_drv_pointer 236: ; load addresses. not used atm 237: ;ld a,(IX+6) ;load IO Addr 238: ;ld d,a 239: ;ld a,(IX+7) ;load Master/Slave bit 240: ;ld e,a - 241: 8992+17 13CB CD3C0D call ide_reset + 241: 9711+17 1450 CDCE0D call ide_reset 242: - 243: 9009+10 13CE 01FF5F ld bc, 0x5FFF ;preload timeout counter - 244: - 13D1 _ideif_init_drive_loop: - 245: 9019+7 13D1 060F ld b, IDE_REG_CMDSTS - 246: 9026+17 13D3 CD650D call ide_regread_8 ;read drive status register - 247: 9043+4 13D6 B7 or a - 248: 9047+7+5 13D7 280B jr z,_ideif_init_drive_nodrv ;no drive found - 249: 9054+8 13D9 CB77 bit 6,a - 250: 9062+7+5 13DB 200C jr nz, _ideif_init_drive_found - 251: 9069+6 13DD 1B dec de - 252: 9075+4 13DE 7A ld a,d - 253: 9079+4 13DF B3 or e - 254: 9083+7+5 13E0 2802 jr z, _ideif_init_drive_nodrv - 255: 9090+12 13E2 18ED jr _ideif_init_drive_loop + 243: 9728+10 1453 01FF5F ld bc, 0x5FFF ;preload timeout counter + 244: - 1456 _ideif_init_drive_loop: + 245: 9738+7 1456 060F ld b, IDE_REG_CMDSTS + 246: 9745+17 1458 CDF70D call ide_regread_8 ;read drive status register + 247: 9762+4 145B B7 or a + 248: 9766+7+5 145C 280B jr z,_ideif_init_drive_nodrv ;no drive found + 249: 9773+8 145E CB77 bit 6,a + 250: 9781+7+5 1460 200C jr nz, _ideif_init_drive_found + 251: 9788+6 1462 1B dec de + 252: 9794+4 1463 7A ld a,d + 253: 9798+4 1464 B3 or e + 254: 9802+7+5 1465 2802 jr z, _ideif_init_drive_nodrv + 255: 9809+12 1467 18ED jr _ideif_init_drive_loop 256: - 257: - 13E4 _ideif_init_drive_nodrv: - 258: 9102+19 13E4 DD360001 ld(ix+0),0x01 - 259: 9121+10 13E8 C9 ret + 257: - 1469 _ideif_init_drive_nodrv: + 258: 9821+19 1469 DD360001 ld(ix+0),0x01 + 259: 9840+10 146D C9 ret 260: - 261: - 13E9 _ideif_init_drive_found: - 262: 9131+19 13E9 DD360002 ld (ix+0),0x02 + 261: - 146E _ideif_init_drive_found: + 262: 9850+19 146E DD360002 ld (ix+0),0x02 263: ;get drive name - 264: 9150+7 13ED 060F ld b, IDE_REG_CMDSTS ;Get drive identification - 265: 9157+7 13EF 3EEC ld a, IDE_CMD_IDENT - 266: 9164+17 13F1 CD490D call ide_regwrite_8 ;Write command to drive - 267: 9181+10 13F4 211741 ld hl, MEM_IDE_BUFFER ;set read/write buffer start address - 268: 9191+17 13F7 CD830D call ide_readsector_256 ;read 256 words from device - 269: 9208+10 13FA 214D41 ld hl,MEM_IDE_BUFFER + 54 ;print device serial - 270: 9218+19 13FD DD7E0C ld a,(ix+12) ;load str pointer into de - 271: 9237+4 1400 5F ld e,a - 272: 9241+19 1401 DD7E0D ld a,(ix+13) - 273: 9260+4 1404 57 ld d,a - 274: 9264+10 1405 012800 ld bc,40 ;copy 40 char - 275: 9274+16+5 1408 EDB0 ldir + 264: 9869+7 1472 060F ld b, IDE_REG_CMDSTS ;Get drive identification + 265: 9876+7 1474 3EEC ld a, IDE_CMD_IDENT + 266: 9883+17 1476 CDDB0D call ide_regwrite_8 ;Write command to drive + 267: 9900+10 1479 21B641 ld hl, MEM_IDE_BUFFER ;set read/write buffer start address + 268: 9910+17 147C CD150E call ide_readsector_256 ;read 256 words from device + 269: 9927+10 147F 21EC41 ld hl,MEM_IDE_BUFFER + 54 ;print device serial + 270: 9937+19 1482 DD7E0C ld a,(ix+12) ;load str pointer into de + 271: 9956+4 1485 5F ld e,a + 272: 9960+19 1486 DD7E0D ld a,(ix+13) + 273: 9979+4 1489 57 ld d,a + 274: 9983+10 148A 012800 ld bc,40 ;copy 40 char + 275: 9993+16+5 148D EDB0 ldir 276: ;get partition table 277: ;read bootsector - 278: 9290+7 140A 3E01 ld a,1 ;read 1 sector - 279: 9297+7 140C 060A ld B,IDE_REG_SECTOR - 280: 9304+17 140E CD490D call ide_regwrite_8 - 281: 9321+7 1411 3E01 ld a,1 ;read sector 0 - 282: 9328+7 1413 060B ld b,IDE_REG_SSECTOR - 283: 9335+17 1415 CD490D call ide_regwrite_8 - 284: 9352+7 1418 3E00 ld a,0 ;read cylinder 0 - 285: 9359+7 141A 060C ld b,IDE_REG_LCYL - 286: 9366+17 141C CD490D call ide_regwrite_8 - 287: 9383+7 141F 3E00 ld a,0 - 288: 9390+7 1421 060D ld b,IDE_REG_HCYL - 289: 9397+17 1423 CD490D call ide_regwrite_8 - 290: 9414+7 1426 3EA0 ld a,10100000b ;read head 0 - 291: 9421+7 1428 060E ld b,IDE_REG_HEAD - 292: 9428+17 142A CD490D call ide_regwrite_8 - 293: 9445+7 142D 3E20 ld a,IDE_CMD_READSEC ;send read command - 294: 9452+7 142F 060F ld b,IDE_REG_CMDSTS - 295: 9459+17 1431 CD490D call ide_regwrite_8 - 296: 9476+10 1434 211741 ld hl, MEM_IDE_BUFFER ;set read/write buffer start address - 297: 9486+17 1437 CDB30D call ide_readsector_512_inv ;read 256 words from device + 278:10009+7 148F 3E01 ld a,1 ;read 1 sector + 279:10016+7 1491 060A ld B,IDE_REG_SECTOR + 280:10023+17 1493 CDDB0D call ide_regwrite_8 + 281:10040+7 1496 3E01 ld a,1 ;read sector 0 + 282:10047+7 1498 060B ld b,IDE_REG_SSECTOR + 283:10054+17 149A CDDB0D call ide_regwrite_8 + 284:10071+7 149D 3E00 ld a,0 ;read cylinder 0 + 285:10078+7 149F 060C ld b,IDE_REG_LCYL + 286:10085+17 14A1 CDDB0D call ide_regwrite_8 + 287:10102+7 14A4 3E00 ld a,0 + 288:10109+7 14A6 060D ld b,IDE_REG_HCYL + 289:10116+17 14A8 CDDB0D call ide_regwrite_8 + 290:10133+7 14AB 3EA0 ld a,10100000b ;read head 0 + 291:10140+7 14AD 060E ld b,IDE_REG_HEAD + 292:10147+17 14AF CDDB0D call ide_regwrite_8 + 293:10164+7 14B2 3E20 ld a,IDE_CMD_READSEC ;send read command + 294:10171+7 14B4 060F ld b,IDE_REG_CMDSTS + 295:10178+17 14B6 CDDB0D call ide_regwrite_8 + 296:10195+10 14B9 21B641 ld hl, MEM_IDE_BUFFER ;set read/write buffer start address + 297:10205+17 14BC CD3E0E call ide_readsector_512_inv ;read 256 words from device 298: ;prepare partitions - 299: 9503+7 143A 0604 ld b,4 ;Partition table length - 300: 9510+7 143C 0E00 ld c,0 ;Partition ID counter - 301: 9517+14 143E FD21D542 ld iy,MEM_IDE_BUFFER+446 ;Load offest of first partition table entry - 302: - 1442 _ideif_init_drive_prt_l1: - 303: 9531+19 1442 FD7E04 ld a,(iy+4) ;load status byte - 304: 9550+4 1445 B7 or a - 305: 9554+10 1446 C25414 jp NZ, _ideif_init_drive_prt_fnd ;If not zero, jump to print function - 306: 9564+10 1449 C34C14 jp _ideif_init_drive_prt_ln - 307: - 144C _ideif_init_drive_prt_ln: - 308: 9574+10 144C 111000 ld de,16 - 309: 9584+15 144F FD19 add iy,de - 310: 9599+8+5 1451 10EF djnz _ideif_init_drive_prt_l1 - 311: 9607+10 1453 C9 ret - 312: - 1454 _ideif_init_drive_prt_fnd; - 313: 9617+19 1454 FD7E04 ld a,(iy+4) - 314: 9636+19 1457 DD7701 ld (ix+1),a ;store partition type - 315: 9655+7 145A FE0E cp 0x0E ;if not 0xE0, continue with next entry - 316: 9662+7+5 145C 20EE jr nz, _ideif_init_drive_prt_ln + 299:10222+7 14BF 0604 ld b,4 ;Partition table length + 300:10229+7 14C1 0E00 ld c,0 ;Partition ID counter + 301:10236+14 14C3 FD217443 ld iy,MEM_IDE_BUFFER+446 ;Load offest of first partition table entry + 302: - 14C7 _ideif_init_drive_prt_l1: + 303:10250+19 14C7 FD7E04 ld a,(iy+4) ;load status byte + 304:10269+4 14CA B7 or a + 305:10273+10 14CB C2D914 jp NZ, _ideif_init_drive_prt_fnd ;If not zero, jump to print function + 306:10283+10 14CE C3D114 jp _ideif_init_drive_prt_ln + 307: - 14D1 _ideif_init_drive_prt_ln: + 308:10293+10 14D1 111000 ld de,16 + 309:10303+15 14D4 FD19 add iy,de + 310:10318+8+5 14D6 10EF djnz _ideif_init_drive_prt_l1 + 311:10326+10 14D8 C9 ret + 312: - 14D9 _ideif_init_drive_prt_fnd; + 313:10336+19 14D9 FD7E04 ld a,(iy+4) + 314:10355+19 14DC DD7701 ld (ix+1),a ;store partition type + 315:10374+7 14DF FE0E cp 0x0E ;if not 0xE0, continue with next entry + 316:10381+7+5 14E1 20EE jr nz, _ideif_init_drive_prt_ln 317: ;get start LBA - 318: 9669+19 145E FD7E08 ld a,(iy+0x08) - 319: 9688+19 1461 DD7702 ld (ix+0x02),a - 320: 9707+19 1464 FD7E09 ld a,(iy+0x09) - 321: 9726+19 1467 DD7703 ld (ix+0x03),a - 322: 9745+19 146A FD7E0A ld a,(iy+0x0A) - 323: 9764+19 146D DD7704 ld (ix+0x04),a - 324: 9783+19 1470 FD7E0B ld a,(iy+0x0B) - 325: 9802+19 1473 DD7705 ld (ix+0x05),a - 326: 9821+19 1476 DD360000 ld (ix+0),0x00 + 318:10388+19 14E3 FD7E08 ld a,(iy+0x08) + 319:10407+19 14E6 DD7702 ld (ix+0x02),a + 320:10426+19 14E9 FD7E09 ld a,(iy+0x09) + 321:10445+19 14EC DD7703 ld (ix+0x03),a + 322:10464+19 14EF FD7E0A ld a,(iy+0x0A) + 323:10483+19 14F2 DD7704 ld (ix+0x04),a + 324:10502+19 14F5 FD7E0B ld a,(iy+0x0B) + 325:10521+19 14F8 DD7705 ld (ix+0x05),a + 326:10540+19 14FB DD360000 ld (ix+0),0x00 327: ;get count LBA - 328: 9840+19 147A FD7E0C ld a,(iy+0x0C) - 329: 9859+19 147D DD7706 ld (ix+0x06),a - 330: 9878+19 1480 FD7E0D ld a,(iy+0x0D) - 331: 9897+19 1483 DD7707 ld (ix+0x07),a - 332: 9916+19 1486 FD7E0E ld a,(iy+0x0E) - 333: 9935+19 1489 DD7708 ld (ix+0x08),a - 334: 9954+19 148C FD7E0F ld a,(iy+0x0F) - 335: 9973+19 148F DD7709 ld (ix+0x09),a - 336: 9992+19 1492 DD360000 ld (ix+0),0x00 - 337:10011+10 1496 C9 ret + 328:10559+19 14FF FD7E0C ld a,(iy+0x0C) + 329:10578+19 1502 DD7706 ld (ix+0x06),a + 330:10597+19 1505 FD7E0D ld a,(iy+0x0D) + 331:10616+19 1508 DD7707 ld (ix+0x07),a + 332:10635+19 150B FD7E0E ld a,(iy+0x0E) + 333:10654+19 150E DD7708 ld (ix+0x08),a + 334:10673+19 1511 FD7E0F ld a,(iy+0x0F) + 335:10692+19 1514 DD7709 ld (ix+0x09),a + 336:10711+19 1517 DD360000 ld (ix+0),0x00 + 337:10730+10 151B C9 ret 338: 339: ;------------------------------------------------------------------------------ 340: ; ideif_get_drv_pointer 341: ; - 342: ; gets pointer to selected drive in table + 342: ; gets pointer to selected drive in table in IX 343: ;------------------------------------------------------------------------------ - 344: - 1497 ideif_get_drv_pointer: - 345:10021+11 1497 F5 push af - 346:10032+11 1498 C5 push bc + 344: - 151C ideif_get_drv_pointer: + 345:10740+11 151C F5 push af + 346:10751+11 151D C5 push bc 347: ;get selected drive - 348:10043+13 1499 3A7640 ld a,(MEM_IDE_SELECTED) + 348:10762+13 151E 3A1541 ld a,(MEM_IDE_SELECTED) 349: ;multiply a *8 - 350:10056+4 149C 07 rlca ;*2 - 351:10060+4 149D 07 rlca ;*4 - 352:10064+4 149E 07 rlca ;*8 - 353:10068+7 149F 0600 ld b,0 - 354:10075+4 14A1 4F ld c,a - 355:10079+14 14A2 DD213640 ld ix,[MEM_IDE_DEV_TABLE] - 356:10093+15 14A6 DD09 add ix,bc - 357:10108+10 14A8 C1 pop bc - 358:10118+10 14A9 F1 pop af - 359:10128+10 14AA C9 ret + 350:10775+4 1521 07 rlca ;*2 + 351:10779+4 1522 07 rlca ;*4 + 352:10783+4 1523 07 rlca ;*8 + 353:10787+7 1524 0600 ld b,0 + 354:10794+4 1526 4F ld c,a + 355:10798+14 1527 DD21D540 ld ix,[MEM_IDE_DEV_TABLE] + 356:10812+15 152B DD09 add ix,bc + 357:10827+10 152D C1 pop bc + 358:10837+10 152E F1 pop af + 359:10847+10 152F C9 ret 360: 361: ;------------------------------------------------------------------------------ 362: ; ideif_init_all 363: ; 364: ; initializes interface 365: ;------------------------------------------------------------------------------ - 366: - 14AB ideif_init_all: - 367:10138+10 14AB 21F014 ld hl, [str_dev_waitready] - 368:10148+17 14AE CDDF00 call print_str ;print waiting message + 366: - 1530 ideif_init_all: + 367:10857+10 1530 21CB15 ld hl, [str_dev_waitready] + 368:10867+17 1533 CDE600 call print_str ;print waiting message 369: - 370:10165+17 14B1 CDB512 call ideif_init_devtable - 371:10182+17 14B4 CDC813 call ideif_init_drive + 370:10884+17 1536 CD3A13 call ideif_init_devtable + 371:10901+17 1539 CD4D14 call ideif_init_drive 372: - 373:10199+10 14B7 210815 ld hl, [str_dev_done] - 374:10209+17 14BA CDDF00 call print_str - 375:10226+10 14BD C9 RET + 373:10918+10 153C 21E315 ld hl, [str_dev_done] + 374:10928+17 153F CDE600 call print_str + 375:10945+10 1542 C9 RET 376: 377: 378: ;------------------------------------------------------------------------------ @@ -2492,58 +2575,108 @@ 389: ; 390: ; Reads A*512 byte sector into memory 391: ; HL contains pointer to LBA address - 392: ; A contains sector count - 393: ;------------------------------------------------------------------------------ - 394: - 14BE read_lba_sector: - 395:10236+7 14BE 060A LD B,IDE_REG_SECTOR ;amount of sectores - 396:10243+17 14C0 CD490D CALL ide_regwrite_8 - 397: - 398:10260+7 14C3 7E LD A,(HL) - 399:10267+7 14C4 060B LD B,IDE_REG_LBA0 - 400:10274+17 14C6 CD490D CALL ide_regwrite_8 - 401:10291+6 14C9 23 INC HL - 402:10297+7 14CA 7E LD A,(HL) - 403:10304+7 14CB 060C LD B,IDE_REG_LBA1 - 404:10311+17 14CD CD490D CALL ide_regwrite_8 - 405:10328+6 14D0 23 INC HL - 406:10334+7 14D1 7E LD A,(HL) - 407:10341+7 14D2 060D LD B,IDE_REG_LBA2 - 408:10348+17 14D4 CD490D CALL ide_regwrite_8 - 409:10365+6 14D7 23 INC HL - 410:10371+7 14D8 7E LD A,(HL) - 411:10378+7 14D9 E60F AND 00001111b - 412:10385+7 14DB F6E0 OR 11100000b - 413:10392+7 14DD 060E LD B,IDE_REG_LBA3 - 414:10399+17 14DF CD490D CALL ide_regwrite_8 - 415: - 416:10416+7 14E2 3E20 LD A,IDE_CMD_READSEC ;send read command - 417:10423+7 14E4 060F LD B,IDE_REG_CMDSTS - 418:10430+17 14E6 CD490D CALL ide_regwrite_8 - 419:10447+10 14E9 211741 LD HL,MEM_IDE_BUFFER ;set read/write buffer start address - 420:10457+17 14EC CDB30D call ide_readsector_512_inv ;read 256 words from device - 421:10474+10 14EF C9 ret - 422: - 423: - 424: - 425: - 426: - 427: ;================================================================ - 428: ; IDE strings - 429: ;=============================================================== - 430: - 431: - 14F0 str_dev_waitready: - 432: - 14F0 0D0A4465 db 13,10,"Detecting drives ... ",0 + 392: ; DE contains destination location + 393: ; A contains sector count + 394: ;------------------------------------------------------------------------------ + 395: - 1543 read_lba_sector: + 396:10955+7 1543 060A LD B,IDE_REG_SECTOR ;amount of sectores + 397:10962+17 1545 CDDB0D CALL ide_regwrite_8 + 398: + 399:10979+7 1548 7E LD A,(HL) + 400:10986+7 1549 060B LD B,IDE_REG_LBA0 + 401:10993+17 154B CDDB0D CALL ide_regwrite_8 + 402:11010+6 154E 23 INC HL + 403:11016+7 154F 7E LD A,(HL) + 404:11023+7 1550 060C LD B,IDE_REG_LBA1 + 405:11030+17 1552 CDDB0D CALL ide_regwrite_8 + 406:11047+6 1555 23 INC HL + 407:11053+7 1556 7E LD A,(HL) + 408:11060+7 1557 060D LD B,IDE_REG_LBA2 + 409:11067+17 1559 CDDB0D CALL ide_regwrite_8 + 410:11084+6 155C 23 INC HL + 411:11090+7 155D 7E LD A,(HL) + 412:11097+7 155E E60F AND 00001111b + 413:11104+7 1560 F6E0 OR 11100000b + 414:11111+7 1562 060E LD B,IDE_REG_LBA3 + 415:11118+17 1564 CDDB0D CALL ide_regwrite_8 + 416: + 417:11135+7 1567 3E20 LD A,IDE_CMD_READSEC ;send read command + 418:11142+7 1569 060F LD B,IDE_REG_CMDSTS + 419:11149+17 156B CDDB0D CALL ide_regwrite_8 + 420: ;LD HL,MEM_IDE_BUFFER ;set read/write buffer start address + 421:11166+4 156E EB EX DE,HL ;transfer destination in DE to HL + 422:11170+17 156F CD3E0E call ide_readsector_512_inv ;read 256 words from device + 423:11187+10 1572 C9 ret + 424: + 425: ;------------------------------------------------------------------------------ + 426: ; ideif_drv_sel + 427: ; + 428: ; Select drive from table + 429: ; Prepare variables + 430: ; + 431: ; A contains drive number + 432: ;------------------------------------------------------------------------------ + 433: - 1573 ideif_drv_sel: + 434:11197+13 1573 321541 ld (MEM_IDE_SELECTED),a + 435:11210+11 1576 F5 push af + 436:11221+17 1577 CD1C15 call ideif_get_drv_pointer ;test if drive is marked as available + 437:11238+19 157A DD7E00 ld a,(ix+0) + 438:11257+4 157D B7 or a + 439:11261+10 157E C2AB15 jp nz, _ideif_drv_sel_fail ;if not-> fail + 440: + 441:11271+17 1581 CD3E20 call fat_get_root_table ;else get root table + 442: + 443:11288+10 1584 215F16 ld hl,[_ideif_drv_sel_pstr] ;print success message + 444:11298+17 1587 CDE600 call print_str + 445:11315+10 158A F1 pop af + 446:11325+7 158B C645 add 69 + 447:11332+13 158D 322B40 ld (var_dir),a ;store drive letter + 448:11345+17 1590 CDDE00 call print_char + 449:11362+7 1593 3E3A ld a, ':' + 450:11369+13 1595 322C40 ld (var_dir+1),a + 451:11382+7 1598 3E5C ld a, '\' + 452:11389+13 159A 322D40 ld (var_dir+2),a + 453:11402+4 159D AF xor a ;set dir to empty + 454:11406+13 159E 322E40 ld (var_dir+3),a + 455:11419+13 15A1 327A40 ld (var_dir+79),a ;set depth counter + 456:11432+10 15A4 217616 ld hl,[_ideif_drv_sel_sstr0] + 457:11442+17 15A7 CDE600 call print_str + 458:11459+10 15AA C9 ret + 459: - 15AB _ideif_drv_sel_fail: + 460:11469+10 15AB 215F16 ld hl,[_ideif_drv_sel_pstr] + 461:11479+17 15AE CDE600 call print_str + 462:11496+10 15B1 F1 pop af + 463:11506+7 15B2 C645 add 69 + 464:11513+17 15B4 CDDE00 call print_char + 465:11530+10 15B7 216816 ld hl,[_ideif_drv_sel_fstr0] + 466:11540+17 15BA CDE600 call print_str + 467:11557+4 15BD AF xor a ;set dir to empty + 468:11561+13 15BE 322B40 ld (var_dir),a + 469:11574+10 15C1 112000 LD DE,0x20 + 470:11584+10 15C4 017000 LD BC,0x70 + 471:11594+17 15C7 CDA90D CALL beep + 472:11611+10 15CA C9 ret + 473: + 474: + 475: + 476: + 477: ;================================================================ + 478: ; IDE strings + 479: ;=============================================================== + 480: + 481: - 15CB str_dev_waitready: + 482: - 15CB 0D0A4465 db 13,10,"Detecting drives ... ",0 74656374 696E6720 64726976 6573202E 2E2E2000 - 433: - 1508 str_dev_done: - 434: - 1508 646F6E65 db "done!",13,10,0 + 483: - 15E3 str_dev_done: + 484: - 15E3 646F6E65 db "done!",13,10,0 210D0A00 - 435: - 436: - 1510 _ideif_prnt_devtable_hdr: - 437: - 1510 44525620 db "DRV Status Type LBA Length Port M/S Name",10,13,0 + 485: + 486: - 15EB _ideif_prnt_devtable_hdr: + 487: - 15EB 44525620 db "DRV Status Type LBA Length Port M/S Name",10,13,0 53746174 75732020 20205479 @@ -2557,30 +2690,52 @@ 53202020 204E616D 650A0D00 - 438: - 1548 _ideif_prnt_devtable_s00: - 439: - 1548 41766169 db "Avail ",0 + 488: - 1623 _ideif_prnt_devtable_s00: + 489: - 1623 41766169 db "Avail ",0 6C202020 202000 - 440: - 1553 _ideif_prnt_devtable_s01: - 441: - 1553 4E6F7420 db "Not Found ",0 + 490: - 162E _ideif_prnt_devtable_s01: + 491: - 162E 4E6F7420 db "Not Found ",0 466F756E 642000 - 442: - 155E _ideif_prnt_devtable_s02: - 443: - 155E 556E6B6F db "Unkown FS ",0 + 492: - 1639 _ideif_prnt_devtable_s02: + 493: - 1639 556E6B6F db "Unkown FS ",0 776E2046 532000 - 444: - 1569 _ideif_prnt_devtable_sFF: - 445: - 1569 4374726C db "Ctrl. Err ",0 + 494: - 1644 _ideif_prnt_devtable_sFF: + 495: - 1644 4374726C db "Ctrl. Err ",0 2E204572 722000 - 446: - 1574 _ideif_prnt_devtable_master: - 447: - 1574 4D617374 db "Master ",0 + 496: - 164F _ideif_prnt_devtable_master: + 497: - 164F 4D617374 db "Master ",0 65722000 - 448: - 157C _ideif_prnt_devtable_slave: -**** main.asm **** - 177: - 157C 536C6176 db "Slave ",0 + 498: - 1657 _ideif_prnt_devtable_slave: + 499: - 1657 536C6176 db "Slave ",0 65202000 - 178: .include "kdrv_siic.s" + 500: - 165F _ideif_drv_sel_pstr: + 501: - 165F 0A0D4472 db 10,13,"Drive ",0 + 69766520 + 00 + 502: - 1668 _ideif_drv_sel_fstr0: + 503: - 1668 3A206E6F db ": not ready",10,13,0 + 74207265 + 6164790A + 0D00 + 504: - 1676 _ideif_drv_sel_sstr0: + 505: - 1676 3A207365 db ": selected",10,13,0 + 6C656374 + 65640A0D + 00 + 506: - 1683 _ideif_drv_sel_syn: + 507: - 1683 0A0D496E db 10,13,"Invalid drive letter",10,13,0 + 76616C69 + 64206472 + 69766520 + 6C657474 + 65720A0D + 00 +**** main.asm **** + 181: .include "kdrv_siic.s" **** include/kdrv_siic.s **** 1: ;---------------------------------------------------------------- 2: ;BIOS Driver for I2C Protocol (Software) @@ -2608,63 +2763,63 @@ 24: ;HL contains buffer location 25: ;B defines amount of bytes to send 26: ;C contains device address - 27: - 1584 iic_send_buffer: - 28:10484+17 1584 CDE615 CALL iic_send_sbit ;Send startbit - 29:10501+4 1587 79 LD A,C - 30:10505+7 1588 E6FE AND 0xFE ;Mask R/W bit (must be 0 for write) - 31:10512+17 158A CD7C16 CALL iic_send_byte ;Send Address - 32:10529+17 158D CD1C16 CALL iic_read_ack - 33:10546+4 1590 B7 OR A ; if no ack, error - 34:10550+10 1591 C2A815 JP NZ, iic_send_buffer_err - 35: - 1594 iic_send_buffer_loop; - 36:10560+7 1594 7E LD A,(HL) - 37:10567+6 1595 23 INC HL - 38:10573+17 1596 CD7C16 CALL iic_send_byte - 39:10590+17 1599 CD1C16 CALL iic_read_ack - 40:10607+4 159C B7 OR A ; if no ack, error - 41:10611+10 159D C2A815 JP NZ, iic_send_buffer_err - 42:10621+8+5 15A0 10F2 DJNZ iic_send_buffer_loop ;loop for remaining bytes - 43: - 15A2 iic_send_buffer_done: - 44:10629+17 15A2 CDFB15 CALL iic_send_ebit - 45:10646+7 15A5 3E00 LD A,0 - 46:10653+10 15A7 C9 RET - 47: - 15A8 iic_send_buffer_err: - 48:10663+17 15A8 CDFB15 CALL iic_send_ebit - 49:10680+7 15AB 3E01 LD A,1 - 50:10687+10 15AD C9 RET + 27: - 169C iic_send_buffer: + 28:11621+17 169C CDFE16 CALL iic_send_sbit ;Send startbit + 29:11638+4 169F 79 LD A,C + 30:11642+7 16A0 E6FE AND 0xFE ;Mask R/W bit (must be 0 for write) + 31:11649+17 16A2 CD9417 CALL iic_send_byte ;Send Address + 32:11666+17 16A5 CD3417 CALL iic_read_ack + 33:11683+4 16A8 B7 OR A ; if no ack, error + 34:11687+10 16A9 C2C016 JP NZ, iic_send_buffer_err + 35: - 16AC iic_send_buffer_loop; + 36:11697+7 16AC 7E LD A,(HL) + 37:11704+6 16AD 23 INC HL + 38:11710+17 16AE CD9417 CALL iic_send_byte + 39:11727+17 16B1 CD3417 CALL iic_read_ack + 40:11744+4 16B4 B7 OR A ; if no ack, error + 41:11748+10 16B5 C2C016 JP NZ, iic_send_buffer_err + 42:11758+8+5 16B8 10F2 DJNZ iic_send_buffer_loop ;loop for remaining bytes + 43: - 16BA iic_send_buffer_done: + 44:11766+17 16BA CD1317 CALL iic_send_ebit + 45:11783+7 16BD 3E00 LD A,0 + 46:11790+10 16BF C9 RET + 47: - 16C0 iic_send_buffer_err: + 48:11800+17 16C0 CD1317 CALL iic_send_ebit + 49:11817+7 16C3 3E01 LD A,1 + 50:11824+10 16C5 C9 RET 51: 52: ;HL contains buffer location 53: ;B defines amount of bytes to send 54: ;C contains device address - 55: - 15AE iic_receive_buffer: - 56:10697+4 15AE 05 DEC B - 57:10701+17 15AF CDE615 CALL iic_send_sbit ;Send startbit - 58:10718+4 15B2 79 LD A,C - 59:10722+7 15B3 F601 OR 0x01 ;set R/W bit (must be 1 for read) - 60:10729+17 15B5 CD7C16 CALL iic_send_byte ;Send Address - 61:10746+17 15B8 CD1C16 CALL iic_read_ack - 62:10763+4 15BB B7 OR A ; if no ack, error - 63:10767+10 15BC C2D715 JP NZ, iic_receive_buffer_err - 64: - 15BF iic_receive_buffer_loop: - 65:10777+17 15BF CDA216 CALL iic_receive_byte - 66:10794+7 15C2 77 LD (HL),A - 67:10801+6 15C3 23 INC HL - 68:10807+17 15C4 CD4216 CALL iic_send_ack - 69:10824+8+5 15C7 10F6 DJNZ iic_receive_buffer_loop + 55: - 16C6 iic_receive_buffer: + 56:11834+4 16C6 05 DEC B + 57:11838+17 16C7 CDFE16 CALL iic_send_sbit ;Send startbit + 58:11855+4 16CA 79 LD A,C + 59:11859+7 16CB F601 OR 0x01 ;set R/W bit (must be 1 for read) + 60:11866+17 16CD CD9417 CALL iic_send_byte ;Send Address + 61:11883+17 16D0 CD3417 CALL iic_read_ack + 62:11900+4 16D3 B7 OR A ; if no ack, error + 63:11904+10 16D4 C2EF16 JP NZ, iic_receive_buffer_err + 64: - 16D7 iic_receive_buffer_loop: + 65:11914+17 16D7 CDBA17 CALL iic_receive_byte + 66:11931+7 16DA 77 LD (HL),A + 67:11938+6 16DB 23 INC HL + 68:11944+17 16DC CD5A17 CALL iic_send_ack + 69:11961+8+5 16DF 10F6 DJNZ iic_receive_buffer_loop 70: ; last time: - 71:10832+17 15C9 CDA216 CALL iic_receive_byte - 72:10849+7 15CC 77 LD (HL),A - 73:10856+6 15CD 23 INC HL - 74:10862+17 15CE CD5F16 CALL iic_send_nack + 71:11969+17 16E1 CDBA17 CALL iic_receive_byte + 72:11986+7 16E4 77 LD (HL),A + 73:11993+6 16E5 23 INC HL + 74:11999+17 16E6 CD7717 CALL iic_send_nack 75: - 76: - 15D1 iic_receive_buffer_done: - 77:10879+17 15D1 CDFB15 CALL iic_send_ebit - 78:10896+7 15D4 3E00 LD A,0 - 79:10903+10 15D6 C9 RET - 80: - 15D7 iic_receive_buffer_err: - 81:10913+17 15D7 CDFB15 CALL iic_send_ebit - 82:10930+7 15DA 3E01 LD A,1 - 83:10937+10 15DC C9 RET + 76: - 16E9 iic_receive_buffer_done: + 77:12016+17 16E9 CD1317 CALL iic_send_ebit + 78:12033+7 16EC 3E00 LD A,0 + 79:12040+10 16EE C9 RET + 80: - 16EF iic_receive_buffer_err: + 81:12050+17 16EF CD1317 CALL iic_send_ebit + 82:12067+7 16F2 3E01 LD A,1 + 83:12074+10 16F4 C9 RET 84: 85: 86: @@ -2673,206 +2828,206 @@ 89: ;================================================================ 90: 91: ;Reset PIO configuration - 92: - 15DD iic_init: + 92: - 16F5 iic_init: 93: ;Set port to controll mode (MODE3) - 94:10947+7 15DD 3ECF LD A,0xCF - 95:10954+11 15DF D3F6 OUT (CS_PIO_AC), A + 94:12084+7 16F5 3ECF LD A,0xCF + 95:12091+11 16F7 D3F6 OUT (CS_PIO_AC), A 96: ;Set inputs/outputs - 97:10965+7 15E1 3EF0 LD A,0xF0 - 98:10972+11 15E3 D3F6 OUT (CS_PIO_AC), A - 99:10983+10 15E5 C9 RET + 97:12102+7 16F9 3EF0 LD A,0xF0 + 98:12109+11 16FB D3F6 OUT (CS_PIO_AC), A + 99:12120+10 16FD C9 RET 100: 101: ; send start bit - 102: - 15E6 iic_send_sbit: + 102: - 16FE iic_send_sbit: 103: ;Set port to controll mode (MODE3) - 104:10993+7 15E6 3ECF LD A,0xCF - 105:11000+11 15E8 D3F6 OUT (CS_PIO_AC), A + 104:12130+7 16FE 3ECF LD A,0xCF + 105:12137+11 1700 D3F6 OUT (CS_PIO_AC), A 106: ;Set inputs/outputs (SDA and SCL is now output) - 107:11011+7 15EA 3EFC LD A,0xFC - 108:11018+11 15EC D3F6 OUT (CS_PIO_AC), A + 107:12148+7 1702 3EFC LD A,0xFC + 108:12155+11 1704 D3F6 OUT (CS_PIO_AC), A 109: ;SCL HIGH, SDA LOW - 110:11029+7 15EE 3E02 LD A,0x02 - 111:11036+11 15F0 D3F4 OUT (CS_PIO_AD), A - 112:11047+4 15F2 00 NOP - 113:11051+4 15F3 00 NOP - 114:11055+7 15F4 3E00 LD A,0x00 - 115:11062+11 15F6 D3F4 OUT (CS_PIO_AD), A - 116:11073+4 15F8 00 NOP - 117:11077+4 15F9 00 NOP - 118:11081+10 15FA C9 RET + 110:12166+7 1706 3E02 LD A,0x02 + 111:12173+11 1708 D3F4 OUT (CS_PIO_AD), A + 112:12184+4 170A 00 NOP + 113:12188+4 170B 00 NOP + 114:12192+7 170C 3E00 LD A,0x00 + 115:12199+11 170E D3F4 OUT (CS_PIO_AD), A + 116:12210+4 1710 00 NOP + 117:12214+4 1711 00 NOP + 118:12218+10 1712 C9 RET 119: 120: ; send end/stop bit - 121: - 15FB iic_send_ebit: + 121: - 1713 iic_send_ebit: 122: ;Set port to controll mode (MODE3) - 123:11091+7 15FB 3ECF LD A,0xCF - 124:11098+11 15FD D3F6 OUT (CS_PIO_AC), A + 123:12228+7 1713 3ECF LD A,0xCF + 124:12235+11 1715 D3F6 OUT (CS_PIO_AC), A 125: 126: ;Set inputs/outputs (SDA and SCL is now output) - 127:11109+7 15FF 3EFC LD A,0xFC - 128:11116+11 1601 D3F6 OUT (CS_PIO_AC), A + 127:12246+7 1717 3EFC LD A,0xFC + 128:12253+11 1719 D3F6 OUT (CS_PIO_AC), A 129: ;SCL HIGH, SDA LOW - 130:11127+7 1603 3E02 LD A,0x02 - 131:11134+11 1605 D3F4 OUT (CS_PIO_AD), A - 132:11145+4 1607 00 NOP - 133:11149+4 1608 00 NOP - 134:11153+7 1609 3E03 LD A,0x03 ; both high - 135:11160+11 160B D3F4 OUT (CS_PIO_AD), A - 136:11171+4 160D 00 NOP - 137:11175+4 160E 00 NOP + 130:12264+7 171B 3E02 LD A,0x02 + 131:12271+11 171D D3F4 OUT (CS_PIO_AD), A + 132:12282+4 171F 00 NOP + 133:12286+4 1720 00 NOP + 134:12290+7 1721 3E03 LD A,0x03 ; both high + 135:12297+11 1723 D3F4 OUT (CS_PIO_AD), A + 136:12308+4 1725 00 NOP + 137:12312+4 1726 00 NOP 138: ;release bus 139: ;Set port to controll mode (MODE3) - 140:11179+7 160F 3ECF LD A,0xCF - 141:11186+11 1611 D3F6 OUT (CS_PIO_AC), A - 142:11197+4 1613 00 NOP - 143:11201+4 1614 00 NOP + 140:12316+7 1727 3ECF LD A,0xCF + 141:12323+11 1729 D3F6 OUT (CS_PIO_AC), A + 142:12334+4 172B 00 NOP + 143:12338+4 172C 00 NOP 144: ;Set inputs/outputs (SDA and SCL is now input, sound enabled) - 145:11205+7 1615 3EF7 LD A,11110111b - 146:11212+11 1617 D3F6 OUT (CS_PIO_AC), A - 147:11223+4 1619 00 NOP - 148:11227+4 161A 00 NOP - 149:11231+10 161B C9 RET + 145:12342+7 172D 3EF7 LD A,11110111b + 146:12349+11 172F D3F6 OUT (CS_PIO_AC), A + 147:12360+4 1731 00 NOP + 148:12364+4 1732 00 NOP + 149:12368+10 1733 C9 RET 150: 151: - 152: - 161C iic_read_ack: - 153:11241+7 161C 3ECF LD A,0xCF - 154:11248+11 161E D3F6 OUT (CS_PIO_AC), A + 152: - 1734 iic_read_ack: + 153:12378+7 1734 3ECF LD A,0xCF + 154:12385+11 1736 D3F6 OUT (CS_PIO_AC), A 155: ;Set inputs/outputs (SCL is now output, SDA input) - 156:11259+7 1620 3EFD LD A,0xFD - 157:11266+11 1622 D3F6 OUT (CS_PIO_AC), A - 158:11277+4 1624 00 NOP - 159:11281+4 1625 00 NOP - 160:11285+7 1626 3E00 LD A,0x00 ;set SCL LOW - 161:11292+11 1628 D3F4 OUT (CS_PIO_AD), A - 162:11303+4 162A 00 NOP - 163:11307+4 162B 00 NOP - 164:11311+7 162C EE02 XOR 0x02 ;set SCL HIGH - 165:11318+11 162E D3F4 OUT (CS_PIO_AD), A - 166:11329+4 1630 00 NOP - 167:11333+11 1631 DBF4 IN A,(CS_PIO_AD) ; Read SDA - 168:11344+4 1633 00 NOP - 169:11348+4 1634 00 NOP - 170:11352+11 1635 F5 PUSH AF - 171:11363+7 1636 E6FE AND 0xFE ; Filter input - 172:11370+7 1638 EE02 XOR 0x02 ;set SCL LOW - 173:11377+11 163A D3F4 OUT (CS_PIO_AD), A - 174:11388+4 163C 00 NOP - 175:11392+4 163D 00 NOP - 176:11396+10 163E F1 POP AF - 177:11406+7 163F E601 AND 1 - 178:11413+10 1641 C9 RET + 156:12396+7 1738 3EFD LD A,0xFD + 157:12403+11 173A D3F6 OUT (CS_PIO_AC), A + 158:12414+4 173C 00 NOP + 159:12418+4 173D 00 NOP + 160:12422+7 173E 3E00 LD A,0x00 ;set SCL LOW + 161:12429+11 1740 D3F4 OUT (CS_PIO_AD), A + 162:12440+4 1742 00 NOP + 163:12444+4 1743 00 NOP + 164:12448+7 1744 EE02 XOR 0x02 ;set SCL HIGH + 165:12455+11 1746 D3F4 OUT (CS_PIO_AD), A + 166:12466+4 1748 00 NOP + 167:12470+11 1749 DBF4 IN A,(CS_PIO_AD) ; Read SDA + 168:12481+4 174B 00 NOP + 169:12485+4 174C 00 NOP + 170:12489+11 174D F5 PUSH AF + 171:12500+7 174E E6FE AND 0xFE ; Filter input + 172:12507+7 1750 EE02 XOR 0x02 ;set SCL LOW + 173:12514+11 1752 D3F4 OUT (CS_PIO_AD), A + 174:12525+4 1754 00 NOP + 175:12529+4 1755 00 NOP + 176:12533+10 1756 F1 POP AF + 177:12543+7 1757 E601 AND 1 + 178:12550+10 1759 C9 RET 179: - 180: - 1642 iic_send_ack: + 180: - 175A iic_send_ack: 181: ;Set port to controll mode (MODE3) - 182:11423+7 1642 3ECF LD A,0xCF - 183:11430+11 1644 D3F6 OUT (CS_PIO_AC), A + 182:12560+7 175A 3ECF LD A,0xCF + 183:12567+11 175C D3F6 OUT (CS_PIO_AC), A 184: ;Set inputs/outputs (SDA and SCL is now output) - 185:11441+7 1646 3EFC LD A,0xFC - 186:11448+11 1648 D3F6 OUT (CS_PIO_AC), A - 187:11459+4 164A 00 NOP - 188:11463+4 164B 00 NOP - 189:11467+7 164C 3E00 LD A,0x00 ; SCL LOW, SDA LOW - 190:11474+11 164E D3F4 OUT (CS_PIO_AD), A - 191:11485+4 1650 00 NOP - 192:11489+4 1651 00 NOP - 193:11493+7 1652 3E02 LD A,0x02 ; SCL HIGH, SDA LOW - 194:11500+11 1654 D3F4 OUT (CS_PIO_AD), A - 195:11511+4 1656 00 NOP - 196:11515+4 1657 00 NOP - 197:11519+7 1658 3E00 LD A,0x00 ; SCL LOW, SDA LOW - 198:11526+11 165A D3F4 OUT (CS_PIO_AD), A - 199:11537+4 165C 00 NOP - 200:11541+4 165D 00 NOP - 201:11545+10 165E C9 RET + 185:12578+7 175E 3EFC LD A,0xFC + 186:12585+11 1760 D3F6 OUT (CS_PIO_AC), A + 187:12596+4 1762 00 NOP + 188:12600+4 1763 00 NOP + 189:12604+7 1764 3E00 LD A,0x00 ; SCL LOW, SDA LOW + 190:12611+11 1766 D3F4 OUT (CS_PIO_AD), A + 191:12622+4 1768 00 NOP + 192:12626+4 1769 00 NOP + 193:12630+7 176A 3E02 LD A,0x02 ; SCL HIGH, SDA LOW + 194:12637+11 176C D3F4 OUT (CS_PIO_AD), A + 195:12648+4 176E 00 NOP + 196:12652+4 176F 00 NOP + 197:12656+7 1770 3E00 LD A,0x00 ; SCL LOW, SDA LOW + 198:12663+11 1772 D3F4 OUT (CS_PIO_AD), A + 199:12674+4 1774 00 NOP + 200:12678+4 1775 00 NOP + 201:12682+10 1776 C9 RET 202: - 203: - 165F iic_send_nack: + 203: - 1777 iic_send_nack: 204: ;Set port to controll mode (MODE3) - 205:11555+7 165F 3ECF LD A,0xCF - 206:11562+11 1661 D3F6 OUT (CS_PIO_AC), A + 205:12692+7 1777 3ECF LD A,0xCF + 206:12699+11 1779 D3F6 OUT (CS_PIO_AC), A 207: ;Set inputs/outputs (SDA and SCL is now output) - 208:11573+7 1663 3EFC LD A,0xFC - 209:11580+11 1665 D3F6 OUT (CS_PIO_AC), A - 210:11591+4 1667 00 NOP - 211:11595+4 1668 00 NOP - 212:11599+7 1669 3E02 LD A,0x02 ; SCL LOW, SDA HIGH - 213:11606+11 166B D3F4 OUT (CS_PIO_AD), A - 214:11617+4 166D 00 NOP - 215:11621+4 166E 00 NOP - 216:11625+7 166F 3E03 LD A,0x03 ; both high - 217:11632+11 1671 D3F4 OUT (CS_PIO_AD), A - 218:11643+4 1673 00 NOP - 219:11647+4 1674 00 NOP - 220:11651+7 1675 3E02 LD A,0x02 ; SCL LOW, SDA HIGH - 221:11658+11 1677 D3F4 OUT (CS_PIO_AD), A - 222:11669+4 1679 00 NOP - 223:11673+4 167A 00 NOP - 224:11677+10 167B C9 RET + 208:12710+7 177B 3EFC LD A,0xFC + 209:12717+11 177D D3F6 OUT (CS_PIO_AC), A + 210:12728+4 177F 00 NOP + 211:12732+4 1780 00 NOP + 212:12736+7 1781 3E02 LD A,0x02 ; SCL LOW, SDA HIGH + 213:12743+11 1783 D3F4 OUT (CS_PIO_AD), A + 214:12754+4 1785 00 NOP + 215:12758+4 1786 00 NOP + 216:12762+7 1787 3E03 LD A,0x03 ; both high + 217:12769+11 1789 D3F4 OUT (CS_PIO_AD), A + 218:12780+4 178B 00 NOP + 219:12784+4 178C 00 NOP + 220:12788+7 178D 3E02 LD A,0x02 ; SCL LOW, SDA HIGH + 221:12795+11 178F D3F4 OUT (CS_PIO_AD), A + 222:12806+4 1791 00 NOP + 223:12810+4 1792 00 NOP + 224:12814+10 1793 C9 RET 225: 226: ;A contains byte - 227: - 167C iic_send_byte: - 228:11687+11 167C C5 PUSH BC - 229:11698+4 167D 4F LD C,A ;buffer + 227: - 1794 iic_send_byte: + 228:12824+11 1794 C5 PUSH BC + 229:12835+4 1795 4F LD C,A ;buffer 230: ;Set port to controll mode (MODE3) - 231:11702+7 167E 3ECF LD A,0xCF - 232:11709+11 1680 D3F6 OUT (CS_PIO_AC), A + 231:12839+7 1796 3ECF LD A,0xCF + 232:12846+11 1798 D3F6 OUT (CS_PIO_AC), A 233: ;Set inputs/outputs (SDA and SCL is now output) - 234:11720+7 1682 3EFC LD A,0xFC - 235:11727+11 1684 D3F6 OUT (CS_PIO_AC), A - 236:11738+7 1686 0608 LD B,8 ;bit counter + 234:12857+7 179A 3EFC LD A,0xFC + 235:12864+11 179C D3F6 OUT (CS_PIO_AC), A + 236:12875+7 179E 0608 LD B,8 ;bit counter 237: - 238: - 1688 iic_send_byte_loop: + 238: - 17A0 iic_send_byte_loop: 239: ;prepare data - 240:11745+8 1688 CB11 RL C - 241:11753+7 168A 3E00 LD A,0 - 242:11760+4 168C 17 RLA ; set SCA bit from carry, SCL LOW - 243:11764+11 168D D3F4 OUT (CS_PIO_AD), A - 244:11775+4 168F 00 NOP - 245:11779+4 1690 00 NOP - 246:11783+7 1691 EE02 XOR 0x02 ;set SCL HIGH - 247:11790+11 1693 D3F4 OUT (CS_PIO_AD), A - 248:11801+4 1695 00 NOP - 249:11805+4 1696 00 NOP - 250:11809+7 1697 EE02 XOR 0x02 ;set SCL LOW - 251:11816+11 1699 D3F4 OUT (CS_PIO_AD), A - 252:11827+4 169B 00 NOP - 253:11831+4 169C 00 NOP - 254:11835+8+5 169D 10E9 DJNZ iic_send_byte_loop ;loop until counter is 0 + 240:12882+8 17A0 CB11 RL C + 241:12890+7 17A2 3E00 LD A,0 + 242:12897+4 17A4 17 RLA ; set SCA bit from carry, SCL LOW + 243:12901+11 17A5 D3F4 OUT (CS_PIO_AD), A + 244:12912+4 17A7 00 NOP + 245:12916+4 17A8 00 NOP + 246:12920+7 17A9 EE02 XOR 0x02 ;set SCL HIGH + 247:12927+11 17AB D3F4 OUT (CS_PIO_AD), A + 248:12938+4 17AD 00 NOP + 249:12942+4 17AE 00 NOP + 250:12946+7 17AF EE02 XOR 0x02 ;set SCL LOW + 251:12953+11 17B1 D3F4 OUT (CS_PIO_AD), A + 252:12964+4 17B3 00 NOP + 253:12968+4 17B4 00 NOP + 254:12972+8+5 17B5 10E9 DJNZ iic_send_byte_loop ;loop until counter is 0 255: ;transmittion end / end loop - 256:11843+4 169F 79 LD A,C - 257:11847+10 16A0 C1 POP BC - 258:11857+10 16A1 C9 RET + 256:12980+4 17B7 79 LD A,C + 257:12984+10 17B8 C1 POP BC + 258:12994+10 17B9 C9 RET 259: - 260: - 16A2 iic_receive_byte: - 261:11867+11 16A2 C5 PUSH BC + 260: - 17BA iic_receive_byte: + 261:13004+11 17BA C5 PUSH BC 262: ;Set port to controll mode (MODE3) - 263:11878+7 16A3 3ECF LD A,0xCF - 264:11885+11 16A5 D3F6 OUT (CS_PIO_AC), A + 263:13015+7 17BB 3ECF LD A,0xCF + 264:13022+11 17BD D3F6 OUT (CS_PIO_AC), A 265: ;Set inputs/outputs (SCL is now output, SDA input) - 266:11896+7 16A7 3EFD LD A,0xFD - 267:11903+11 16A9 D3F6 OUT (CS_PIO_AC), A - 268:11914+7 16AB 0608 LD B,8 ;bit counter - 269:11921+7 16AD 0E00 LD C,0 - 270: - 16AF iic_receive_byte_loop: - 271:11928+4 16AF AF XOR A ;set SCL LOW - 272:11932+11 16B0 D3F4 OUT (CS_PIO_AD), A - 273:11943+4 16B2 00 NOP - 274:11947+4 16B3 00 NOP - 275:11951+7 16B4 3E02 LD A,2 ;set SCL HIGH - 276:11958+11 16B6 D3F4 OUT (CS_PIO_AD), A - 277:11969+4 16B8 00 NOP - 278:11973+11 16B9 DBF4 IN A, (CS_PIO_AD) - 279:11984+4 16BB 00 NOP - 280:11988+4 16BC 1F RRA ;read SDA bit - 281:11992+8 16BD CB11 RL C ;store bit - 282:12000+4 16BF AF XOR A ;set SCL LOW again - 283:12004+11 16C0 D3F4 OUT (CS_PIO_AD), A - 284:12015+4 16C2 00 NOP - 285:12019+4 16C3 00 NOP - 286:12023+8+5 16C4 10E9 DJNZ iic_receive_byte_loop - 287:12031+4 16C6 79 LD A,C - 288:12035+10 16C7 C1 POP BC + 266:13033+7 17BF 3EFD LD A,0xFD + 267:13040+11 17C1 D3F6 OUT (CS_PIO_AC), A + 268:13051+7 17C3 0608 LD B,8 ;bit counter + 269:13058+7 17C5 0E00 LD C,0 + 270: - 17C7 iic_receive_byte_loop: + 271:13065+4 17C7 AF XOR A ;set SCL LOW + 272:13069+11 17C8 D3F4 OUT (CS_PIO_AD), A + 273:13080+4 17CA 00 NOP + 274:13084+4 17CB 00 NOP + 275:13088+7 17CC 3E02 LD A,2 ;set SCL HIGH + 276:13095+11 17CE D3F4 OUT (CS_PIO_AD), A + 277:13106+4 17D0 00 NOP + 278:13110+11 17D1 DBF4 IN A, (CS_PIO_AD) + 279:13121+4 17D3 00 NOP + 280:13125+4 17D4 1F RRA ;read SDA bit + 281:13129+8 17D5 CB11 RL C ;store bit + 282:13137+4 17D7 AF XOR A ;set SCL LOW again + 283:13141+11 17D8 D3F4 OUT (CS_PIO_AD), A + 284:13152+4 17DA 00 NOP + 285:13156+4 17DB 00 NOP + 286:13160+8+5 17DC 10E9 DJNZ iic_receive_byte_loop + 287:13168+4 17DE 79 LD A,C + 288:13172+10 17DF C1 POP BC **** main.asm **** - 179:12045+10 16C8 C9 RET - 180: .include "prettydump.s" + 182:13182+10 17E0 C9 RET + 183: .include "prettydump.s" **** include/prettydump.s **** 1: ;---------------------------------------------------------------- 2: ;HEX and ASCII dump function @@ -2887,67 +3042,67 @@ 11: ; HL contains start address 12: ; Destroys BC, HL 13: ;------------------------------------------------------------------------------ - 14: - 16C9 dump_pretty: - 15:12055+11 16C9 E5 PUSH HL - 16:12066+10 16CA 212417 LD HL,[STR_PD_HEADER] ;Print header - 17:12076+17 16CD CDDF00 CALL print_str - 18:12093+10 16D0 E1 POP HL - 19: - 16D1 dump_pretty_row: - 20:12103+4 16D1 78 LD A,B ;Check row counter - 21:12107+4 16D2 B7 OR A - 22:12111+10 16D3 CA2317 JP Z, dump_pretty_end ;If counter is 0, exit - 23:12121+4 16D6 05 DEC B ;Decrement row counter by 1 - 24:12125+7 16D7 0E10 LD C, 16 ;Load column counter - 25:12132+4 16D9 7C LD A, H ;Print base address - 26:12136+17 16DA CD0701 CALL print_a_hex - 27:12153+4 16DD 7D LD A, L - 28:12157+17 16DE CD0701 CALL print_a_hex - 29:12174+7 16E1 3E20 LD A, ' ' - 30:12181+17 16E3 CDD700 CALL print_char - 31: - 16E6 dump_pretty_col: ;Loop for column - 32:12198+7 16E6 7E LD A,(HL) ;Load byte to disply - 33:12205+17 16E7 CD0701 CALL print_a_hex - 34:12222+7 16EA 3E20 LD A, ' ' - 35:12229+17 16EC CDD700 CALL print_char - 36:12246+6 16EF 23 INC HL - 37:12252+4 16F0 0D DEC C ;Decrement column counter - 38:12256+7+5 16F1 20F3 JR NZ, dump_pretty_col ;Loop if not 0 - 39: - 16F3 dump_pretty_ascii: - 40:12263+11 16F3 C5 PUSH BC - 41:12274+11 16F4 E5 PUSH HL - 42:12285+7 16F5 0600 LD B,0 - 43:12292+7 16F7 0E10 LD C,16 - 44:12299+15 16F9 ED42 SBC HL,BC ;Reset HL by column count - 45: - 16FB dump_pretty_ascii_loop: - 46:12314+7 16FB 7E LD A,(HL) - 47:12321+6 16FC 23 INC HL - 48:12327+7 16FD FE20 CP 32 - 49:12334+10 16FF DA0C17 JP C, dump_pretty_ascii_none ;if less than 32, it is not a char - 50:12344+7 1702 FE7F CP 127 - 51:12351+10 1704 D20C17 JP NC, dump_pretty_ascii_none ;if greater or equal than 128, it is not a char - 52:12361+17 1707 CDD700 call print_char - 53:12378+12 170A 1805 jr dump_pretty_ascii_cont - 54: - 170C dump_pretty_ascii_none: - 55:12390+7 170C 3E2E LD A,'.' - 56:12397+17 170E CDD700 call print_char - 57: - 1711 dump_pretty_ascii_cont: - 58:12414+4 1711 0D DEC C - 59:12418+10 1712 C2FB16 JP NZ, dump_pretty_ascii_loop + 14: - 17E1 dump_pretty: + 15:13192+11 17E1 E5 PUSH HL + 16:13203+10 17E2 213C18 LD HL,[STR_PD_HEADER] ;Print header + 17:13213+17 17E5 CDE600 CALL print_str + 18:13230+10 17E8 E1 POP HL + 19: - 17E9 dump_pretty_row: + 20:13240+4 17E9 78 LD A,B ;Check row counter + 21:13244+4 17EA B7 OR A + 22:13248+10 17EB CA3B18 JP Z, dump_pretty_end ;If counter is 0, exit + 23:13258+4 17EE 05 DEC B ;Decrement row counter by 1 + 24:13262+7 17EF 0E10 LD C, 16 ;Load column counter + 25:13269+4 17F1 7C LD A, H ;Print base address + 26:13273+17 17F2 CD0E01 CALL print_a_hex + 27:13290+4 17F5 7D LD A, L + 28:13294+17 17F6 CD0E01 CALL print_a_hex + 29:13311+7 17F9 3E20 LD A, ' ' + 30:13318+17 17FB CDDE00 CALL print_char + 31: - 17FE dump_pretty_col: ;Loop for column + 32:13335+7 17FE 7E LD A,(HL) ;Load byte to disply + 33:13342+17 17FF CD0E01 CALL print_a_hex + 34:13359+7 1802 3E20 LD A, ' ' + 35:13366+17 1804 CDDE00 CALL print_char + 36:13383+6 1807 23 INC HL + 37:13389+4 1808 0D DEC C ;Decrement column counter + 38:13393+7+5 1809 20F3 JR NZ, dump_pretty_col ;Loop if not 0 + 39: - 180B dump_pretty_ascii: + 40:13400+11 180B C5 PUSH BC + 41:13411+11 180C E5 PUSH HL + 42:13422+7 180D 0600 LD B,0 + 43:13429+7 180F 0E10 LD C,16 + 44:13436+15 1811 ED42 SBC HL,BC ;Reset HL by column count + 45: - 1813 dump_pretty_ascii_loop: + 46:13451+7 1813 7E LD A,(HL) + 47:13458+6 1814 23 INC HL + 48:13464+7 1815 FE20 CP 32 + 49:13471+10 1817 DA2418 JP C, dump_pretty_ascii_none ;if less than 32, it is not a char + 50:13481+7 181A FE7F CP 127 + 51:13488+10 181C D22418 JP NC, dump_pretty_ascii_none ;if greater or equal than 128, it is not a char + 52:13498+17 181F CDDE00 call print_char + 53:13515+12 1822 1805 jr dump_pretty_ascii_cont + 54: - 1824 dump_pretty_ascii_none: + 55:13527+7 1824 3E2E LD A,'.' + 56:13534+17 1826 CDDE00 call print_char + 57: - 1829 dump_pretty_ascii_cont: + 58:13551+4 1829 0D DEC C + 59:13555+10 182A C21318 JP NZ, dump_pretty_ascii_loop 60: 61: - 62:12428+10 1715 E1 POP HL - 63:12438+10 1716 C1 POP BC - 64: - 1717 dump_pretty_nextrow: - 65:12448+7 1717 3E0A LD A,10 ;New line - 66:12455+17 1719 CDD700 CALL print_char - 67:12472+7 171C 3E0D LD A,13 - 68:12479+17 171E CDD700 CALL print_char - 69:12496+12 1721 18AE JR dump_pretty_row ;Else next line - 70: - 1723 dump_pretty_end: - 71:12508+10 1723 C9 RET + 62:13565+10 182D E1 POP HL + 63:13575+10 182E C1 POP BC + 64: - 182F dump_pretty_nextrow: + 65:13585+7 182F 3E0A LD A,10 ;New line + 66:13592+17 1831 CDDE00 CALL print_char + 67:13609+7 1834 3E0D LD A,13 + 68:13616+17 1836 CDDE00 CALL print_char + 69:13633+12 1839 18AE JR dump_pretty_row ;Else next line + 70: - 183B dump_pretty_end: + 71:13645+10 183B C9 RET 72: - 73: - 1724 STR_PD_HEADER: - 74: - 1724 0D0A4241 db 13,10,'BASE 0 1 2 3 4 5 6 7 8 9 A B C D E F ASCII',13,10,0 + 73: - 183C STR_PD_HEADER: + 74: - 183C 0D0A4241 db 13,10,'BASE 0 1 2 3 4 5 6 7 8 9 A B C D E F ASCII',13,10,0 53452030 20203120 20322020 @@ -2972,648 +3127,654 @@ 81: ; B contains length 82: ; HL contains start address 83: ;------------------------------------------------------------------------------ - 84: - 1763 print_str_fixed: - 85:12518+7 1763 7E LD A,(HL) - 86:12525+6 1764 23 INC HL - 87:12531+17 1765 CDD700 CALL print_char - 88:12548+8+5 1768 10F9 DJNZ print_str_fixed - 89:12556+10 176A C9 RET + 84: - 187B print_str_fixed: + 85:13655+7 187B 7E LD A,(HL) + 86:13662+6 187C 23 INC HL + 87:13668+17 187D CDDE00 CALL print_char + 88:13685+8+5 1880 10F9 DJNZ print_str_fixed + 89:13693+10 1882 C9 RET 90: **** main.asm **** - 181: .include "command.s" + 184: .include "command.s" **** include/command.s **** - 1: - 176B COMMAND_LUT: - 2: - 176B 64617465 db "date", 0 , [OP_RTIME], [OP_RTIME]>>8 ;Read time - 00901A - 3: - 1772 73657464 db "setdate", 0 , [OP_STIME], [OP_STIME]>>8 ;Read time + 1: - 1883 COMMAND_LUT: + 2: - 1883 64617465 db "date", 0 , [OP_RTIME], [OP_RTIME]>>8 ;Read time + 00C01B + 3: - 188A 73657464 db "setdate", 0 , [OP_STIME], [OP_STIME]>>8 ;Read time 61746500 - 281C - 4: - 177C 70696E20 db "pin ", 0 , [OP_IO_IN], [OP_IO_IN]>>8 ;Read port - 00A919 - 5: - 1783 64756D70 db "dump ",0, [OP_DUMP], [OP_DUMP]>>8 ;print pretty hexdump - 20001819 - 6: - 178B 706F7574 db "pout ", 0 , [OP_IO_OUT], [OP_IO_OUT]>>8 ;Write port - 2000BF19 - 7: - 1793 69696E20 db "iin ", 0, [OP_IIC_IN], [OP_IIC_IN]>>8 ;Read IIC - 00401A - 8: - 179A 696F7574 db "iout ", 0, [OP_IIC_OUT], [OP_IIC_OUT]>>8 ;Write IIC - 2000E019 - 9: - 17A2 63616C6C db "call ", 0, [OP_CALL], [OP_CALL]>>8 ;Call to addr - 2000F818 - 10: - 17AA 636C7200 db "clr", 0, [OP_CLR], [OP_CLR]>>8 ;Call to addr - 8C1A - 11: - 17B0 6461736D db "dasm ", 0, [OP_DASM], [OP_DASM]>>8 ;Call to addr - 20007919 - 12: - 17B8 6A702000 db "jp ", 0,[OP_EXEC], [OP_EXEC]>>8 ;jump to addr - DF18 - 13: - 17BE 72737400 db "rst", 0,0x00,0x00 ;soft reset + 581D + 4: - 1894 70696E20 db "pin ", 0 , [OP_IO_IN], [OP_IO_IN]>>8 ;Read port + 00D91A + 5: - 189B 64756D70 db "dump ",0, [OP_DUMP], [OP_DUMP]>>8 ;print pretty hexdump + 2000481A + 6: - 18A3 706F7574 db "pout ", 0 , [OP_IO_OUT], [OP_IO_OUT]>>8 ;Write port + 2000EF1A + 7: - 18AB 69696E20 db "iin ", 0, [OP_IIC_IN], [OP_IIC_IN]>>8 ;Read IIC + 00701B + 8: - 18B2 696F7574 db "iout ", 0, [OP_IIC_OUT], [OP_IIC_OUT]>>8 ;Write IIC + 2000101B + 9: - 18BA 63616C6C db "call ", 0, [OP_CALL], [OP_CALL]>>8 ;Call to addr + 2000281A + 10: - 18C2 636C7200 db "clr", 0, [OP_CLR], [OP_CLR]>>8 ;Call to addr + BC1B + 11: - 18C8 6461736D db "dasm ", 0, [OP_DASM], [OP_DASM]>>8 ;Call to addr + 2000A91A + 12: - 18D0 6A702000 db "jp ", 0,[OP_EXEC], [OP_EXEC]>>8 ;jump to addr + 0F1A + 13: - 18D6 72737400 db "rst", 0,0x00,0x00 ;soft reset 0000 - 14: - 17C4 6C736473 db "lsdsk", 0,[OP_LSDSK], [OP_LSDSK]>>8 ;list disks - 6B00A11C - 15: - 17CC 73656C64 db "seldsk ", 0,[OP_SELDSK], [OP_SELDSK]>>8 ;select disk + 14: - 18DC 6C736473 db "lsdsk", 0,[OP_LSDSK], [OP_LSDSK]>>8 ;list disks + 6B00D11D + 15: - 18E4 73656C64 db "seldsk ", 0,[OP_SELDSK], [OP_SELDSK]>>8 ;select disk 736B2000 - A51C - 16: - 17D6 2400DF18 db "$", 0, [OP_EXEC], [OP_EXEC]>>8 ;jump to addr - 17: - 17DA 6900A919 db "i", 0, [OP_IO_IN], [OP_IO_IN]>>8 ;Read port - 18: - 17DE 6F00BF19 db "o", 0, [OP_IO_OUT], [OP_IO_OUT]>>8 ;Write port - 19: - 17E2 21004819 db "!", 0, [OP_SET], [OP_SET]>>8 ;Write memory - 20: - 17E6 3F001819 db "?", 0, [OP_DUMP], [OP_DUMP]>>8 ;Print memory - 21: - 17EA FF db 0xFF ;End of Table - 22: - 23: - 402B IN_BUFFER .equ var_buffer - 24: - 25: - 17EB COMMAND: - 26:12566+17 17EB CDF100 call print_newLine - 27:12583+7 17EE 3E3E ld a,'>' - 28:12590+17 17F0 CDD700 call print_char - 29:12607+4 17F3 AF xor a ;reset buffer len - 30:12611+13 17F4 320040 ld (var_buffer_len),a - 31: - 17F7 COMMAND_READ: - 32:12624+17 17F7 CD1F01 call read_char - 33:12641+10 17FA CAF717 jp z, COMMAND_READ ;wait for input - 34:12651+7 17FD FE0D cp 13 ; enter - 35:12658+10 17FF CA4C18 jp z,COMMAND_PROCESS - 36:12668+7 1802 FE0A cp 10 - 37:12675+10 1804 CAF717 jp z, COMMAND_READ; skip LF for file load - 38:12685+7 1807 FE08 cp 0x08 ; backspace 0x08 VT102 0x7f Putty - 39:12692+10 1809 CA2618 jp z,COMMAND_BACKSPACE - 40: - 41:12702+11 180C F5 push af - 42: ; a contains latest char - 43:12713+10 180D 212B40 ld hl,[var_buffer] - 44:12723+7 1810 1600 ld d,0 - 45:12730+13 1812 3A0040 ld a,(var_buffer_len) - 46:12743+4 1815 5F ld e,a - 47:12747+11 1816 19 add hl,de ;hl now contains pointer to last position in buffer - 48:12758+4 1817 3C inc a - 49:12762+13 1818 320040 ld (var_buffer_len),a ;store incremented buffer length - 50: - 51:12775+10 181B F1 pop af - 52:12785+7 181C 77 ld (hl),a - 53:12792+17 181D CDD700 call print_char - 54:12809+6 1820 23 inc hl - 55:12815+4 1821 AF xor a ;a = 0 - 56:12819+7 1822 77 ld (hl),a ;always add null termination after last char - 57:12826+10 1823 C3F717 jp COMMAND_READ - 58: - 59: - 60: - 1826 COMMAND_BACKSPACE: - 61:12836+13 1826 3A0040 ld a,(var_buffer_len) - 62:12849+4 1829 A7 and a - 63:12853+10 182A CAF717 jp z, COMMAND_READ ; do not continue if already at char 0 - 64:12863+4 182D 3D dec a ;decrement length - 65:12867+13 182E 320040 ld (var_buffer_len),a ;and store it - 66:12880+4 1831 5F ld e,a ;load de with decremented value - 67:12884+7 1832 1600 ld d,0 - 68:12891+10 1834 212B40 ld hl,[var_buffer] - 69:12901+11 1837 19 add hl,de ;hl now contains pointer to last position in buffer - 70:12912+4 1838 AF xor a ; store null byte to current location - 71:12916+7 1839 77 ld (hl),a - 72: ;call print_delete - 73:12923+7 183A 3E08 ld a, 0x08 - 74:12930+17 183C CDD700 call print_char - 75:12947+7 183F 3E20 ld a, 0x20 - 76:12954+17 1841 CDD700 call print_char - 77:12971+7 1844 3E08 ld a, 0x08 - 78:12978+17 1846 CDD700 call print_char - 79:12995+10 1849 C3F717 jp COMMAND_READ - 80: - 184C COMMAND_PROCESS: - 81: ;compare - 82:13005+10 184C 216B17 LD HL,[COMMAND_LUT] ;Lookup table - 83: - 184F COMMAND_PROCESS_LOOP: - 84:13015+10 184F 112B40 LD DE,[var_buffer] ;Buffer - 85:13025+7 1852 7E LD A,(HL) ;Load first byte of entry - 86:13032+7 1853 FEFF CP 0xFF - 87:13039+10 1855 CA7E18 JP Z,COMMAND_PROCESS_NOT_FOUND ;if first byte is 0xFF, End is reached - 88: ; compare string loop - 89: - 1858 COMMAND_PROCESS_LOOP_STR1: - 90:13049+7 1858 1A LD A,(DE) - 91:13056+4 1859 47 LD B,A - 92:13060+7 185A 7E LD A,(HL) - 93:13067+4 185B B0 OR B ;not 0 -> match - 94:13071+10 185C CA8718 JP Z, COMMAND_PROCESS_FOUND ;match - 95: - 96:13081+7 185F 1A LD A,(DE) - 97:13088+4 1860 47 LD B,A - 98: ;LD A,(HL) ;Load first byte of entry - 99: ;call print_a_hex - 100:13092+7 1861 7E LD A,(HL) - 101: ;compare byte - 102:13099+4 1862 A8 XOR B - 103:13103+4 1863 B7 OR A ;if identical = resoult shopuld be zero - 104:13107+10 1864 CA6E18 JP Z, COMMAND_PROCESS_LOOP_STR2 ;then continue - 105: ; if not identical - 106:13117+7 1867 7E LD A,(HL) - 107:13124+4 1868 B7 OR A ;if reached end of compare string - 108:13128+10 1869 CA8718 JP Z, COMMAND_PROCESS_FOUND ;match - 109:13138+12 186C 1805 JR COMMAND_PROCESS_NEXT_ENTRY ;next entry on no match - 110: - 111: - 186E COMMAND_PROCESS_LOOP_STR2: ;continue with next char - 112:13150+6 186E 23 INC HL - 113:13156+6 186F 13 INC DE - 114:13162+12 1870 18E6 JR COMMAND_PROCESS_LOOP_STR1 - 115: - 116: - 1872 COMMAND_PROCESS_NEXT_ENTRYI: ;do not jump here - 117:13174+6 1872 23 INC HL - 118: - 1873 COMMAND_PROCESS_NEXT_ENTRY: ;jump here - 119:13180+7 1873 7E LD A,(HL) - 120:13187+4 1874 B7 OR A - 121:13191+10 1875 C27218 JP NZ,COMMAND_PROCESS_NEXT_ENTRYI ;loop until end of string - 122:13201+6 1878 23 INC HL ;skip pointer - 123:13207+6 1879 23 INC HL - 124:13213+6 187A 23 INC HL - 125:13219+10 187B C34F18 JP COMMAND_PROCESS_LOOP - 126: - 187E COMMAND_PROCESS_NOT_FOUND: - 127:13229+10 187E 21B818 LD HL,[_STR_NOT_FOUND] - 128:13239+17 1881 CDDF00 CALL print_str - 129:13256+10 1884 C3EB17 JP COMMAND - 130: - 131: - 1887 COMMAND_PROCESS_FOUND: - 132:13266+11 1887 E5 PUSH HL - 133:13277+10 1888 C1 POP BC - 134:13287+6 1889 03 INC BC - 135:13293+7 188A 0A LD A,(BC) - 136:13300+4 188B 6F LD L,A - 137:13304+6 188C 03 INC BC - 138:13310+7 188D 0A LD A,(BC) - 139:13317+4 188E 67 LD H,A - 140: - 141: ;HL: pointer to start of routine - 142: ;DE: buffer start of arguments - 143:13321+17 188F CD9518 CALL _COMMAND_PROCESS_FOUND - 144:13338+10 1892 C3EB17 JP COMMAND - 145: - 1895 _COMMAND_PROCESS_FOUND - 146:13348+4 1895 E9 JP (HL) - 147: - 148: - 1896 NOT_IMPLEMENTED: - 149:13352+10 1896 21A418 LD HL,[_STR_NOT_IMPLEMENTED] - 150:13362+17 1899 CDDF00 CALL print_str - 151:13379+10 189C C9 RET - 152: - 153: - 189D ERR_SYNTAX: - 154:13389+10 189D 21CC18 LD HL,[_STR_SYNTAX] - 155:13399+17 18A0 CDDF00 CALL print_str - 156:13416+10 18A3 C9 RET - 157: - 158: - 18A4 _STR_NOT_IMPLEMENTED: - 159: - 18A4 0A0D6E6F db 10,13,"not implemented",10,13,0 + D51D + 16: - 18EE 63642000 db "cd ", 0 , [OP_CD], [OP_CD]>>8 ;Read time + F81D + 17: - 18F4 6C7300F4 db "ls", 0 , [OP_DIR], [OP_DIR]>>8 ;Read time + 1D + 18: - 18F9 72756E20 db "run ", 0 , [OP_FSEXEC], [OP_FSEXEC]>>8 ;Read time + 00151E + 19: - 1900 24000F1A db "$", 0, [OP_EXEC], [OP_EXEC]>>8 ;jump to addr + 20: - 1904 6900D91A db "i", 0, [OP_IO_IN], [OP_IO_IN]>>8 ;Read port + 21: - 1908 6F00EF1A db "o", 0, [OP_IO_OUT], [OP_IO_OUT]>>8 ;Write port + 22: - 190C 2100781A db "!", 0, [OP_SET], [OP_SET]>>8 ;Write memory + 23: - 1910 3F00481A db "?", 0, [OP_DUMP], [OP_DUMP]>>8 ;Print memory + 24: - 1914 FF db 0xFF ;End of Table + 25: + 26: - 1915 COMMAND: + 27:13703+17 1915 CDF800 call print_newLine + 28:13720+10 1918 212B40 ld hl,[var_dir] + 29:13730+17 191B CDE600 call print_str + 30:13747+7 191E 3E3E ld a,'>' + 31:13754+17 1920 CDDE00 call print_char + 32:13771+4 1923 AF xor a ;reset buffer len + 33:13775+13 1924 320040 ld (var_buffer_len),a ;set buffer len to 0 + 34: - 1927 COMMAND_READ: + 35:13788+17 1927 CD2601 call read_char + 36:13805+10 192A CA2719 jp z, COMMAND_READ ;wait for input + 37:13815+7 192D FE0D cp 13 ; enter + 38:13822+10 192F CA7C19 jp z,COMMAND_PROCESS + 39:13832+7 1932 FE0A cp 10 + 40:13839+10 1934 CA2719 jp z, COMMAND_READ; skip LF for file load + 41:13849+7 1937 FE08 cp 0x08 ; backspace 0x08 VT102 0x7f Putty + 42:13856+10 1939 CA5619 jp z,COMMAND_BACKSPACE + 43: + 44:13866+11 193C F5 push af + 45: ; a contains latest char + 46:13877+10 193D 217B40 ld hl,[var_input] + 47:13887+7 1940 1600 ld d,0 + 48:13894+13 1942 3A0040 ld a,(var_buffer_len) + 49:13907+4 1945 5F ld e,a + 50:13911+11 1946 19 add hl,de ;hl now contains pointer to last position in buffer + 51:13922+4 1947 3C inc a + 52:13926+13 1948 320040 ld (var_buffer_len),a ;store incremented buffer length + 53: + 54:13939+10 194B F1 pop af + 55:13949+7 194C 77 ld (hl),a + 56:13956+17 194D CDDE00 call print_char + 57:13973+6 1950 23 inc hl + 58:13979+4 1951 AF xor a ;a = 0 + 59:13983+7 1952 77 ld (hl),a ;always add null termination after last char + 60:13990+10 1953 C32719 jp COMMAND_READ + 61: + 62: + 63: - 1956 COMMAND_BACKSPACE: + 64:14000+13 1956 3A0040 ld a,(var_buffer_len) + 65:14013+4 1959 A7 and a + 66:14017+10 195A CA2719 jp z, COMMAND_READ ; do not continue if already at char 0 + 67:14027+4 195D 3D dec a ;decrement length + 68:14031+13 195E 320040 ld (var_buffer_len),a ;and store it + 69:14044+4 1961 5F ld e,a ;load de with decremented value + 70:14048+7 1962 1600 ld d,0 + 71:14055+10 1964 217B40 ld hl,[var_input] + 72:14065+11 1967 19 add hl,de ;hl now contains pointer to last position in buffer + 73:14076+4 1968 AF xor a ; store null byte to current location + 74:14080+7 1969 77 ld (hl),a + 75: ;call print_delete + 76:14087+7 196A 3E08 ld a, 0x08 + 77:14094+17 196C CDDE00 call print_char + 78:14111+7 196F 3E20 ld a, 0x20 + 79:14118+17 1971 CDDE00 call print_char + 80:14135+7 1974 3E08 ld a, 0x08 + 81:14142+17 1976 CDDE00 call print_char + 82:14159+10 1979 C32719 jp COMMAND_READ + 83: - 197C COMMAND_PROCESS: + 84: ;compare + 85:14169+10 197C 218318 LD HL,[COMMAND_LUT] ;Lookup table + 86: - 197F COMMAND_PROCESS_LOOP: + 87:14179+10 197F 117B40 LD DE,[var_input] ;Buffer + 88:14189+7 1982 7E LD A,(HL) ;Load first byte of entry + 89:14196+7 1983 FEFF CP 0xFF + 90:14203+10 1985 CAAE19 JP Z,COMMAND_PROCESS_NOT_FOUND ;if first byte is 0xFF, End is reached + 91: ; compare string loop + 92: - 1988 COMMAND_PROCESS_LOOP_STR1: + 93:14213+7 1988 1A LD A,(DE) + 94:14220+4 1989 47 LD B,A + 95:14224+7 198A 7E LD A,(HL) + 96:14231+4 198B B0 OR B ;not 0 -> match + 97:14235+10 198C CAB719 JP Z, COMMAND_PROCESS_FOUND ;match + 98: + 99:14245+7 198F 1A LD A,(DE) + 100:14252+4 1990 47 LD B,A + 101: ;LD A,(HL) ;Load first byte of entry + 102: ;call print_a_hex + 103:14256+7 1991 7E LD A,(HL) + 104: ;compare byte + 105:14263+4 1992 A8 XOR B + 106:14267+4 1993 B7 OR A ;if identical = resoult shopuld be zero + 107:14271+10 1994 CA9E19 JP Z, COMMAND_PROCESS_LOOP_STR2 ;then continue + 108: ; if not identical + 109:14281+7 1997 7E LD A,(HL) + 110:14288+4 1998 B7 OR A ;if reached end of compare string + 111:14292+10 1999 CAB719 JP Z, COMMAND_PROCESS_FOUND ;match + 112:14302+12 199C 1805 JR COMMAND_PROCESS_NEXT_ENTRY ;next entry on no match + 113: + 114: - 199E COMMAND_PROCESS_LOOP_STR2: ;continue with next char + 115:14314+6 199E 23 INC HL + 116:14320+6 199F 13 INC DE + 117:14326+12 19A0 18E6 JR COMMAND_PROCESS_LOOP_STR1 + 118: + 119: - 19A2 COMMAND_PROCESS_NEXT_ENTRYI: ;do not jump here + 120:14338+6 19A2 23 INC HL + 121: - 19A3 COMMAND_PROCESS_NEXT_ENTRY: ;jump here + 122:14344+7 19A3 7E LD A,(HL) + 123:14351+4 19A4 B7 OR A + 124:14355+10 19A5 C2A219 JP NZ,COMMAND_PROCESS_NEXT_ENTRYI ;loop until end of string + 125:14365+6 19A8 23 INC HL ;skip pointer + 126:14371+6 19A9 23 INC HL + 127:14377+6 19AA 23 INC HL + 128:14383+10 19AB C37F19 JP COMMAND_PROCESS_LOOP + 129: - 19AE COMMAND_PROCESS_NOT_FOUND: + 130:14393+10 19AE 21E819 LD HL,[_STR_NOT_FOUND] + 131:14403+17 19B1 CDE600 CALL print_str + 132:14420+10 19B4 C31519 JP COMMAND + 133: + 134: - 19B7 COMMAND_PROCESS_FOUND: + 135:14430+11 19B7 E5 PUSH HL + 136:14441+10 19B8 C1 POP BC + 137:14451+6 19B9 03 INC BC + 138:14457+7 19BA 0A LD A,(BC) + 139:14464+4 19BB 6F LD L,A + 140:14468+6 19BC 03 INC BC + 141:14474+7 19BD 0A LD A,(BC) + 142:14481+4 19BE 67 LD H,A + 143: + 144: ;HL: pointer to start of routine + 145: ;DE: buffer start of arguments + 146:14485+17 19BF CDC519 CALL _COMMAND_PROCESS_FOUND + 147:14502+10 19C2 C31519 JP COMMAND + 148: - 19C5 _COMMAND_PROCESS_FOUND + 149:14512+4 19C5 E9 JP (HL) + 150: + 151: - 19C6 NOT_IMPLEMENTED: + 152:14516+10 19C6 21D419 LD HL,[_STR_NOT_IMPLEMENTED] + 153:14526+17 19C9 CDE600 CALL print_str + 154:14543+10 19CC C9 RET + 155: + 156: - 19CD ERR_SYNTAX: + 157:14553+10 19CD 21FC19 LD HL,[_STR_SYNTAX] + 158:14563+17 19D0 CDE600 CALL print_str + 159:14580+10 19D3 C9 RET + 160: + 161: - 19D4 _STR_NOT_IMPLEMENTED: + 162: - 19D4 0A0D6E6F db 10,13,"not implemented",10,13,0 7420696D 706C656D 656E7465 640A0D00 - 160: - 161: - 18B8 _STR_NOT_FOUND: - 162: - 18B8 0A0D696E db 10,13,"invalid command",10,13,0 + 163: + 164: - 19E8 _STR_NOT_FOUND: + 165: - 19E8 0A0D696E db 10,13,"invalid command",10,13,0 76616C69 6420636F 6D6D616E 640A0D00 - 163: - 164: - 18CC _STR_SYNTAX: + 166: + 167: - 19FC _STR_SYNTAX: **** main.asm **** - 182: - 18CC 0A0D696E db 10,13,"invalid syntax",10,13,0 + 185: - 19FC 0A0D696E db 10,13,"invalid syntax",10,13,0 76616C69 64207379 6E746178 0A0D00 - 183: .include "cmd_mem.s" + 186: .include "cmd_mem.s" **** include/cmd_mem.s **** - 1: - 18DF OP_EXEC: + 1: - 1A0F OP_EXEC: 2: ;DE contains pointer - 3:13426+11 18DF D5 push DE - 4:13437+10 18E0 E1 pop HL - 5:13447+17 18E1 CD6401 call DHEX_TO_BYTE - 6:13464+4 18E4 47 ld b,a ;store result in b - 7:13468+4 18E5 7B ld a,e ;check for error - 8:13472+4 18E6 A7 and a - 9:13476+10 18E7 C29D18 jp nz, ERR_SYNTAX - 10:13486+6 18EA 23 inc HL - 11:13492+6 18EB 23 inc HL - 12:13498+17 18EC CD6401 call DHEX_TO_BYTE - 13:13515+4 18EF 4F ld c,a - 14:13519+4 18F0 7B ld a,e ;check for error - 15:13523+4 18F1 A7 and a - 16:13527+10 18F2 C29D18 jp nz, ERR_SYNTAX - 17:13537+4 18F5 60 ld h,b - 18:13541+4 18F6 69 ld l,c - 19:13545+4 18F7 E9 jp (hl) - 20: - 18F8 OP_CALL: + 3:14590+11 1A0F D5 push DE + 4:14601+10 1A10 E1 pop HL + 5:14611+17 1A11 CDF601 call DHEX_TO_BYTE + 6:14628+4 1A14 47 ld b,a ;store result in b + 7:14632+4 1A15 7B ld a,e ;check for error + 8:14636+4 1A16 A7 and a + 9:14640+10 1A17 C2CD19 jp nz, ERR_SYNTAX + 10:14650+6 1A1A 23 inc HL + 11:14656+6 1A1B 23 inc HL + 12:14662+17 1A1C CDF601 call DHEX_TO_BYTE + 13:14679+4 1A1F 4F ld c,a + 14:14683+4 1A20 7B ld a,e ;check for error + 15:14687+4 1A21 A7 and a + 16:14691+10 1A22 C2CD19 jp nz, ERR_SYNTAX + 17:14701+4 1A25 60 ld h,b + 18:14705+4 1A26 69 ld l,c + 19:14709+4 1A27 E9 jp (hl) + 20: - 1A28 OP_CALL: 21: ;DE contains pointer - 22:13549+11 18F8 D5 push DE - 23:13560+10 18F9 E1 pop HL - 24:13570+17 18FA CD6401 call DHEX_TO_BYTE - 25:13587+4 18FD 47 ld b,a ;store result in b - 26:13591+4 18FE 7B ld a,e ;check for error - 27:13595+4 18FF A7 and a - 28:13599+10 1900 C29D18 jp nz, ERR_SYNTAX - 29:13609+6 1903 23 inc HL - 30:13615+6 1904 23 inc HL - 31:13621+17 1905 CD6401 call DHEX_TO_BYTE - 32:13638+4 1908 4F ld c,a - 33:13642+4 1909 7B ld a,e ;check for error - 34:13646+4 190A A7 and a - 35:13650+10 190B C29D18 jp nz, ERR_SYNTAX - 36:13660+4 190E 60 ld h,b - 37:13664+4 190F 69 ld l,c - 38:13668+17 1910 CD1719 call _OP_CALL - 39:13685+17 1913 CDF100 call print_newLine - 40:13702+10 1916 C9 ret - 41: - 1917 _OP_CALL - 42:13712+4 1917 E9 jp (hl) + 22:14713+11 1A28 D5 push DE + 23:14724+10 1A29 E1 pop HL + 24:14734+17 1A2A CDF601 call DHEX_TO_BYTE + 25:14751+4 1A2D 47 ld b,a ;store result in b + 26:14755+4 1A2E 7B ld a,e ;check for error + 27:14759+4 1A2F A7 and a + 28:14763+10 1A30 C2CD19 jp nz, ERR_SYNTAX + 29:14773+6 1A33 23 inc HL + 30:14779+6 1A34 23 inc HL + 31:14785+17 1A35 CDF601 call DHEX_TO_BYTE + 32:14802+4 1A38 4F ld c,a + 33:14806+4 1A39 7B ld a,e ;check for error + 34:14810+4 1A3A A7 and a + 35:14814+10 1A3B C2CD19 jp nz, ERR_SYNTAX + 36:14824+4 1A3E 60 ld h,b + 37:14828+4 1A3F 69 ld l,c + 38:14832+17 1A40 CD471A call _OP_CALL + 39:14849+17 1A43 CDF800 call print_newLine + 40:14866+10 1A46 C9 ret + 41: - 1A47 _OP_CALL + 42:14876+4 1A47 E9 jp (hl) 43: - 44: - 1918 OP_DUMP: + 44: - 1A48 OP_DUMP: 45: ;DE contains pointer - 46:13716+11 1918 D5 push DE - 47:13727+10 1919 E1 pop HL - 48:13737+17 191A CD6401 call DHEX_TO_BYTE ;parse start address - 49:13754+4 191D 47 ld b,a ;store result in b - 50:13758+4 191E 7B ld a,e ;check for error - 51:13762+4 191F A7 and a - 52:13766+10 1920 C29D18 jp nz, ERR_SYNTAX - 53:13776+6 1923 23 inc HL - 54:13782+6 1924 23 inc HL - 55:13788+17 1925 CD6401 call DHEX_TO_BYTE - 56:13805+4 1928 4F ld c,a - 57:13809+4 1929 7B ld a,e ;check for error - 58:13813+4 192A A7 and a - 59:13817+10 192B C29D18 jp nz, ERR_SYNTAX - 60:13827+6 192E 23 inc HL - 61:13833+6 192F 23 inc HL - 62:13839+7 1930 7E ld a,(HL) - 63:13846+7 1931 FE20 cp ' ' - 64:13853+10 1933 C29D18 jp nz, ERR_SYNTAX - 65:13863+6 1936 23 inc HL - 66:13869+17 1937 CD6401 call DHEX_TO_BYTE - 67:13886+11 193A F5 push af - 68:13897+4 193B 7B ld a,e ;check for error - 69:13901+4 193C A7 and a - 70:13905+10 193D C29D18 jp nz, ERR_SYNTAX - 71:13915+10 1940 F1 pop af + 46:14880+11 1A48 D5 push DE + 47:14891+10 1A49 E1 pop HL + 48:14901+17 1A4A CDF601 call DHEX_TO_BYTE ;parse start address + 49:14918+4 1A4D 47 ld b,a ;store result in b + 50:14922+4 1A4E 7B ld a,e ;check for error + 51:14926+4 1A4F A7 and a + 52:14930+10 1A50 C2CD19 jp nz, ERR_SYNTAX + 53:14940+6 1A53 23 inc HL + 54:14946+6 1A54 23 inc HL + 55:14952+17 1A55 CDF601 call DHEX_TO_BYTE + 56:14969+4 1A58 4F ld c,a + 57:14973+4 1A59 7B ld a,e ;check for error + 58:14977+4 1A5A A7 and a + 59:14981+10 1A5B C2CD19 jp nz, ERR_SYNTAX + 60:14991+6 1A5E 23 inc HL + 61:14997+6 1A5F 23 inc HL + 62:15003+7 1A60 7E ld a,(HL) + 63:15010+7 1A61 FE20 cp ' ' + 64:15017+10 1A63 C2CD19 jp nz, ERR_SYNTAX + 65:15027+6 1A66 23 inc HL + 66:15033+17 1A67 CDF601 call DHEX_TO_BYTE + 67:15050+11 1A6A F5 push af + 68:15061+4 1A6B 7B ld a,e ;check for error + 69:15065+4 1A6C A7 and a + 70:15069+10 1A6D C2CD19 jp nz, ERR_SYNTAX + 71:15079+10 1A70 F1 pop af 72: - 73:13925+4 1941 60 ld h,b - 74:13929+4 1942 69 ld l,c - 75:13933+4 1943 47 ld b,a + 73:15089+4 1A71 60 ld h,b + 74:15093+4 1A72 69 ld l,c + 75:15097+4 1A73 47 ld b,a 76: - 77:13937+17 1944 CDC916 call dump_pretty - 78:13954+10 1947 C9 ret + 77:15101+17 1A74 CDE117 call dump_pretty + 78:15118+10 1A77 C9 ret 79: - 80: - 1948 OP_SET: + 80: - 1A78 OP_SET: 81: ;DE contains pointer - 82:13964+11 1948 D5 push DE - 83:13975+10 1949 E1 pop HL - 84:13985+17 194A CD6401 call DHEX_TO_BYTE ;parse start address - 85:14002+4 194D 47 ld b,a ;store result in b - 86:14006+4 194E 7B ld a,e ;check for error - 87:14010+4 194F A7 and a - 88:14014+10 1950 C29D18 jp nz, ERR_SYNTAX - 89:14024+6 1953 23 inc HL - 90:14030+6 1954 23 inc HL - 91:14036+17 1955 CD6401 call DHEX_TO_BYTE - 92:14053+4 1958 4F ld c,a - 93:14057+4 1959 7B ld a,e ;check for error - 94:14061+4 195A A7 and a - 95:14065+10 195B C29D18 jp nz, ERR_SYNTAX + 82:15128+11 1A78 D5 push DE + 83:15139+10 1A79 E1 pop HL + 84:15149+17 1A7A CDF601 call DHEX_TO_BYTE ;parse start address + 85:15166+4 1A7D 47 ld b,a ;store result in b + 86:15170+4 1A7E 7B ld a,e ;check for error + 87:15174+4 1A7F A7 and a + 88:15178+10 1A80 C2CD19 jp nz, ERR_SYNTAX + 89:15188+6 1A83 23 inc HL + 90:15194+6 1A84 23 inc HL + 91:15200+17 1A85 CDF601 call DHEX_TO_BYTE + 92:15217+4 1A88 4F ld c,a + 93:15221+4 1A89 7B ld a,e ;check for error + 94:15225+4 1A8A A7 and a + 95:15229+10 1A8B C2CD19 jp nz, ERR_SYNTAX 96: ;bc now contains the start address - 97:14075+6 195E 23 INC HL - 98:14081+6 195F 23 INC HL + 97:15239+6 1A8E 23 INC HL + 98:15245+6 1A8F 23 INC HL 99: ;hl now cointains start addr of data bytes - 100: - 1960 _OP_SET_LOOP: - 101:14087+7 1960 7E ld a,(hl) - 102:14094+7 1961 FE00 cp 0 ;if 0 then end - 103:14101+5+6 1963 C8 RET Z - 104:14106+7 1964 FE20 cp ' ' - 105:14113+10 1966 C29D18 jp nz, ERR_SYNTAX - 106:14123+6 1969 23 inc hl ;next byte - 107:14129+17 196A CD6401 call DHEX_TO_BYTE - 108:14146+7 196D 02 ld (bc),a ;load byte to - 109:14153+4 196E 7B ld a,e - 110:14157+4 196F A7 and a - 111:14161+10 1970 C29D18 jp nz, ERR_SYNTAX - 112:14171+6 1973 03 inc bc - 113:14177+6 1974 23 inc hl - 114:14183+6 1975 23 inc hl - 115:14189+10 1976 C36019 jp _OP_SET_LOOP + 100: - 1A90 _OP_SET_LOOP: + 101:15251+7 1A90 7E ld a,(hl) + 102:15258+7 1A91 FE00 cp 0 ;if 0 then end + 103:15265+5+6 1A93 C8 RET Z + 104:15270+7 1A94 FE20 cp ' ' + 105:15277+10 1A96 C2CD19 jp nz, ERR_SYNTAX + 106:15287+6 1A99 23 inc hl ;next byte + 107:15293+17 1A9A CDF601 call DHEX_TO_BYTE + 108:15310+7 1A9D 02 ld (bc),a ;load byte to + 109:15317+4 1A9E 7B ld a,e + 110:15321+4 1A9F A7 and a + 111:15325+10 1AA0 C2CD19 jp nz, ERR_SYNTAX + 112:15335+6 1AA3 03 inc bc + 113:15341+6 1AA4 23 inc hl + 114:15347+6 1AA5 23 inc hl + 115:15353+10 1AA6 C3901A jp _OP_SET_LOOP 116: - 117: - 1979 OP_DASM: - 118:14199+11 1979 D5 push DE - 119:14210+10 197A E1 pop HL - 120:14220+17 197B CD6401 call DHEX_TO_BYTE - 121:14237+4 197E 47 ld b,a ;store result in b - 122:14241+4 197F 7B ld a,e ;check for error - 123:14245+4 1980 A7 and a - 124:14249+10 1981 C29D18 jp nz, ERR_SYNTAX - 125:14259+6 1984 23 inc hl - 126:14265+6 1985 23 inc hl - 127:14271+17 1986 CD6401 call DHEX_TO_BYTE - 128:14288+4 1989 4F ld c,a - 129:14292+4 198A 7B ld a,e ;check for error - 130:14296+4 198B A7 and a - 131:14300+10 198C C29D18 jp nz, ERR_SYNTAX - 132:14310+6 198F 23 inc hl - 133:14316+6 1990 23 inc hl - 134:14322+7 1991 7E ld a,(HL) - 135:14329+7 1992 FE20 cp ' ' - 136:14336+10 1994 C29D18 jp nz, ERR_SYNTAX - 137:14346+6 1997 23 inc hl - 138:14352+17 1998 CD6401 call DHEX_TO_BYTE - 139:14369+11 199B F5 push af - 140:14380+4 199C 7B ld a,e ;check for error - 141:14384+4 199D A7 and a - 142:14388+10 199E C29D18 jp nz, ERR_SYNTAX - 143:14398+4 19A1 60 ld h,b - 144:14402+4 19A2 69 ld l,c - 145:14406+10 19A3 F1 pop af ;restore af - 146:14416+4 19A4 47 ld b,a - 147:14420+17 19A5 CDB501 call disassemble + 117: - 1AA9 OP_DASM: + 118:15363+11 1AA9 D5 push DE + 119:15374+10 1AAA E1 pop HL + 120:15384+17 1AAB CDF601 call DHEX_TO_BYTE + 121:15401+4 1AAE 47 ld b,a ;store result in b + 122:15405+4 1AAF 7B ld a,e ;check for error + 123:15409+4 1AB0 A7 and a + 124:15413+10 1AB1 C2CD19 jp nz, ERR_SYNTAX + 125:15423+6 1AB4 23 inc hl + 126:15429+6 1AB5 23 inc hl + 127:15435+17 1AB6 CDF601 call DHEX_TO_BYTE + 128:15452+4 1AB9 4F ld c,a + 129:15456+4 1ABA 7B ld a,e ;check for error + 130:15460+4 1ABB A7 and a + 131:15464+10 1ABC C2CD19 jp nz, ERR_SYNTAX + 132:15474+6 1ABF 23 inc hl + 133:15480+6 1AC0 23 inc hl + 134:15486+7 1AC1 7E ld a,(HL) + 135:15493+7 1AC2 FE20 cp ' ' + 136:15500+10 1AC4 C2CD19 jp nz, ERR_SYNTAX + 137:15510+6 1AC7 23 inc hl + 138:15516+17 1AC8 CDF601 call DHEX_TO_BYTE + 139:15533+11 1ACB F5 push af + 140:15544+4 1ACC 7B ld a,e ;check for error + 141:15548+4 1ACD A7 and a + 142:15552+10 1ACE C2CD19 jp nz, ERR_SYNTAX + 143:15562+4 1AD1 60 ld h,b + 144:15566+4 1AD2 69 ld l,c + 145:15570+10 1AD3 F1 pop af ;restore af + 146:15580+4 1AD4 47 ld b,a + 147:15584+17 1AD5 CD4702 call disassemble **** main.asm **** - 184:14437+10 19A8 C9 ret - 185: .include "cmd_io.s" + 187:15601+10 1AD8 C9 ret + 188: .include "cmd_io.s" **** include/cmd_io.s **** - 1: - 19A9 OP_IO_IN: - 2:14447+11 19A9 D5 push DE - 3:14458+10 19AA E1 pop HL - 4:14468+17 19AB CD6401 call DHEX_TO_BYTE - 5:14485+4 19AE 4F ld c,a ;store result in b - 6:14489+4 19AF 7B ld a,e ;check for error - 7:14493+4 19B0 A7 and a - 8:14497+10 19B1 C29D18 jp nz, ERR_SYNTAX - 9:14507+12 19B4 ED78 in a,(c) - 10:14519+11 19B6 F5 push af - 11:14530+17 19B7 CDF100 call print_newLine - 12:14547+10 19BA F1 pop af - 13:14557+17 19BB CD0701 call print_a_hex - 14:14574+10 19BE C9 ret + 1: - 1AD9 OP_IO_IN: + 2:15611+11 1AD9 D5 push DE + 3:15622+10 1ADA E1 pop HL + 4:15632+17 1ADB CDF601 call DHEX_TO_BYTE + 5:15649+4 1ADE 4F ld c,a ;store result in b + 6:15653+4 1ADF 7B ld a,e ;check for error + 7:15657+4 1AE0 A7 and a + 8:15661+10 1AE1 C2CD19 jp nz, ERR_SYNTAX + 9:15671+12 1AE4 ED78 in a,(c) + 10:15683+11 1AE6 F5 push af + 11:15694+17 1AE7 CDF800 call print_newLine + 12:15711+10 1AEA F1 pop af + 13:15721+17 1AEB CD0E01 call print_a_hex + 14:15738+10 1AEE C9 ret 15: - 16: - 19BF OP_IO_OUT: - 17:14584+11 19BF D5 push DE - 18:14595+10 19C0 E1 pop HL - 19:14605+17 19C1 CD6401 call DHEX_TO_BYTE - 20:14622+4 19C4 4F ld c,a ;store result in b - 21:14626+4 19C5 7B ld a,e ;check for error - 22:14630+4 19C6 A7 and a - 23:14634+10 19C7 C29D18 jp nz, ERR_SYNTAX - 24:14644+6 19CA 23 inc hl - 25:14650+6 19CB 23 inc hl - 26:14656+7 19CC 7E ld a,(hl) - 27:14663+7 19CD FE20 cp ' ' - 28:14670+10 19CF C29D18 jp nz, ERR_SYNTAX - 29:14680+6 19D2 23 inc hl - 30:14686+17 19D3 CD6401 call DHEX_TO_BYTE - 31:14703+11 19D6 F5 push af - 32:14714+4 19D7 7B ld a,e ;check for error - 33:14718+4 19D8 A7 and a - 34:14722+10 19D9 C29D18 jp nz, ERR_SYNTAX - 35:14732+10 19DC F1 pop af - 36:14742+12 19DD ED79 out (c),a - 37:14754+10 19DF C9 ret + 16: - 1AEF OP_IO_OUT: + 17:15748+11 1AEF D5 push DE + 18:15759+10 1AF0 E1 pop HL + 19:15769+17 1AF1 CDF601 call DHEX_TO_BYTE + 20:15786+4 1AF4 4F ld c,a ;store result in b + 21:15790+4 1AF5 7B ld a,e ;check for error + 22:15794+4 1AF6 A7 and a + 23:15798+10 1AF7 C2CD19 jp nz, ERR_SYNTAX + 24:15808+6 1AFA 23 inc hl + 25:15814+6 1AFB 23 inc hl + 26:15820+7 1AFC 7E ld a,(hl) + 27:15827+7 1AFD FE20 cp ' ' + 28:15834+10 1AFF C2CD19 jp nz, ERR_SYNTAX + 29:15844+6 1B02 23 inc hl + 30:15850+17 1B03 CDF601 call DHEX_TO_BYTE + 31:15867+11 1B06 F5 push af + 32:15878+4 1B07 7B ld a,e ;check for error + 33:15882+4 1B08 A7 and a + 34:15886+10 1B09 C2CD19 jp nz, ERR_SYNTAX + 35:15896+10 1B0C F1 pop af + 36:15906+12 1B0D ED79 out (c),a + 37:15918+10 1B0F C9 ret 38: - 39: - 19E0 OP_IIC_OUT: - 40:14764+11 19E0 D5 push DE - 41:14775+10 19E1 E1 pop HL - 42:14785+17 19E2 CD6401 call DHEX_TO_BYTE ;load start addr - 43:14802+13 19E5 320C40 ld (var_scratch+1),A ;store result in ram - 44:14815+4 19E8 7B ld a,e ;check for error - 45:14819+4 19E9 A7 and a - 46:14823+10 19EA C29D18 jp nz, ERR_SYNTAX - 47:14833+6 19ED 23 inc hl - 48:14839+6 19EE 23 inc hl - 49:14845+10 19EF 010D40 LD BC,[var_scratch + 2] - 50:14855+4 19F2 AF XOR A - 51:14859+13 19F3 320B40 LD (var_scratch),A - 52: - 19F6 _OP_IIC_OUT_LOOP: - 53:14872+7 19F6 7E ld a,(hl) - 54:14879+7 19F7 FE00 cp 0 ;if 0 then end - 55:14886+10 19F9 CA121A jp z,_OP_IIC_OUT_SEND - 56:14896+7 19FC FE20 cp ' ' - 57:14903+10 19FE C29D18 jp nz, ERR_SYNTAX - 58:14913+6 1A01 23 inc hl ;next byte + 39: - 1B10 OP_IIC_OUT: + 40:15928+11 1B10 D5 push DE + 41:15939+10 1B11 E1 pop HL + 42:15949+17 1B12 CDF601 call DHEX_TO_BYTE ;load start addr + 43:15966+13 1B15 320C40 ld (var_scratch+1),A ;store result in ram + 44:15979+4 1B18 7B ld a,e ;check for error + 45:15983+4 1B19 A7 and a + 46:15987+10 1B1A C2CD19 jp nz, ERR_SYNTAX + 47:15997+6 1B1D 23 inc hl + 48:16003+6 1B1E 23 inc hl + 49:16009+10 1B1F 010D40 LD BC,[var_scratch + 2] + 50:16019+4 1B22 AF XOR A + 51:16023+13 1B23 320B40 LD (var_scratch),A + 52: - 1B26 _OP_IIC_OUT_LOOP: + 53:16036+7 1B26 7E ld a,(hl) + 54:16043+7 1B27 FE00 cp 0 ;if 0 then end + 55:16050+10 1B29 CA421B jp z,_OP_IIC_OUT_SEND + 56:16060+7 1B2C FE20 cp ' ' + 57:16067+10 1B2E C2CD19 jp nz, ERR_SYNTAX + 58:16077+6 1B31 23 inc hl ;next byte 59: - 60:14919+17 1A02 CD6401 call DHEX_TO_BYTE - 61:14936+7 1A05 02 ld (bc),a - 62:14943+6 1A06 03 inc bc ;incerement pointer - 63:14949+13 1A07 3A0B40 ld a,(var_scratch) - 64:14962+4 1A0A 3C inc a ;increment counter - 65:14966+13 1A0B 320B40 ld (var_scratch),a - 66:14979+6 1A0E 23 inc HL - 67:14985+6 1A0F 23 inc HL - 68:14991+12 1A10 18E4 jr _OP_IIC_OUT_LOOP - 69: - 1A12 _OP_IIC_OUT_SEND: - 70:15003+10 1A12 210D40 ld hl,[var_scratch + 2] - 71:15013+13 1A15 3A0B40 ld a,(var_scratch) ;load amount of bytes - 72:15026+4 1A18 47 ld b,a - 73:15030+13 1A19 3A0C40 ld a,(var_scratch+1) ;load start addr - 74:15043+4 1A1C 4F ld c,a - 75:15047+17 1A1D CD8415 call iic_send_buffer - 76:15064+4 1A20 B7 or a - 77:15068+10 1A21 C2251A jp nz, _OP_IIC_ACK_ERR - 78:15078+10 1A24 C9 ret + 60:16083+17 1B32 CDF601 call DHEX_TO_BYTE + 61:16100+7 1B35 02 ld (bc),a + 62:16107+6 1B36 03 inc bc ;incerement pointer + 63:16113+13 1B37 3A0B40 ld a,(var_scratch) + 64:16126+4 1B3A 3C inc a ;increment counter + 65:16130+13 1B3B 320B40 ld (var_scratch),a + 66:16143+6 1B3E 23 inc HL + 67:16149+6 1B3F 23 inc HL + 68:16155+12 1B40 18E4 jr _OP_IIC_OUT_LOOP + 69: - 1B42 _OP_IIC_OUT_SEND: + 70:16167+10 1B42 210D40 ld hl,[var_scratch + 2] + 71:16177+13 1B45 3A0B40 ld a,(var_scratch) ;load amount of bytes + 72:16190+4 1B48 47 ld b,a + 73:16194+13 1B49 3A0C40 ld a,(var_scratch+1) ;load start addr + 74:16207+4 1B4C 4F ld c,a + 75:16211+17 1B4D CD9C16 call iic_send_buffer + 76:16228+4 1B50 B7 or a + 77:16232+10 1B51 C2551B jp nz, _OP_IIC_ACK_ERR + 78:16242+10 1B54 C9 ret 79: - 80: - 1A25 _OP_IIC_ACK_ERR: - 81:15088+10 1A25 212C1A LD HL,[_OP_IIC_ACK_ERR_str] - 82:15098+17 1A28 CDDF00 call print_str - 83:15115+10 1A2B C9 ret - 84: - 1A2C _OP_IIC_ACK_ERR_str: - 85: - 1A2C 0A0D6275 db 10,13,"bus-error: no ACK",0 + 80: - 1B55 _OP_IIC_ACK_ERR: + 81:16252+10 1B55 215C1B LD HL,[_OP_IIC_ACK_ERR_str] + 82:16262+17 1B58 CDE600 call print_str + 83:16279+10 1B5B C9 ret + 84: - 1B5C _OP_IIC_ACK_ERR_str: + 85: - 1B5C 0A0D6275 db 10,13,"bus-error: no ACK",0 732D6572 726F723A 206E6F20 41434B00 86: - 87: - 1A40 OP_IIC_IN: - 88:15125+11 1A40 D5 push DE - 89:15136+10 1A41 E1 pop HL - 90:15146+17 1A42 CD6401 call DHEX_TO_BYTE ;load start addr - 91:15163+4 1A45 4F ld C,a ;store start addr to B - 92:15167+4 1A46 7B ld a,e ;check for error - 93:15171+4 1A47 A7 and a - 94:15175+10 1A48 C29D18 jp nz, ERR_SYNTAX - 95:15185+6 1A4B 23 inc hl - 96:15191+6 1A4C 23 inc hl - 97:15197+7 1A4D 7E ld a,(hl) - 98:15204+7 1A4E FE20 cp ' ' - 99:15211+10 1A50 C29D18 jp nz, ERR_SYNTAX - 100:15221+6 1A53 23 inc hl - 101:15227+17 1A54 CD6401 call DHEX_TO_BYTE ;read length - 102:15244+4 1A57 47 ld b,a ;store length in B - 103:15248+11 1A58 C5 push bc - 104:15259+4 1A59 7B ld a,e ;check for error - 105:15263+4 1A5A A7 and a - 106:15267+10 1A5B C29D18 jp nz, ERR_SYNTAX - 107:15277+10 1A5E 210B40 ld hl,[var_scratch] - 108:15287+17 1A61 CDAE15 call iic_receive_buffer - 109:15304+10 1A64 C1 pop bc - 110:15314+4 1A65 B7 or a - 111:15318+10 1A66 C2251A jp nz, _OP_IIC_ACK_ERR - 112:15328+10 1A69 217F1A ld hl,[_OP_IIC_IN_LOOP_TEXT] - 113:15338+17 1A6C CDDF00 call print_str - 114:15355+10 1A6F 210B40 ld hl,[var_scratch] + 87: - 1B70 OP_IIC_IN: + 88:16289+11 1B70 D5 push DE + 89:16300+10 1B71 E1 pop HL + 90:16310+17 1B72 CDF601 call DHEX_TO_BYTE ;load start addr + 91:16327+4 1B75 4F ld C,a ;store start addr to B + 92:16331+4 1B76 7B ld a,e ;check for error + 93:16335+4 1B77 A7 and a + 94:16339+10 1B78 C2CD19 jp nz, ERR_SYNTAX + 95:16349+6 1B7B 23 inc hl + 96:16355+6 1B7C 23 inc hl + 97:16361+7 1B7D 7E ld a,(hl) + 98:16368+7 1B7E FE20 cp ' ' + 99:16375+10 1B80 C2CD19 jp nz, ERR_SYNTAX + 100:16385+6 1B83 23 inc hl + 101:16391+17 1B84 CDF601 call DHEX_TO_BYTE ;read length + 102:16408+4 1B87 47 ld b,a ;store length in B + 103:16412+11 1B88 C5 push bc + 104:16423+4 1B89 7B ld a,e ;check for error + 105:16427+4 1B8A A7 and a + 106:16431+10 1B8B C2CD19 jp nz, ERR_SYNTAX + 107:16441+10 1B8E 210B40 ld hl,[var_scratch] + 108:16451+17 1B91 CDC616 call iic_receive_buffer + 109:16468+10 1B94 C1 pop bc + 110:16478+4 1B95 B7 or a + 111:16482+10 1B96 C2551B jp nz, _OP_IIC_ACK_ERR + 112:16492+10 1B99 21AF1B ld hl,[_OP_IIC_IN_LOOP_TEXT] + 113:16502+17 1B9C CDE600 call print_str + 114:16519+10 1B9F 210B40 ld hl,[var_scratch] 115: ;print data - 116: - 1A72 _OP_IIC_IN_LOOP: - 117:15365+7 1A72 7E ld a,(hl) - 118:15372+17 1A73 CD0701 call print_a_hex - 119:15389+7 1A76 3E20 ld a, ' ' - 120:15396+17 1A78 CDD700 call print_char - 121:15413+6 1A7B 23 inc hl - 122:15419+8+5 1A7C 10F4 djnz _OP_IIC_IN_LOOP - 123:15427+10 1A7E C9 ret + 116: - 1BA2 _OP_IIC_IN_LOOP: + 117:16529+7 1BA2 7E ld a,(hl) + 118:16536+17 1BA3 CD0E01 call print_a_hex + 119:16553+7 1BA6 3E20 ld a, ' ' + 120:16560+17 1BA8 CDDE00 call print_char + 121:16577+6 1BAB 23 inc hl + 122:16583+8+5 1BAC 10F4 djnz _OP_IIC_IN_LOOP + 123:16591+10 1BAE C9 ret 124: - 125: - 1A7F _OP_IIC_IN_LOOP_TEXT: - 126: - 1A7F 0A0D7265 db 10,13,"rec-buff: ",0 + 125: - 1BAF _OP_IIC_IN_LOOP_TEXT: + 126: - 1BAF 0A0D7265 db 10,13,"rec-buff: ",0 632D6275 66663A20 00 127: - 128: - 1A8C OP_CLR: - 129:15437+17 1A8C CDEA00 call print_clear + 128: - 1BBC OP_CLR: + 129:16601+17 1BBC CDF100 call print_clear **** main.asm **** - 186:15454+10 1A8F C9 ret - 187: .include "cmd_date.s" + 189:16618+10 1BBF C9 ret + 190: .include "cmd_date.s" **** include/cmd_date.s **** 1: - 00D0 ADDR_RTC .equ 0xD0 2: - 3: - 1A90 OP_RTIME: - 4:15464+17 1A90 CDF100 call print_newLine - 5: - 1A93 _OP_RTIME_NN: + 3: - 1BC0 OP_RTIME: + 4:16628+17 1BC0 CDF800 call print_newLine + 5: - 1BC3 _OP_RTIME_NN: 6: ;set pointer - 7:15481+10 1A93 214B1B ld hl,[_OP_RTIME_RD_CMD] - 8:15491+7 1A96 0601 ld b, 1 - 9:15498+7 1A98 0ED0 ld c, ADDR_RTC - 10:15505+17 1A9A CD8415 call iic_send_buffer - 11:15522+4 1A9D B7 or a - 12:15526+10 1A9E C2251A jp nz, _OP_IIC_ACK_ERR + 7:16645+10 1BC3 217B1C ld hl,[_OP_RTIME_RD_CMD] + 8:16655+7 1BC6 0601 ld b, 1 + 9:16662+7 1BC8 0ED0 ld c, ADDR_RTC + 10:16669+17 1BCA CD9C16 call iic_send_buffer + 11:16686+4 1BCD B7 or a + 12:16690+10 1BCE C2551B jp nz, _OP_IIC_ACK_ERR 13: ;read RTC data - 14:15536+10 1AA1 210B40 ld hl,[var_scratch] - 15:15546+7 1AA4 0608 ld b,8 - 16:15553+7 1AA6 0ED0 ld c, ADDR_RTC - 17:15560+17 1AA8 CDAE15 call iic_receive_buffer - 18:15577+4 1AAB B7 or a - 19:15581+10 1AAC C2251A jp nz, _OP_IIC_ACK_ERR + 14:16700+10 1BD1 210B40 ld hl,[var_scratch] + 15:16710+7 1BD4 0608 ld b,8 + 16:16717+7 1BD6 0ED0 ld c, ADDR_RTC + 17:16724+17 1BD8 CDC616 call iic_receive_buffer + 18:16741+4 1BDB B7 or a + 19:16745+10 1BDC C2551B jp nz, _OP_IIC_ACK_ERR 20: ;process display hours - 21:15591+13 1AAF 3A0D40 ld a,(var_scratch+2) - 22:15604+7 1AB2 E630 and 00110000b - 23:15611+4 1AB4 1F RRA - 24:15615+4 1AB5 1F RRA - 25:15619+4 1AB6 1F RRA - 26:15623+4 1AB7 1F RRA - 27:15627+17 1AB8 CD1901 call print_bcd - 28:15644+13 1ABB 3A0D40 ld a,(var_scratch+2) - 29:15657+7 1ABE E60F and 00001111b - 30:15664+17 1AC0 CD1901 call print_bcd - 31:15681+7 1AC3 3E3A ld a,':' - 32:15688+17 1AC5 CDD700 call print_char + 21:16755+13 1BDF 3A0D40 ld a,(var_scratch+2) + 22:16768+7 1BE2 E630 and 00110000b + 23:16775+4 1BE4 1F RRA + 24:16779+4 1BE5 1F RRA + 25:16783+4 1BE6 1F RRA + 26:16787+4 1BE7 1F RRA + 27:16791+17 1BE8 CD2001 call print_bcd + 28:16808+13 1BEB 3A0D40 ld a,(var_scratch+2) + 29:16821+7 1BEE E60F and 00001111b + 30:16828+17 1BF0 CD2001 call print_bcd + 31:16845+7 1BF3 3E3A ld a,':' + 32:16852+17 1BF5 CDDE00 call print_char 33: ;display minutes - 34:15705+13 1AC8 3A0C40 ld a,(var_scratch+1) - 35:15718+7 1ACB E670 and 01110000b - 36:15725+4 1ACD 1F RRA - 37:15729+4 1ACE 1F RRA - 38:15733+4 1ACF 1F RRA - 39:15737+4 1AD0 1F RRA - 40:15741+17 1AD1 CD1901 call print_bcd - 41:15758+13 1AD4 3A0C40 ld a,(var_scratch+1) - 42:15771+7 1AD7 E60F and 00001111b - 43:15778+17 1AD9 CD1901 call print_bcd - 44:15795+7 1ADC 3E3A ld a,':' - 45:15802+17 1ADE CDD700 call print_char + 34:16869+13 1BF8 3A0C40 ld a,(var_scratch+1) + 35:16882+7 1BFB E670 and 01110000b + 36:16889+4 1BFD 1F RRA + 37:16893+4 1BFE 1F RRA + 38:16897+4 1BFF 1F RRA + 39:16901+4 1C00 1F RRA + 40:16905+17 1C01 CD2001 call print_bcd + 41:16922+13 1C04 3A0C40 ld a,(var_scratch+1) + 42:16935+7 1C07 E60F and 00001111b + 43:16942+17 1C09 CD2001 call print_bcd + 44:16959+7 1C0C 3E3A ld a,':' + 45:16966+17 1C0E CDDE00 call print_char 46: ;display seconds - 47:15819+13 1AE1 3A0B40 ld a,(var_scratch+0) - 48:15832+7 1AE4 E670 and 01110000b - 49:15839+4 1AE6 1F RRA - 50:15843+4 1AE7 1F RRA - 51:15847+4 1AE8 1F RRA - 52:15851+4 1AE9 1F RRA - 53:15855+17 1AEA CD1901 call print_bcd - 54:15872+13 1AED 3A0B40 ld a,(var_scratch+0) - 55:15885+7 1AF0 E60F and 00001111b - 56:15892+17 1AF2 CD1901 call print_bcd - 57:15909+7 1AF5 3E20 ld a,' ' - 58:15916+17 1AF7 CDD700 call print_char + 47:16983+13 1C11 3A0B40 ld a,(var_scratch+0) + 48:16996+7 1C14 E670 and 01110000b + 49:17003+4 1C16 1F RRA + 50:17007+4 1C17 1F RRA + 51:17011+4 1C18 1F RRA + 52:17015+4 1C19 1F RRA + 53:17019+17 1C1A CD2001 call print_bcd + 54:17036+13 1C1D 3A0B40 ld a,(var_scratch+0) + 55:17049+7 1C20 E60F and 00001111b + 56:17056+17 1C22 CD2001 call print_bcd + 57:17073+7 1C25 3E20 ld a,' ' + 58:17080+17 1C27 CDDE00 call print_char 59: ;display date - 60:15933+13 1AFA 3A0F40 ld a,(var_scratch+4) - 61:15946+7 1AFD E630 and 00110000b - 62:15953+4 1AFF 1F RRA - 63:15957+4 1B00 1F RRA - 64:15961+4 1B01 1F RRA - 65:15965+4 1B02 1F RRA - 66:15969+17 1B03 CD1901 call print_bcd - 67:15986+13 1B06 3A0F40 ld a,(var_scratch+4) - 68:15999+7 1B09 E60F and 00001111b - 69:16006+17 1B0B CD1901 call print_bcd - 70:16023+7 1B0E 3E2E ld a,'.' - 71:16030+17 1B10 CDD700 call print_char - 72:16047+13 1B13 3A1040 ld a,(var_scratch+5) - 73:16060+7 1B16 E610 and 00010000b - 74:16067+4 1B18 1F RRA - 75:16071+4 1B19 1F RRA - 76:16075+4 1B1A 1F RRA - 77:16079+4 1B1B 1F RRA - 78:16083+17 1B1C CD1901 call print_bcd - 79:16100+13 1B1F 3A1040 ld a,(var_scratch+5) - 80:16113+7 1B22 E60F and 00001111b - 81:16120+17 1B24 CD1901 call print_bcd - 82:16137+7 1B27 3E2E ld a,'.' - 83:16144+17 1B29 CDD700 call print_char - 84:16161+7 1B2C 3E32 ld a,'2' - 85:16168+17 1B2E CDD700 call print_char - 86:16185+7 1B31 3E30 ld a,'0' - 87:16192+17 1B33 CDD700 call print_char - 88:16209+13 1B36 3A1140 ld a,(var_scratch+6) - 89:16222+7 1B39 E6F0 and 11110000b - 90:16229+4 1B3B 1F RRA - 91:16233+4 1B3C 1F RRA - 92:16237+4 1B3D 1F RRA - 93:16241+4 1B3E 1F RRA - 94:16245+17 1B3F CD1901 call print_bcd - 95:16262+13 1B42 3A1140 ld a,(var_scratch+6) - 96:16275+7 1B45 E60F and 00001111b - 97:16282+17 1B47 CD1901 call print_bcd + 60:17097+13 1C2A 3A0F40 ld a,(var_scratch+4) + 61:17110+7 1C2D E630 and 00110000b + 62:17117+4 1C2F 1F RRA + 63:17121+4 1C30 1F RRA + 64:17125+4 1C31 1F RRA + 65:17129+4 1C32 1F RRA + 66:17133+17 1C33 CD2001 call print_bcd + 67:17150+13 1C36 3A0F40 ld a,(var_scratch+4) + 68:17163+7 1C39 E60F and 00001111b + 69:17170+17 1C3B CD2001 call print_bcd + 70:17187+7 1C3E 3E2E ld a,'.' + 71:17194+17 1C40 CDDE00 call print_char + 72:17211+13 1C43 3A1040 ld a,(var_scratch+5) + 73:17224+7 1C46 E610 and 00010000b + 74:17231+4 1C48 1F RRA + 75:17235+4 1C49 1F RRA + 76:17239+4 1C4A 1F RRA + 77:17243+4 1C4B 1F RRA + 78:17247+17 1C4C CD2001 call print_bcd + 79:17264+13 1C4F 3A1040 ld a,(var_scratch+5) + 80:17277+7 1C52 E60F and 00001111b + 81:17284+17 1C54 CD2001 call print_bcd + 82:17301+7 1C57 3E2E ld a,'.' + 83:17308+17 1C59 CDDE00 call print_char + 84:17325+7 1C5C 3E32 ld a,'2' + 85:17332+17 1C5E CDDE00 call print_char + 86:17349+7 1C61 3E30 ld a,'0' + 87:17356+17 1C63 CDDE00 call print_char + 88:17373+13 1C66 3A1140 ld a,(var_scratch+6) + 89:17386+7 1C69 E6F0 and 11110000b + 90:17393+4 1C6B 1F RRA + 91:17397+4 1C6C 1F RRA + 92:17401+4 1C6D 1F RRA + 93:17405+4 1C6E 1F RRA + 94:17409+17 1C6F CD2001 call print_bcd + 95:17426+13 1C72 3A1140 ld a,(var_scratch+6) + 96:17439+7 1C75 E60F and 00001111b + 97:17446+17 1C77 CD2001 call print_bcd 98: - 99:16299+10 1B4A C9 RET - 100: - 1B4B _OP_RTIME_RD_CMD: - 101: - 1B4B 00 db 0x00 + 99:17463+10 1C7A C9 RET + 100: - 1C7B _OP_RTIME_RD_CMD: + 101: - 1C7B 00 db 0x00 102: - 103: - 1B4C 0A0D456E _OP_STIME_STR_DAY: db 10,13,"Enter Date (00-31) : ",0 + 103: - 1C7C 0A0D456E _OP_STIME_STR_DAY: db 10,13,"Enter Date (00-31) : ",0 74657220 44617465 20202020 2830302D 33312920 3A2000 - 104: - 1B67 0A0D456E _OP_STIME_STR_MON: db 10,13,"Enter Month (00-12) : ",0 + 104: - 1C97 0A0D456E _OP_STIME_STR_MON: db 10,13,"Enter Month (00-12) : ",0 74657220 4D6F6E74 68202020 2830302D 31322920 3A2000 - 105: - 1B82 0A0D456E _OP_STIME_STR_YEAR: db 10,13,"Enter Year (00-99) : ",0 + 105: - 1CB2 0A0D456E _OP_STIME_STR_YEAR: db 10,13,"Enter Year (00-99) : ",0 74657220 59656172 20202020 2830302D 39392920 3A2000 - 106: - 1B9D 0A0D456E _OP_STIME_STR_HOUR: db 10,13,"Enter Hours (00-23) : ",0 + 106: - 1CCD 0A0D456E _OP_STIME_STR_HOUR: db 10,13,"Enter Hours (00-23) : ",0 74657220 486F7572 73202020 2830302D 32332920 3A2000 - 107: - 1BB8 0A0D456E _OP_STIME_STR_MIN: db 10,13,"Enter Minutes (00-59) : ",0 + 107: - 1CE8 0A0D456E _OP_STIME_STR_MIN: db 10,13,"Enter Minutes (00-59) : ",0 74657220 4D696E75 74657320 2830302D 35392920 3A2000 - 108: - 1BD3 0A0D456E _OP_STIME_STR_SEC: db 10,13,"Enter Seconds (00-59) : ",0 + 108: - 1D03 0A0D456E _OP_STIME_STR_SEC: db 10,13,"Enter Seconds (00-59) : ",0 74657220 5365636F 6E647320 2830302D 35392920 3A2000 - 109: - 1BEE 20696E76 _OP_STIME_INVALID: db " invaild input. Retry!",0 + 109: - 1D1E 20696E76 _OP_STIME_INVALID: db " invaild input. Retry!",0 61696C64 20696E70 75742E20 @@ -3621,285 +3782,297 @@ 792100 110: ;HL contains pointer to stack 111: ;BC returns value (BCD) - 112: - 1C05 _OP_STIME_PROMPT: - 113:16309+11 1C05 E5 push hl - 114:16320+17 1C06 CDDF00 call print_str - 115:16337+10 1C09 E1 pop hl - 116:16347+17 1C0A CD3101 call read_bcd - 117:16364+7 1C0D FEFF cp 0xFF ;if failed - 118:16371+10 1C0F CA1D1C jp Z, _OP_STIME_PROMPT_ERR - 119:16381+4 1C12 47 ld b,a - 120:16385+17 1C13 CD3101 call read_bcd - 121:16402+7 1C16 FEFF cp 0xFF ;if failed - 122:16409+10 1C18 CA1D1C jp Z, _OP_STIME_PROMPT_ERR - 123:16419+4 1C1B 4F ld c,a - 124:16423+10 1C1C C9 ret - 125: - 1C1D _OP_STIME_PROMPT_ERR: - 126:16433+11 1C1D E5 push HL - 127:16444+10 1C1E 21EE1B ld hl, [_OP_STIME_INVALID] - 128:16454+17 1C21 CDDF00 call print_str - 129:16471+10 1C24 E1 pop hl - 130:16481+10 1C25 C3051C jp _OP_STIME_PROMPT + 112: - 1D35 _OP_STIME_PROMPT: + 113:17473+11 1D35 E5 push hl + 114:17484+17 1D36 CDE600 call print_str + 115:17501+10 1D39 E1 pop hl + 116:17511+17 1D3A CD3801 call read_bcd + 117:17528+7 1D3D FEFF cp 0xFF ;if failed + 118:17535+10 1D3F CA4D1D jp Z, _OP_STIME_PROMPT_ERR + 119:17545+4 1D42 47 ld b,a + 120:17549+17 1D43 CD3801 call read_bcd + 121:17566+7 1D46 FEFF cp 0xFF ;if failed + 122:17573+10 1D48 CA4D1D jp Z, _OP_STIME_PROMPT_ERR + 123:17583+4 1D4B 4F ld c,a + 124:17587+10 1D4C C9 ret + 125: - 1D4D _OP_STIME_PROMPT_ERR: + 126:17597+11 1D4D E5 push HL + 127:17608+10 1D4E 211E1D ld hl, [_OP_STIME_INVALID] + 128:17618+17 1D51 CDE600 call print_str + 129:17635+10 1D54 E1 pop hl + 130:17645+10 1D55 C3351D jp _OP_STIME_PROMPT 131: 132: 133: - 134: - 1C28 OP_STIME: - 135:16491+4 1C28 AF xor a - 136:16495+13 1C29 320B40 ld (var_scratch),a ;set pointer + 134: - 1D58 OP_STIME: + 135:17655+4 1D58 AF xor a + 136:17659+13 1D59 320B40 ld (var_scratch),a ;set pointer 137: ;date - 138:16508+10 1C2C 214C1B ld hl, [_OP_STIME_STR_DAY] - 139:16518+17 1C2F CD051C call _OP_STIME_PROMPT - 140:16535+4 1C32 78 ld a,b - 141:16539+17 1C33 CD9C1C call _shift4 - 142:16556+7 1C36 E630 and 00110000b ;mask bits; bit6 low -> 24h mode - 143:16563+4 1C38 B1 or c ;add second digit - 144:16567+13 1C39 321040 ld (var_scratch+5),a + 138:17672+10 1D5C 217C1C ld hl, [_OP_STIME_STR_DAY] + 139:17682+17 1D5F CD351D call _OP_STIME_PROMPT + 140:17699+4 1D62 78 ld a,b + 141:17703+17 1D63 CDCC1D call _shift4 + 142:17720+7 1D66 E630 and 00110000b ;mask bits; bit6 low -> 24h mode + 143:17727+4 1D68 B1 or c ;add second digit + 144:17731+13 1D69 321040 ld (var_scratch+5),a 145: ;month - 146:16580+10 1C3C 21671B ld hl, [_OP_STIME_STR_MON] - 147:16590+17 1C3F CD051C call _OP_STIME_PROMPT - 148:16607+4 1C42 78 ld a,b - 149:16611+17 1C43 CD9C1C call _shift4 - 150:16628+7 1C46 E610 and 00010000b ;mask bits; bit6 low -> 24h mode - 151:16635+4 1C48 B1 or c ;add second digit - 152:16639+13 1C49 321140 ld (var_scratch+6),a + 146:17744+10 1D6C 21971C ld hl, [_OP_STIME_STR_MON] + 147:17754+17 1D6F CD351D call _OP_STIME_PROMPT + 148:17771+4 1D72 78 ld a,b + 149:17775+17 1D73 CDCC1D call _shift4 + 150:17792+7 1D76 E610 and 00010000b ;mask bits; bit6 low -> 24h mode + 151:17799+4 1D78 B1 or c ;add second digit + 152:17803+13 1D79 321140 ld (var_scratch+6),a 153: ;year - 154:16652+10 1C4C 21821B ld hl, [_OP_STIME_STR_YEAR] - 155:16662+17 1C4F CD051C call _OP_STIME_PROMPT - 156:16679+4 1C52 78 ld a,b - 157:16683+17 1C53 CD9C1C call _shift4 - 158:16700+7 1C56 E6F0 and 11110000b ;mask bits; bit6 low -> 24h mode - 159:16707+4 1C58 B1 or c ;add second digit - 160:16711+13 1C59 321240 ld (var_scratch+7),a + 154:17816+10 1D7C 21B21C ld hl, [_OP_STIME_STR_YEAR] + 155:17826+17 1D7F CD351D call _OP_STIME_PROMPT + 156:17843+4 1D82 78 ld a,b + 157:17847+17 1D83 CDCC1D call _shift4 + 158:17864+7 1D86 E6F0 and 11110000b ;mask bits; bit6 low -> 24h mode + 159:17871+4 1D88 B1 or c ;add second digit + 160:17875+13 1D89 321240 ld (var_scratch+7),a 161: ;hours - 162:16724+10 1C5C 219D1B ld hl, [_OP_STIME_STR_HOUR] - 163:16734+17 1C5F CD051C call _OP_STIME_PROMPT - 164:16751+4 1C62 78 ld a,b - 165:16755+17 1C63 CD9C1C call _shift4 - 166:16772+7 1C66 E630 and 00110000b ;mask bits; bit6 low -> 24h mode - 167:16779+4 1C68 B1 or c ;add second digit - 168:16783+13 1C69 320E40 ld (var_scratch+3),a + 162:17888+10 1D8C 21CD1C ld hl, [_OP_STIME_STR_HOUR] + 163:17898+17 1D8F CD351D call _OP_STIME_PROMPT + 164:17915+4 1D92 78 ld a,b + 165:17919+17 1D93 CDCC1D call _shift4 + 166:17936+7 1D96 E630 and 00110000b ;mask bits; bit6 low -> 24h mode + 167:17943+4 1D98 B1 or c ;add second digit + 168:17947+13 1D99 320E40 ld (var_scratch+3),a 169: ; minutes - 170:16796+10 1C6C 21B81B ld hl, [_OP_STIME_STR_MIN] - 171:16806+17 1C6F CD051C call _OP_STIME_PROMPT - 172:16823+4 1C72 78 ld a,b - 173:16827+17 1C73 CD9C1C call _shift4 - 174:16844+7 1C76 E670 and 01110000b ;mask bits - 175:16851+4 1C78 B1 or c ;add second digit - 176:16855+13 1C79 320D40 ld (var_scratch+2),a + 170:17960+10 1D9C 21E81C ld hl, [_OP_STIME_STR_MIN] + 171:17970+17 1D9F CD351D call _OP_STIME_PROMPT + 172:17987+4 1DA2 78 ld a,b + 173:17991+17 1DA3 CDCC1D call _shift4 + 174:18008+7 1DA6 E670 and 01110000b ;mask bits + 175:18015+4 1DA8 B1 or c ;add second digit + 176:18019+13 1DA9 320D40 ld (var_scratch+2),a 177: ; seconds - 178:16868+10 1C7C 21D31B ld hl, [_OP_STIME_STR_SEC] - 179:16878+17 1C7F CD051C call _OP_STIME_PROMPT - 180:16895+4 1C82 78 ld a,b - 181:16899+17 1C83 CD9C1C call _shift4 - 182:16916+7 1C86 E670 and 01110000b ;mask bits / bit6 low -> 24h mode (enable clock) - 183:16923+4 1C88 B1 or c ;add second digit - 184:16927+13 1C89 320C40 ld (var_scratch+1),a - 185:16940+6 1C8C 13 inc de ;next + 178:18032+10 1DAC 21031D ld hl, [_OP_STIME_STR_SEC] + 179:18042+17 1DAF CD351D call _OP_STIME_PROMPT + 180:18059+4 1DB2 78 ld a,b + 181:18063+17 1DB3 CDCC1D call _shift4 + 182:18080+7 1DB6 E670 and 01110000b ;mask bits / bit6 low -> 24h mode (enable clock) + 183:18087+4 1DB8 B1 or c ;add second digit + 184:18091+13 1DB9 320C40 ld (var_scratch+1),a + 185:18104+6 1DBC 13 inc de ;next 186: - 187:16946+7 1C8D 0ED0 ld c, ADDR_RTC - 188:16953+7 1C8F 0608 ld b, 8 - 189:16960+10 1C91 210B40 ld hl,[var_scratch] - 190:16970+17 1C94 CD8415 call iic_send_buffer - 191:16987+4 1C97 B7 or a - 192:16991+10 1C98 C2251A jp nz, _OP_IIC_ACK_ERR + 187:18110+7 1DBD 0ED0 ld c, ADDR_RTC + 188:18117+7 1DBF 0608 ld b, 8 + 189:18124+10 1DC1 210B40 ld hl,[var_scratch] + 190:18134+17 1DC4 CD9C16 call iic_send_buffer + 191:18151+4 1DC7 B7 or a + 192:18155+10 1DC8 C2551B jp nz, _OP_IIC_ACK_ERR 193: - 194:17001+10 1C9B C9 ret + 194:18165+10 1DCB C9 ret 195: - 196: - 1C9C _shift4: - 197:17011+4 1C9C 07 RLCA - 198:17015+4 1C9D 07 RLCA - 199:17019+4 1C9E 07 RLCA - 200:17023+4 1C9F 07 RLCA + 196: - 1DCC _shift4: + 197:18175+4 1DCC 07 RLCA + 198:18179+4 1DCD 07 RLCA + 199:18183+4 1DCE 07 RLCA + 200:18187+4 1DCF 07 RLCA **** main.asm **** - 188:17027+10 1CA0 C9 ret - 189: .include "cmd_disk.s" + 191:18191+10 1DD0 C9 ret + 192: .include "cmd_disk.s" **** include/cmd_disk.s **** - 1: - 1CA1 OP_LSDSK: - 2:17037+17 1CA1 CDD312 call ideif_prnt_devtable - 3:17054+10 1CA4 C9 ret + 1: - 1DD1 OP_LSDSK: + 2:18201+17 1DD1 CD5813 call ideif_prnt_devtable + 3:18218+10 1DD4 C9 ret 4: - 5: - 1CA5 OP_SELDSK: + 5: - 1DD5 OP_SELDSK: 6: ;DE contains pointer - 7:17064+11 1CA5 D5 push de - 8:17075+10 1CA6 E1 pop hl - 9:17085+7 1CA7 7E ld a,(hl) - 10:17092+7 1CA8 DE45 sbc 69 - 11:17099+7+5 1CAA 3808 jr c,_OP_SELDSK_INVALID - 12:17106+7 1CAC FE04 cp 4 - 13:17113+7+5 1CAE 3004 jr nc, _OP_SELDSK_INVALID - 14:17120+17 1CB0 CD0080 call 0x8000 - 15:17137+10 1CB3 C9 ret + 7:18228+11 1DD5 D5 push de + 8:18239+10 1DD6 E1 pop hl + 9:18249+7 1DD7 7E ld a,(hl) + 10:18256+7 1DD8 DE45 sbc 69 + 11:18263+7+5 1DDA 3808 jr c,_OP_SELDSK_INVALID + 12:18270+7 1DDC FE04 cp 4 + 13:18277+7+5 1DDE 3004 jr nc, _OP_SELDSK_INVALID + 14:18284+17 1DE0 CD7315 call ideif_drv_sel + 15:18301+10 1DE3 C9 ret 16: - 17: - 1CB4 _OP_SELDSK_INVALID: - 18:17147+10 1CB4 21C41C ld hl,[_OP_SELDSK_INVALID_STR] - 19:17157+17 1CB7 CDDF00 call print_str - 20:17174+10 1CBA 112000 LD DE,0x20 - 21:17184+10 1CBD 017000 LD BC,0x70 - 22:17194+17 1CC0 CD170D CALL beep - 23:17211+10 1CC3 C9 ret + 17: - 1DE4 _OP_SELDSK_INVALID: + 18:18311+10 1DE4 21FC1D ld hl,[_OP_SELDSK_INVALID_STR] + 19:18321+17 1DE7 CDE600 call print_str + 20:18338+10 1DEA 112000 LD DE,0x20 + 21:18348+10 1DED 017000 LD BC,0x70 + 22:18358+17 1DF0 CDA90D CALL beep + 23:18375+10 1DF3 C9 ret 24: - 25: - 1CC4 _OP_SELDSK_INVALID_STR: -**** main.asm **** - 190: - 1CC4 0A0D496E db 10,13,"Invalid drive letter",10,13,0 + 25: - 1DF4 OP_DIR: + 26:18385+17 1DF4 CD4B23 CALL fat_print_directory + 27:18402+10 1DF7 C9 ret + 28: + 29: - 1DF8 OP_CD: + 30:18412+17 1DF8 CD6024 call fat_cd_single + 31:18429+10 1DFB C9 ret + 32: + 33: - 1DFC _OP_SELDSK_INVALID_STR: + 34: - 1DFC 0A0D496E db 10,13,"Invalid drive letter",10,13,0 76616C69 64206472 69766520 6C657474 65720A0D 00 - 191: .include "post.s" + 35: + 36: - 1E15 OP_FSEXEC: + 37:18439+17 1E15 CD7B25 call fat_exec +**** main.asm **** + 193:18456+10 1E18 C9 ret + 194: .include "post.s" **** include/post.s **** 1: ;Power-On self test - 2: - 1CDD POST_START: - 3:17221+17 1CDD CDED1C call POST_CHECK_PIO - 4:17238+17 1CE0 CD121D call POST_CHECK_APU - 5:17255+17 1CE3 CD6A1D call POST_TEST_RTC - 6:17272+17 1CE6 CD3D1D call POST_CHECK_IDE_30 - 7:17289+17 1CE9 CD501D call POST_CHECK_IDE_40 - 8:17306+10 1CEC C9 ret + 2: - 1E19 POST_START: + 3:18466+17 1E19 CD291E call POST_CHECK_PIO + 4:18483+17 1E1C CD4E1E call POST_CHECK_APU + 5:18500+17 1E1F CDA61E call POST_TEST_RTC + 6:18517+17 1E22 CD791E call POST_CHECK_IDE_30 + 7:18534+17 1E25 CD8C1E call POST_CHECK_IDE_40 + 8:18551+10 1E28 C9 ret 9: - 10: - 1CED POST_CHECK_PIO: - 11:17316+10 1CED 21E11D ld hl,[str_post_pio] - 12:17326+17 1CF0 CDDF00 call print_str - 13:17343+11 1CF3 DBF6 in a,(CS_PIO_AC) ;test read from pio - 14:17354+7 1CF5 FE00 cp 0x00 ;0x78 when not installed - 15:17361+10 1CF7 C2061D jp nz, _POST_CHECK_PIO_FAILED - 16:17371+7 1CFA 3E00 ld a, 0x00 ;set present flag - 17:17378+13 1CFC 320940 ld (var_pio_present),a - 18:17391+10 1CFF 216A1E ld hl,[str_post_ok] - 19:17401+17 1D02 CDDF00 call print_str - 20:17418+10 1D05 C9 ret - 21: - 1D06 _POST_CHECK_PIO_FAILED: - 22:17428+7 1D06 3EFF ld a, 0xFF - 23:17435+13 1D08 320940 ld (var_pio_present),a - 24:17448+10 1D0B 21321E ld hl,[str_post_nd] - 25:17458+17 1D0E CDDF00 call print_str - 26:17475+10 1D11 C9 ret + 10: - 1E29 POST_CHECK_PIO: + 11:18561+10 1E29 211D1F ld hl,[str_post_pio] + 12:18571+17 1E2C CDE600 call print_str + 13:18588+11 1E2F DBF6 in a,(CS_PIO_AC) ;test read from pio + 14:18599+7 1E31 FE00 cp 0x00 ;0x78 when not installed + 15:18606+10 1E33 C2421E jp nz, _POST_CHECK_PIO_FAILED + 16:18616+7 1E36 3E00 ld a, 0x00 ;set present flag + 17:18623+13 1E38 320940 ld (var_pio_present),a + 18:18636+10 1E3B 21A61F ld hl,[str_post_ok] + 19:18646+17 1E3E CDE600 call print_str + 20:18663+10 1E41 C9 ret + 21: - 1E42 _POST_CHECK_PIO_FAILED: + 22:18673+7 1E42 3EFF ld a, 0xFF + 23:18680+13 1E44 320940 ld (var_pio_present),a + 24:18693+10 1E47 216E1F ld hl,[str_post_nd] + 25:18703+17 1E4A CDE600 call print_str + 26:18720+10 1E4D C9 ret 27: - 28: - 1D12 POST_CHECK_APU: - 29:17485+10 1D12 21FC1D ld hl,[str_post_apu] - 30:17495+17 1D15 CDDF00 call print_str + 28: - 1E4E POST_CHECK_APU: + 29:18730+10 1E4E 21381F ld hl,[str_post_apu] + 30:18740+17 1E51 CDE600 call print_str 31: - 32:17512+7 1D18 3EFF ld a, 0xFF - 33:17519+11 1D1A D3F8 out (CS_APU_DATA),a - 34:17530+4 1D1C 00 nop - 35:17534+4 1D1D 00 nop - 36:17538+11 1D1E DBF8 in a,(CS_APU_DATA) - 37:17549+7 1D20 FEFF cp 0xFF - 38:17556+10 1D22 C2311D jp nz, _POST_CHECK_APU_FAILED - 39:17566+7 1D25 3E00 ld a, 0x00 ;set present flag - 40:17573+13 1D27 320A40 ld (var_apu_present),a - 41:17586+10 1D2A 216A1E ld hl,[str_post_ok] - 42:17596+17 1D2D CDDF00 call print_str - 43:17613+10 1D30 C9 ret - 44: - 1D31 _POST_CHECK_APU_FAILED: - 45:17623+7 1D31 3EFF ld a, 0xFF - 46:17630+13 1D33 320A40 ld (var_apu_present),a - 47:17643+10 1D36 21321E ld hl,[str_post_nd] - 48:17653+17 1D39 CDDF00 call print_str - 49:17670+10 1D3C C9 ret + 32:18757+7 1E54 3EFF ld a, 0xFF + 33:18764+11 1E56 D3F8 out (CS_APU_DATA),a + 34:18775+4 1E58 00 nop + 35:18779+4 1E59 00 nop + 36:18783+11 1E5A DBF8 in a,(CS_APU_DATA) + 37:18794+7 1E5C FEFF cp 0xFF + 38:18801+10 1E5E C26D1E jp nz, _POST_CHECK_APU_FAILED + 39:18811+7 1E61 3E00 ld a, 0x00 ;set present flag + 40:18818+13 1E63 320A40 ld (var_apu_present),a + 41:18831+10 1E66 21A61F ld hl,[str_post_ok] + 42:18841+17 1E69 CDE600 call print_str + 43:18858+10 1E6C C9 ret + 44: - 1E6D _POST_CHECK_APU_FAILED: + 45:18868+7 1E6D 3EFF ld a, 0xFF + 46:18875+13 1E6F 320A40 ld (var_apu_present),a + 47:18888+10 1E72 216E1F ld hl,[str_post_nd] + 48:18898+17 1E75 CDE600 call print_str + 49:18915+10 1E78 C9 ret 50: - 51: - 1D3D POST_CHECK_IDE_30: - 52:17680+10 1D3D 21AB1D ld hl,[str_post_ide_30] - 53:17690+17 1D40 CDDF00 call print_str - 54:17707+11 1D43 DB30 in a,(0x30) - 55:17718+4 1D45 B7 or a - 56:17722+10 1D46 C2631D jp nz, _POST_CHECK_IDE_FAILED - 57:17732+10 1D49 216A1E ld hl,[str_post_ok] - 58:17742+17 1D4C CDDF00 call print_str - 59:17759+10 1D4F C9 ret - 60: - 1D50 POST_CHECK_IDE_40: - 61:17769+10 1D50 21C61D ld hl,[str_post_ide_40] - 62:17779+17 1D53 CDDF00 call print_str - 63:17796+11 1D56 DB40 in a,(0x40) - 64:17807+4 1D58 B7 or a - 65:17811+10 1D59 C2631D jp nz, _POST_CHECK_IDE_FAILED - 66:17821+10 1D5C 216A1E ld hl,[str_post_ok] - 67:17831+17 1D5F CDDF00 call print_str - 68:17848+10 1D62 C9 ret + 51: - 1E79 POST_CHECK_IDE_30: + 52:18925+10 1E79 21E71E ld hl,[str_post_ide_30] + 53:18935+17 1E7C CDE600 call print_str + 54:18952+11 1E7F DB30 in a,(0x30) + 55:18963+4 1E81 B7 or a + 56:18967+10 1E82 C29F1E jp nz, _POST_CHECK_IDE_FAILED + 57:18977+10 1E85 21A61F ld hl,[str_post_ok] + 58:18987+17 1E88 CDE600 call print_str + 59:19004+10 1E8B C9 ret + 60: - 1E8C POST_CHECK_IDE_40: + 61:19014+10 1E8C 21021F ld hl,[str_post_ide_40] + 62:19024+17 1E8F CDE600 call print_str + 63:19041+11 1E92 DB40 in a,(0x40) + 64:19052+4 1E94 B7 or a + 65:19056+10 1E95 C29F1E jp nz, _POST_CHECK_IDE_FAILED + 66:19066+10 1E98 21A61F ld hl,[str_post_ok] + 67:19076+17 1E9B CDE600 call print_str + 68:19093+10 1E9E C9 ret 69: - 70: - 1D63 _POST_CHECK_IDE_FAILED - 71:17858+10 1D63 21321E ld hl,[str_post_nd] - 72:17868+17 1D66 CDDF00 call print_str - 73:17885+10 1D69 C9 ret + 70: - 1E9F _POST_CHECK_IDE_FAILED + 71:19103+10 1E9F 216E1F ld hl,[str_post_nd] + 72:19113+17 1EA2 CDE600 call print_str + 73:19130+10 1EA5 C9 ret 74: - 75: - 1D6A POST_TEST_RTC: - 76:17895+7 1D6A 3E06 ld a, 0x06 - 77:17902+13 1D6C 320B40 ld (var_scratch),a - 78:17915+10 1D6F 21171E ld hl,[str_post_rtc] - 79:17925+17 1D72 CDDF00 call print_str - 80:17942+10 1D75 210B40 ld hl,[var_scratch] - 81:17952+7 1D78 0601 ld b, 1 - 82:17959+7 1D7A 0ED0 ld c, ADDR_RTC - 83:17966+17 1D7C CD8415 call iic_send_buffer - 84:17983+4 1D7F B7 or a - 85:17987+10 1D80 C29D1D jp nz, _POST_TEST_RTC_NOTFOUND - 86:17997+10 1D83 210B40 ld hl,[var_scratch] - 87:18007+7 1D86 0601 ld b, 1 - 88:18014+7 1D88 0ED0 ld c, ADDR_RTC - 89:18021+17 1D8A CDAE15 call iic_receive_buffer - 90:18038+13 1D8D 3A0B40 ld a, (var_scratch) - 91:18051+4 1D90 B7 or a - 92:18055+10 1D91 CAA41D jp z, _POST_TEST_RTC_INVALID - 93:18065+10 1D94 216A1E ld hl,[str_post_ok] - 94:18075+17 1D97 CDDF00 call print_str - 95:18092+10 1D9A C3931A jp _OP_RTIME_NN - 96: - 1D9D _POST_TEST_RTC_NOTFOUND: - 97:18102+10 1D9D 21321E ld hl,[str_post_nd] - 98:18112+17 1DA0 CDDF00 call print_str - 99:18129+10 1DA3 C9 ret - 100: - 1DA4 _POST_TEST_RTC_INVALID: - 101:18139+10 1DA4 21401E ld hl,[str_post_rtc_iv] - 102:18149+17 1DA7 CDDF00 call print_str - 103:18166+10 1DAA C9 ret + 75: - 1EA6 POST_TEST_RTC: + 76:19140+7 1EA6 3E06 ld a, 0x06 + 77:19147+13 1EA8 320B40 ld (var_scratch),a + 78:19160+10 1EAB 21531F ld hl,[str_post_rtc] + 79:19170+17 1EAE CDE600 call print_str + 80:19187+10 1EB1 210B40 ld hl,[var_scratch] + 81:19197+7 1EB4 0601 ld b, 1 + 82:19204+7 1EB6 0ED0 ld c, ADDR_RTC + 83:19211+17 1EB8 CD9C16 call iic_send_buffer + 84:19228+4 1EBB B7 or a + 85:19232+10 1EBC C2D91E jp nz, _POST_TEST_RTC_NOTFOUND + 86:19242+10 1EBF 210B40 ld hl,[var_scratch] + 87:19252+7 1EC2 0601 ld b, 1 + 88:19259+7 1EC4 0ED0 ld c, ADDR_RTC + 89:19266+17 1EC6 CDC616 call iic_receive_buffer + 90:19283+13 1EC9 3A0B40 ld a, (var_scratch) + 91:19296+4 1ECC B7 or a + 92:19300+10 1ECD CAE01E jp z, _POST_TEST_RTC_INVALID + 93:19310+10 1ED0 21A61F ld hl,[str_post_ok] + 94:19320+17 1ED3 CDE600 call print_str + 95:19337+10 1ED6 C3C31B jp _OP_RTIME_NN + 96: - 1ED9 _POST_TEST_RTC_NOTFOUND: + 97:19347+10 1ED9 216E1F ld hl,[str_post_nd] + 98:19357+17 1EDC CDE600 call print_str + 99:19374+10 1EDF C9 ret + 100: - 1EE0 _POST_TEST_RTC_INVALID: + 101:19384+10 1EE0 217C1F ld hl,[str_post_rtc_iv] + 102:19394+17 1EE3 CDE600 call print_str + 103:19411+10 1EE6 C9 ret 104: - 105: - 1DAB str_post_ide_30: - 106: - 1DAB 0D0A4368 db 13,10,"Check Diskctrl.@030h... ",0 + 105: - 1EE7 str_post_ide_30: + 106: - 1EE7 0D0A4368 db 13,10,"Check Diskctrl.@030h... ",0 65636B20 4469736B 6374726C 2E403033 30682E2E 2E2000 - 107: - 1DC6 str_post_ide_40: - 108: - 1DC6 0D0A4368 db 13,10,"Check Diskctrl.@040h... ",0 + 107: - 1F02 str_post_ide_40: + 108: - 1F02 0D0A4368 db 13,10,"Check Diskctrl.@040h... ",0 65636B20 4469736B 6374726C 2E403034 30682E2E 2E2000 - 109: - 1DE1 str_post_pio: - 110: - 1DE1 0D0A4368 db 13,10,"Check IO-Controller ... ",0 + 109: - 1F1D str_post_pio: + 110: - 1F1D 0D0A4368 db 13,10,"Check IO-Controller ... ",0 65636B20 494F2D43 6F6E7472 6F6C6C65 72202E2E 2E2000 - 111: - 1DFC str_post_apu: - 112: - 1DFC 0D0A4368 db 13,10,"Check AMD8911 APU ... ",0 + 111: - 1F38 str_post_apu: + 112: - 1F38 0D0A4368 db 13,10,"Check AMD8911 APU ... ",0 65636B20 414D4438 39313120 41505520 20202E2E 2E2000 - 113: - 1E17 str_post_rtc: - 114: - 1E17 0D0A4368 db 13,10,"Check DS1307 RTC ... ",0 + 113: - 1F53 str_post_rtc: + 114: - 1F53 0D0A4368 db 13,10,"Check DS1307 RTC ... ",0 65636B20 44533133 30372052 54432020 20202E2E 2E2000 - 115: - 1E32 str_post_nd: - 116: - 1E32 6E6F7420 db "not detected!",0 + 115: - 1F6E str_post_nd: + 116: - 1F6E 6E6F7420 db "not detected!",0 64657465 63746564 2100 - 117: - 1E40 str_post_rtc_iv: - 118: - 1E40 6E6F7420 db "not set. Check battery and run 'setdate'!",0 + 117: - 1F7C str_post_rtc_iv: + 118: - 1F7C 6E6F7420 db "not set. Check battery and run 'setdate'!",0 7365742E 20436865 636B2062 @@ -3910,16 +4083,1059 @@ 73657464 61746527 2100 - 119: - 1E6A str_post_ok: + 119: - 1FA6 str_post_ok: **** main.asm **** - 192: - 1E6A 6F6B2120 db "ok! ",0 + 195: - 1FA6 6F6B2120 db "ok! ",0 00 - 193: - 194: ;================================================================ - 195: ; Strings - 196: ;================================================================ - 197: - 1E6F STR_Banner_Start: - 198: - 1E6F 5A384320 db "Z8C Monitor V2.1 by Dennis Gunia (2022-2024)",0 + 196: .include "fat16.s" +**** include/fat16.s **** + 1: ; VARS + 2: + 3: - 43B6 phase MEM_IDE_FSBUFFER + 4: - 43B6 MEM_FAT_RESERVED: ; Reserved sectors (2byte) + 5: - 43B6 ..43B7 00 defs 2 + 6: - 43B8 MEM_FAT_AMOUNT: ; Amount of FATs (1byte) + 7: - 43B8 ..43B8 00 defs 1 + 8: - 43B9 MEM_FAT_SECTORS: ; Length of FAT (2byte) + 9: - 43B9 ..43BA 00 defs 2 + 10: - 43BB MEM_FAT_CLUSTERLEN: ; Length of Cluster (1byte) + 11: - 43BB ..43BB 00 defs 1 + 12: - 43BC MEM_FAT_COUNT1: ; Counter Var for reading FAT (2byte) + 13: - 43BC ..43BC 00 defs 1 + 14: - 43BD MEM_FAT_TMPPOINTER: ; Temporary working pointer + 15: - 43BD ..43C0 00 defs 4 + 16: - 43C1 MEM_FAT_DATASTART: ; Start of data area + 17: - 43C1 ..43C4 00 defs 4 + 18: - 43C5 MEM_FAT_ROOTSTART: ; Start of Root directory + 19: - 43C5 ..43C8 00 defs 4 + 20: - 43C9 MEM_FAT_FILEREMAIN: ; Remaining sectors in file + 21: - 43C9 ..43CC 00 defs 4 + 22: - 43CD MEM_FAT_DIRSEC: ; Sectors per directory + 23: - 43CD ..43CE 00 defs 2 + 24: - 43CF MEM_FAT_TMPFNAME: ; Temporary filename + 25: - 43CF ..43DE 00 defs 16 + 26: - 43DF MEM_FAT_CURDIR: ; Current Directory + 27: - 43DF ..442E 00 defs 80 + 28: - 442F MEM_FAT_OF0_ATTRIBUTE: ;Current file attribute + 29: - 442F 0000 defw 0 + 30: - 4431 MEM_FAT_OF0_CCLUST: ;Current cluster of file + 31: - 4431 0000 defw 0 + 32: - 4433 MEM_FAT_OF0_FATSEC: ;Current sector in FAT + 33: - 4433 ..4436 00 defs 4 + 34: - 4437 MEM_FAT_OF0_DATSEC: ;Current sector in Data + 35: - 4437 ..443A 00 defs 4 + 36: - 443B MEM_FAT_OF0_DATREM: ;Remaining bytes in Data + 37: - 443B ..443E 00 defs 4 + 38: - 443F MEM_FAT_CURRDIR: ;Current directory + 39: - 443F ..4442 00 defs 4 + 40: - 4443 MEM_FAT_EXEC_CURR: + 41: - 4443 0000 defw 0 + 42: - 4445 MEM_FAT_EXEC_COUNT: + 43: - 4445 0000 defw 0 + 44: - 4447 MEM_FAT_EXEC_START: + 45: - 4447 0000 defw 0 + 46: + 47: - 203E dephase + 48: + 49: ;------------------------------------- + 50: ; Get FAT Root-Table position + 51: ;------------------------------------- + 52: - 203E fat_get_root_table: + 53:19421+17 203E CDF722 call fat_reset_pointer ;reset fat pointer + 54: + 55: ; Load first sector on active partition + 56:19438+10 2041 21D140 LD HL, MEM_IDE_POINTER ; pointer to LBA address + 57:19448+7 2044 3E01 LD A,1 ;read 1 sector + 58:19455+10 2046 11B641 LD DE, MEM_IDE_BUFFER ;where to store data? + 59:19465+17 2049 CD4315 call read_lba_sector + 60: + 61: ; check for valid Boot sector + 62:19482+13 204C 3AB641 ld a,(MEM_IDE_BUFFER) + 63:19495+7 204F FEEB cp 0xEB ;first byte should be 0xEB + 64:19502+10 2051 C20B21 jp nz, _fat_get_root_table_invalid + 65: + 66: ; Read and store FS Properties + 67:19512+14 2054 DD21B641 LD IX,MEM_IDE_BUFFER + 68:19526+19 2058 DD7E0D LD A,(IX+0x0D) + 69:19545+13 205B 32BB43 LD (MEM_FAT_CLUSTERLEN),A + 70:19558+19 205E DD7E0E LD A,(IX+0x0E) + 71:19577+13 2061 32B643 LD (MEM_FAT_RESERVED),A + 72:19590+19 2064 DD7E0F LD A,(IX+0x0F) + 73:19609+13 2067 32B743 LD (MEM_FAT_RESERVED+1),A + 74:19622+19 206A DD7E10 LD A,(IX+0x10) + 75:19641+13 206D 32B843 LD (MEM_FAT_AMOUNT),A + 76:19654+19 2070 DD7E16 LD A,(IX+0x16) + 77:19673+13 2073 32B943 LD (MEM_FAT_SECTORS),A + 78:19686+19 2076 DD7E17 LD A,(IX+0x17) + 79:19705+13 2079 32BA43 LD (MEM_FAT_SECTORS+1),A + 80: + 81: ;Get Data Start Sector + 82: ;calculate fat length + 83:19718+20 207C ED4BB943 ld bc,(MEM_FAT_SECTORS) + 84:19738+13 2080 3AB843 ld a,(MEM_FAT_AMOUNT) ;add fat to cluster number + 85:19751+7 2083 1600 ld d,0 + 86:19758+4 2085 5F ld e,a + 87:19762+17 2086 CDDE22 call _fat_math_mul32 + 88: ; BCHL contains result -> store to PTR.MEM_FAT_ROOTSTART + 89:19779+16 2089 22C543 ld (MEM_FAT_ROOTSTART+0),hl + 90:19795+20 208C ED43C743 ld (MEM_FAT_ROOTSTART+2),bc + 91: + 92: ;add offset (reserved sectors) + 93:19815+16 2090 2AC441 ld hl,(MEM_IDE_BUFFER +0x0E) ; load sectors into hl + 94:19831+16 2093 22BD43 ld (MEM_FAT_TMPPOINTER), hl + 95:19847+4 2096 AF xor a + 96:19851+13 2097 32BF43 ld (MEM_FAT_TMPPOINTER+2),a + 97:19864+13 209A 32C043 ld (MEM_FAT_TMPPOINTER+3),a + 98: + 99:19877+10 209D 01C543 ld bc,[MEM_FAT_ROOTSTART] + 100:19887+10 20A0 11BD43 ld de,[MEM_FAT_TMPPOINTER] + 101:19897+17 20A3 CDAD22 call _fat_math_add32 ;MEM_FAT_ROOTSTART now contains the first sector + 102: ;of the Root directory + 103: + 104: ;add offset (partition location) + 105:19914+17 20A6 CD1C15 call ideif_get_drv_pointer + 106:19931+10 20A9 DD23 inc ix + 107:19941+10 20AB DD23 inc ix + 108:19951+15 20AD DDE5 push ix + 109:19966+10 20AF D1 pop de ;copy poiter to hl + 110:19976+10 20B0 01C543 ld bc,[MEM_FAT_ROOTSTART] + 111:19986+17 20B3 CDAD22 call _fat_math_add32 ;MEM_FAT_OF0_DATSEC now contains the first sector + 112: ;of the cluster + 113: ;copy value from MEM_FAT_ROOTSTART to MEM_IDE_POINTER + 114:20003+10 20B6 21C543 ld hl,MEM_FAT_ROOTSTART + 115:20013+10 20B9 11D140 ld de,MEM_IDE_POINTER + 116:20023+16 20BC EDA0 ldi + 117:20039+16 20BE EDA0 ldi + 118:20055+16 20C0 EDA0 ldi + 119:20071+16 20C2 EDA0 ldi + 120: + 121: ;copy value from MEM_FAT_ROOTSTART to MEM_IDE_POINTER + 122:20087+10 20C4 21C543 ld hl,MEM_FAT_ROOTSTART + 123:20097+10 20C7 11C143 ld de,MEM_FAT_DATASTART + 124:20107+16 20CA EDA0 ldi + 125:20123+16 20CC EDA0 ldi + 126:20139+16 20CE EDA0 ldi + 127:20155+16 20D0 EDA0 ldi + 128: + 129:20171+10 20D2 21C543 ld hl,MEM_FAT_ROOTSTART + 130:20181+10 20D5 113F44 ld de,MEM_FAT_CURRDIR + 131:20191+16 20D8 EDA0 ldi + 132:20207+16 20DA EDA0 ldi + 133:20223+16 20DC EDA0 ldi + 134:20239+16 20DE EDA0 ldi + 135: + 136: ;add offset to data area + 137: ;multiply cluster by length of cluster + 138: + 139: ;calculate sectors for root dir + 140:20255+16 20E0 2AC741 ld hl,(MEM_IDE_BUFFER+0x11) ;load Maximum root directory entries + 141:20271+4 20E3 7C ld a,h + 142:20275+4 20E4 6F ld l,a + 143:20279+4 20E5 AF xor a ;set a 0, clear carry flag + 144:20283+4 20E6 67 ld h,a ;shift right by 8 bit = /512 + 145: + 146: ;last step: multiply by 16 + 147:20287+4 20E7 EB ex de,hl + 148:20291+10 20E8 011000 ld bc,16 + 149:20301+17 20EB CDDE22 call _fat_math_mul32 + 150: ; BCHL contains result -> store to PTR.MEM_FAT_TMPPOINTER + 151:20318+16 20EE 22BD43 ld (MEM_FAT_TMPPOINTER+0),hl + 152:20334+20 20F1 ED43BF43 ld (MEM_FAT_TMPPOINTER+2),bc + 153: + 154:20354+16 20F5 22CD43 ld (MEM_FAT_DIRSEC),hl + 155: ; add offset to MEM_FAT_DATASTART + 156:20370+10 20F8 11BD43 ld de,[MEM_FAT_TMPPOINTER] + 157:20380+10 20FB 01C143 ld bc,[MEM_FAT_DATASTART] + 158:20390+17 20FE CDAD22 call _fat_math_add32 ;MEM_FAT_DATASTART now contains the correct sector + 159: ;at teh beginnig of the data area + 160: + 161: + 162: ;done all FS vars populated + 163: + 164: ;navigate to root directory + 165:20407+7 2101 3E5C ld a,'\' + 166:20414+13 2103 32DF43 ld(MEM_FAT_CURDIR),a + 167:20427+4 2106 AF xor a + 168:20431+13 2107 32E043 ld(MEM_FAT_CURDIR+1),a + 169: + 170:20444+10 210A C9 ret + 171: + 172: - 210B _fat_get_root_table_invalid: + 173:20454+17 210B CD9101 call PRINTINLINE + 174: - 210E 0A0D4361 db 10,13,"Cannot find boot sector.",10,13,0 + 6E6E6F74 + 2066696E + 6420626F + 6F742073 + 6563746F + 722E0A0D + 00 + 175:20471+17 212B CD1C15 call ideif_get_drv_pointer + 176:20488+19 212E DD360002 ld (ix+0),0x02 + 177:20507+10 2132 C9 ret + 178: + 179: ;------------------------------------- + 180: ; fat_getfatsec + 181: ; + 182: ; gets sector in FAT table for the cluster stored in MEM_FAT_OF0_CCLUST + 183: ; + 184: ; store result in MEM_FAT_OF0_FATSEC + 185: ; stores next cluster in MEM_FAT_OF0_CCLUST + 186: ;------------------------------------- + 187: - 2133 fat_getfatsec: + 188:20517+16 2133 2A3144 ld HL,(MEM_FAT_OF0_CCLUST) ;load cluster + 189:20533+4 2136 7C ld a,h ;if not 0x0000 + 190:20537+4 2137 B5 or l + 191:20541+10 2138 C24A21 jp nz, _fat_getfatsec_notroot + 192: ;if 0x0000, goto root directory + 193:20551+10 213B 21C543 ld hl,MEM_FAT_ROOTSTART + 194:20561+10 213E 113744 ld de,MEM_FAT_OF0_DATSEC + 195:20571+16 2141 EDA0 ldi ;quick and dirty hack to go back to root directory + 196:20587+16 2143 EDA0 ldi + 197:20603+16 2145 EDA0 ldi + 198:20619+16 2147 EDA0 ldi + 199:20635+10 2149 C9 ret + 200: + 201: - 214A _fat_getfatsec_notroot: + 202:20645+16 214A 2A3144 ld HL,(MEM_FAT_OF0_CCLUST) ;load cluster + 203: ;each sector contains 256 clusters + 204: ;first 8bits are not needed (/256) + 205:20661+4 214D 7C ld a,h ;divide by 256 + 206:20665+4 214E 6F ld l,a + 207:20669+4 214F AF xor a + 208:20673+4 2150 67 ld h,a + 209: + 210:20677+20 2151 ED4BB643 ld bc,(MEM_FAT_RESERVED) ;add reserved sectors + 211:20697+11 2155 09 add hl,bc + 212:20708+16 2156 223344 ld(MEM_FAT_OF0_FATSEC+0),hl;store sector + 213:20724+4 2159 AF xor a + 214:20728+13 215A 323544 ld(MEM_FAT_OF0_FATSEC+2),a + 215:20741+13 215D 323644 ld(MEM_FAT_OF0_FATSEC+3),a + 216: + 217:20754+17 2160 CD1C15 call ideif_get_drv_pointer + 218:20771+10 2163 DD23 inc ix + 219:20781+10 2165 DD23 inc ix + 220:20791+15 2167 DDE5 push ix + 221:20806+10 2169 D1 pop de ;copy poiter to hl + 222:20816+10 216A 013344 ld bc,[MEM_FAT_OF0_FATSEC] + 223:20826+17 216D CDAD22 call _fat_math_add32 ;MEM_FAT_OF0_FATSEC now contains the correct sector + 224: ;in the FAT + 225: + 226: ;read FAT sector + 227:20843+10 2170 213344 ld hl,MEM_FAT_OF0_FATSEC ;read next sector + 228:20853+7 2173 0601 ld b,1 + 229:20860+10 2175 11B641 LD DE, MEM_IDE_BUFFER ;where to store data? + 230:20870+17 2178 CD4315 call read_lba_sector + 231: + 232: ;calculate data sector + 233: ;multiply cluster by length of cluster + 234:20887+4 217B AF xor a ;clear carry + 235:20891+13 217C 3ABB43 ld a,(MEM_FAT_CLUSTERLEN) + 236:20904+7 217F 0600 ld b,0 + 237:20911+4 2181 4F ld c,a + 238:20915+20 2182 ED5B3144 ld de,(MEM_FAT_OF0_CCLUST) ;load cluster number + 239:20935+6 2186 1B dec de ; sub 2 becaus fat starts at 3 + 240:20941+6 2187 1B dec de + 241:20947+17 2188 CDDE22 call _fat_math_mul32 + 242: ; BCHL contains result -> store to PTR.MEM_FAT_OF0_DATSEC + 243:20964+16 218B 223744 ld (MEM_FAT_OF0_DATSEC+0),hl + 244:20980+20 218E ED433944 ld (MEM_FAT_OF0_DATSEC+2),bc + 245: + 246: ; add start of data region to addr + 247:21000+10 2192 013744 ld bc,[MEM_FAT_OF0_DATSEC] + 248:21010+10 2195 11C143 ld de,[MEM_FAT_DATASTART] + 249:21020+17 2198 CDAD22 call _fat_math_add32 ;MEM_FAT_OF0_FATSEC now contains the correct sector + 250: ;in the FAT + 251: ;MEM_FAT_OF0_DATSEC now has the first sector of the selected cluster + 252: + 253: ;reset MEM_FAT_OF0_DATREM to default cluster length + 254:21037+13 219B 3ABB43 ld a,(MEM_FAT_CLUSTERLEN) + 255:21050+4 219E 6F ld l,a + 256:21054+7 219F 2600 ld h,0 + 257:21061+16 21A1 223B44 ld (MEM_FAT_OF0_DATREM), hl + 258: + 259: ;get next cluster + 260: ;calculate offset address + 261:21077+13 21A4 3A3144 ld a,(MEM_FAT_OF0_CCLUST) + 262:21090+4 21A7 17 RLA ;shift to left (x2) + 263:21094+4 21A8 6F ld l, a + 264:21098+7 21A9 3E00 ld a,0 + 265:21105+4 21AB 17 RLA ;shift in carry flag + 266:21109+4 21AC 67 ld h,a + 267:21113+10 21AD 11B641 ld de,MEM_IDE_BUFFER + 268:21123+11 21B0 19 add hl,de + 269: ;copy pointer (hl to de) + 270:21134+10 21B1 113144 ld de,MEM_FAT_OF0_CCLUST + 271:21144+16 21B4 EDA0 ldi ;copy byte for next cluster from FAT + 272:21160+16 21B6 EDA0 ldi + 273:21176+10 21B8 C9 ret + 274: ;store data + 275: + 276: ;------------------------------------- + 277: ; fat_readfilesec + 278: ; + 279: ; reads single sector of file + 280: ; must run fat_readfilesec before to initialize + 281: ; if a ix 0x00, success + 282: ; if a is 0xFF, end reached + 283: ; + 284: ; DE contains destination address + 285: ;------------------------------------- + 286: - 21B9 fat_readfilesec: + 287: ;call fat_print_dbg + 288:21186+10 21B9 213744 ld hl,[MEM_FAT_OF0_DATSEC] + 289:21196+7 21BC 0601 ld b,1 + 290: ;LD DE, MEM_IDE_BUFFER ;where to store data? + 291:21203+17 21BE CD4315 call read_lba_sector ;read sectore + 292:21220+10 21C1 213744 ld hl,[MEM_FAT_OF0_DATSEC] ;increment pointer to next sector + 293:21230+17 21C4 CD9922 call _fat_increment_32 ;*** + 294:21247+16 21C7 2A3B44 ld hl,(MEM_FAT_OF0_DATREM) ;reduce counter + 295:21263+4 21CA AF xor a + 296:21267+10 21CB 110100 ld de,1 + 297:21277+15 21CE ED52 sbc hl,de ;decrement counter + 298:21292+16 21D0 223B44 ld (MEM_FAT_OF0_DATREM),hl ;store decremented counter + 299:21308+5+6 21D3 C0 ret nz ;when not zero, exit function + 300: ;if zero: + 301:21313+7 21D4 3EFF ld a, 0xFF ;preload error code + 302:21320+16 21D6 2A3144 ld hl,(MEM_FAT_OF0_CCLUST) ;check next chunk + 303:21336+10 21D9 11FFFF ld de,0xFFFF ;end mark + 304:21346+15 21DC ED52 sbc hl,de ;if Z match + 305:21361+5+6 21DE C8 ret z ;If 0xFFFF, end is reched. Return + 306: ;if next cluster available: + 307:21366+4 21DF AF xor a + 308:21370+17 21E0 CD3321 call fat_getfatsec ; read next cluster information + 309:21387+10 21E3 C9 ret + 310: + 311: + 312: ;------------------------------------- + 313: ; fat_openfile + 314: ; search for entry in current directory + 315: ; + 316: ; DE pointer to file name + 317: ; sets: + 318: ; - MEM_FAT_OF0_CCLUST + 319: ; - MEM_FAT_OF0_ATTRIBUTE + 320: ; - MEM_FAT_FILEREMAIN + 321: ; if a is 0x00, success + 322: ; if a is 0xFF, end reached + 323: ;------------------------------------- + 324: - 21E4 fat_openfile: + 325:21397+11 21E4 D5 PUSH DE + 326: ;MEM_FAT_TMPFNAME now has valid text to compare + 327:21408+10 21E5 21CF43 LD HL,[MEM_FAT_TMPFNAME] + 328:21418+17 21E8 CD2523 call format_filename_fat16 + 329:21435+10 21EB D1 POP DE + 330: - 21EC fat_openfile_noprepare: + 331:21445+11 21EC D5 PUSH DE + 332: ;prepare pointer + 333:21456+10 21ED 213F44 ld hl,MEM_FAT_CURRDIR + 334:21466+10 21F0 11D140 ld de,MEM_IDE_POINTER + 335:21476+16 21F3 EDA0 ldi + 336:21492+16 21F5 EDA0 ldi + 337:21508+16 21F7 EDA0 ldi + 338:21524+16 21F9 EDA0 ldi + 339: + 340:21540+13 21FB 3ACD43 LD A,(MEM_FAT_DIRSEC) ;init counter for FAT sectors + 341:21553+13 21FE 32BC43 LD (MEM_FAT_COUNT1),A + 342: + 343:21566+10 2201 21D140 LD HL,MEM_IDE_POINTER ;read first sector + 344:21576+7 2204 0601 LD B,1 + 345:21583+10 2206 11B641 LD DE, MEM_IDE_BUFFER ;where to store data? + 346:21593+17 2209 CD4315 call read_lba_sector + 347: + 348:21610+10 220C 21B641 LD HL, MEM_IDE_BUFFER ;set buffer start + 349:21620+7 220F 0E10 LD C,16 ;set entries counter + 350: + 351: - 2211 _fat_lfs_loop: + 352:21627+10 2211 11CF43 LD DE,[MEM_FAT_TMPFNAME] + 353:21637+17 2214 CD0F23 CALL compare_filename + 354:21654+7+5 2217 3836 JR C, _fat_lfs_loop_compare_match ;on match + 355: + 356: ; prepare next entry + 357:21661+4 2219 0D DEC C ;next sector after 16 entries + 358:21665+7+5 221A 2807 JR Z,_fat_lfs_loop_compare_next_sector + 359:21672+10 221C 112000 LD DE, 32 ;length of entry + 360:21682+11 221F 19 ADD HL,DE ;increment + 361:21693+10 2220 C31122 JP _fat_lfs_loop + 362: + 363: - 2223 _fat_lfs_loop_compare_next_sector: + 364:21703+10 2223 21D140 ld hl,[MEM_IDE_POINTER] + 365:21713+17 2226 CD9922 call _fat_increment_32 ;increment sector + 366: + 367:21730+13 2229 3ABC43 LD A,(MEM_FAT_COUNT1) ; decrement sector count (max FAT length) + 368:21743+4 222C 3D DEC A + 369:21747+13 222D 32BC43 LD (MEM_FAT_COUNT1),A + 370:21760+10 2230 CA4B22 JP Z, _fat_lfs_loop_compare_end ; if DE is 0, mmax is reached. End here + 371: ;call print_a_hex + 372: + 373:21770+10 2233 21D140 LD HL,MEM_IDE_POINTER ;read next sector + 374:21780+7 2236 0601 LD B,1 + 375:21787+10 2238 11B641 LD DE, MEM_IDE_BUFFER ;where to store data? + 376:21797+17 223B CD4315 call read_lba_sector + 377: + 378:21814+10 223E 21B641 LD HL, MEM_IDE_BUFFER ;set buffer start + 379:21824+7 2241 0E10 LD C,16 ;set entries counter + 380: + 381:21831+7 2243 7E ld a,(HL) + 382:21838+4 2244 B7 or a + 383:21842+10 2245 CA4B22 jp z, _fat_lfs_loop_compare_end ;skip empty sectors + 384: + 385:21852+10 2248 C31122 JP _fat_lfs_loop + 386: + 387: - 224B _fat_lfs_loop_compare_end: + 388:21862+10 224B D1 POP DE + 389:21872+7 224C 3EFF ld a,0xFF + 390:21879+10 224E C9 RET + 391: + 392: - 224F _fat_lfs_loop_compare_match: + 393: ; get entry + 394:21889+10 224F D1 POP DE + 395: + 396: ; HL points to Start of Table item + 397:21899+11 2250 E5 PUSH HL + 398:21910+14 2251 DDE1 POP IX + 399: ; get important information + 400:21924+19 2253 DD7E1B ld a,(ix+0x1B) ;first cluster number + 401:21943+13 2256 323244 ld (MEM_FAT_OF0_CCLUST+1),a + 402:21956+19 2259 DD7E1A ld a,(ix+0x1A) + 403:21975+13 225C 323144 ld (MEM_FAT_OF0_CCLUST+0),a + 404:21988+19 225F DD7E0B ld a,(ix+0x0B) + 405:22007+13 2262 322F44 ld (MEM_FAT_OF0_ATTRIBUTE+0),a + 406: + 407:22020+4 2265 AF xor a ;clear carry ;set MEM_FAT_OF0_DATREM to remaining sectors + 408:22024+19 2266 DD7E1F ld a,(ix+0x1F) ;cluste length shift by 256 + 409:22043+4 2269 1F rra + 410:22047+13 226A 32CB43 ld (MEM_FAT_FILEREMAIN+2),a + 411:22060+19 226D DD7E1E ld a,(ix+0x1E) + 412:22079+4 2270 1F rra + 413:22083+13 2271 32CA43 ld (MEM_FAT_FILEREMAIN+1),a + 414:22096+19 2274 DD7E1D ld a,(ix+0x1D) + 415:22115+4 2277 1F rra + 416:22119+13 2278 32C943 ld (MEM_FAT_FILEREMAIN+0),a + 417:22132+7 227B 3E00 ld a,0 + 418:22139+13 227D 32CC43 ld (MEM_FAT_FILEREMAIN+3),a + 419:22152+17 2280 CD3321 call fat_getfatsec ;get sector information + 420: + 421:22169+4 2283 AF xor a + 422:22173+10 2284 C9 RET + 423: + 424: + 425: ;=================== UTIL Functions =========================== + 426: ; 32 Bit addition to pointer + 427: ; HL has value + 428: ;deprecated!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + 429: - 2285 _fat_math_sector_add_16: + 430:22183+16 2285 22BD43 ld (MEM_FAT_TMPPOINTER), hl + 431:22199+4 2288 AF xor a + 432:22203+13 2289 32BF43 ld (MEM_FAT_TMPPOINTER+2),a + 433:22216+13 228C 32C043 ld (MEM_FAT_TMPPOINTER+3),a + 434: + 435:22229+10 228F 11BD43 ld de,[MEM_FAT_TMPPOINTER] + 436:22239+10 2292 01D140 ld bc,[MEM_IDE_POINTER] + 437:22249+17 2295 CDAD22 call _fat_math_add32 + 438:22266+10 2298 C9 ret + 439: ;deprecated!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + 440: + 441: ;hl contains pointer + 442: - 2299 _fat_increment_32 + 443:22276+7 2299 7E ld a,(HL) ; byte 0 + 444:22283+7 229A C601 add 1 + 445:22290+7 229C 77 ld (hl),a + 446:22297+6 229D 23 inc hl + 447:22303+7 229E 7E ld a,(HL) ; byte 1 + 448:22310+7 229F CE00 adc 0 + 449:22317+7 22A1 77 ld (hl),a + 450:22324+6 22A2 23 inc hl + 451:22330+7 22A3 7E ld a,(HL) ; byte 2 + 452:22337+7 22A4 CE00 adc 0 + 453:22344+7 22A6 77 ld (hl),a + 454:22351+6 22A7 23 inc hl + 455:22357+7 22A8 7E ld a,(HL) ; byte 3 + 456:22364+7 22A9 CE00 adc 0 + 457:22371+7 22AB 77 ld (hl),a + 458:22378+10 22AC C9 ret + 459: ;bc contains pointer to a (also result) + 460: ;de contains pointer to b + 461: - 22AD _fat_math_add32 + 462:22388+11 22AD E5 push hl + 463:22399+11 22AE C5 push bc + 464:22410+11 22AF D5 push de + 465:22421+7 22B0 1A ld a,(de) ; load lower 16bit for B int from (DE) to HL + 466:22428+4 22B1 6F ld l,a + 467:22432+6 22B2 13 inc de + 468:22438+7 22B3 1A ld a,(de) + 469:22445+4 22B4 67 ld h,a + 470:22449+6 22B5 13 inc de + 471: ; HL, DE dirty + 472:22455+7 22B6 0A ld a,(bc) ; load lower 16bit for A int from (BC) to DE + 473:22462+4 22B7 5F ld e,a + 474:22466+6 22B8 03 inc bc + 475:22472+7 22B9 0A ld a,(bc) + 476:22479+4 22BA 57 ld d,a + 477: ; HL now contains A, DE now contains D + 478:22483+11 22BB 19 add hl,de ;add lower bytes, store carry + 479:22494+10 22BC D1 pop de ;restore pointers + 480:22504+10 22BD C1 pop bc ;both now cointain first byte of long-value + 481:22514+4 22BE 7D ld a,l ;store lower result in (bc) + 482:22518+7 22BF 02 ld (bc),a + 483:22525+6 22C0 03 inc bc + 484:22531+4 22C1 7C ld a,h + 485:22535+7 22C2 02 ld (bc),a + 486:22542+6 22C3 03 inc bc + 487:22548+6 22C4 13 inc de ;also increment de to next byte + 488:22554+6 22C5 13 inc de + 489: ; DE and HL now start at the upper byte + 490:22560+11 22C6 C5 push bc + 491:22571+11 22C7 D5 push de + 492:22582+7 22C8 1A ld a,(de) ; load upper 16bit for B + 493:22589+4 22C9 6F ld l,a + 494:22593+6 22CA 13 inc de + 495:22599+7 22CB 1A ld a,(de) + 496:22606+4 22CC 67 ld h,a + 497:22610+6 22CD 13 inc de + 498:22616+7 22CE 0A ld a,(bc) ; load upper 16bit for A + 499:22623+4 22CF 5F ld e,a + 500:22627+6 22D0 03 inc bc + 501:22633+7 22D1 0A ld a,(bc) + 502:22640+4 22D2 57 ld d,a + 503:22644+15 22D3 ED5A adc hl,de ;add upper bytes, store carry + 504:22659+10 22D5 D1 pop de + 505:22669+10 22D6 C1 pop bc + 506:22679+4 22D7 7D ld a,l ;store lower result in (bc) + 507:22683+7 22D8 02 ld(bc),a + 508:22690+6 22D9 03 inc bc + 509:22696+4 22DA 7C ld a,h + 510:22700+7 22DB 02 ld(bc),a + 511:22707+10 22DC E1 pop hl + 512:22717+10 22DD C9 ret + 513: + 514: + 515: ; Multiply 16-bit values (with 32-bit result) + 516: ; Operands BC, DE + 517: ; Result -> BCHL + 518: - 22DE _fat_math_mul32: + 519:22727+4 22DE 79 ld a,c + 520:22731+4 22DF 48 ld c,b + 521:22735+10 22E0 210000 ld hl,0 + 522:22745+7 22E3 0610 ld b,16 + 523: - 22E5 _fat_math_mul32_l: + 524:22752+11 22E5 29 add hl,hl + 525:22763+4 22E6 17 rla + 526:22767+8 22E7 CB11 rl c + 527:22775+7+5 22E9 3007 jr nc,_fat_math_mul32_noadd + 528:22782+11 22EB 19 add hl,de + 529:22793+7 22EC CE00 adc a,0 + 530:22800+10 22EE D2F222 jp nc,_fat_math_mul32_noadd + 531:22810+4 22F1 0C inc c + 532: - 22F2 _fat_math_mul32_noadd: + 533:22814+8+5 22F2 10F1 djnz _fat_math_mul32_l + 534:22822+4 22F4 41 ld b,c + 535:22826+4 22F5 4F ld c,a + 536:22830+10 22F6 C9 ret + 537: + 538: ; reset LBA pointer to first sector in selected partition + 539: - 22F7 fat_reset_pointer: + 540:22840+17 22F7 CD1C15 call ideif_get_drv_pointer + 541:22857+10 22FA DD23 inc ix + 542:22867+10 22FC DD23 inc ix + 543:22877+15 22FE DDE5 push ix + 544:22892+10 2300 E1 pop hl ;copy poiter to hl + 545:22902+10 2301 11D140 ld de, MEM_IDE_POINTER + 546:22912+12 2304 1800 jr fat_copy_lba_pointer + 547: + 548: ; resets LBA pointer (4-byte) to partition start + 549: ; HL = from here + 550: ; DE = to this destimation + 551: - 2306 fat_copy_lba_pointer: + 552:22924+11 2306 C5 PUSH BC + 553:22935+7 2307 0600 LD B,0 + 554:22942+7 2309 0E04 LD C,4 + 555:22949+16+5 230B EDB0 LDIR + 556:22965+10 230D C1 POP BC + 557:22975+10 230E C9 ret + 558: + 559: ; compares filenames + 560: ; HL points to name1 + 561: ; DE points to name2 + 562: ; Carry is set if match + 563: ; Destroys DE, AF + 564: - 230F compare_filename: + 565:22985+11 230F E5 PUSH HL + 566:22996+11 2310 C5 push BC + 567:23007+7 2311 060B LD B, 11 ;Counter + 568: - 2313 _compare_filename_loop: + 569:23014+7 2313 1A LD A,(DE) + 570:23021+4 2314 4F LD C,A + 571:23025+7 2315 7E LD A,(HL) + 572:23032+6 2316 23 INC HL + 573:23038+6 2317 13 INC DE + 574:23044+4 2318 A9 XOR C ;check if identical (should return 0) + 575:23048+7+5 2319 2006 JR NZ, _compare_filename_nomatch + 576:23055+8+5 231B 10F6 djnz _compare_filename_loop ;if not last, continue + 577:23063+10 231D C1 POP BC + 578:23073+10 231E E1 POP HL + 579:23083+4 231F 37 SCF + 580:23087+10 2320 C9 RET + 581: - 2321 _compare_filename_nomatch: + 582:23097+10 2321 C1 POP BC + 583:23107+10 2322 E1 POP HL + 584:23117+4 2323 AF XOR A ; clear carry flag + 585:23121+10 2324 C9 RET + 586: + 587: ; formats filename to 8+3 format + 588: ; DE points to source filename to string + 589: ; HL points to destination + 590: - 2325 format_filename_fat16: + 591:23131+7 2325 060B LD B, 11 ;counter + 592:23138+11 2327 E5 PUSH HL + 593:23149+7 2328 3E20 LD A, ' ' + 594: - 232A _format_filename_fat16_clean: + 595:23156+7 232A 77 LD (HL),A + 596:23163+6 232B 23 INC HL + 597:23169+8+5 232C 10FC DJNZ _format_filename_fat16_clean + 598:23177+10 232E E1 POP HL ; continue with copy + 599:23187+7 232F 060D LD B, 13 + 600: - 2331 _format_filename_fat16_loop: + 601:23194+7 2331 1A LD A, (DE) ; load byte + 602:23201+4 2332 B7 OR A + 603:23205+5+6 2333 C8 RET Z ;exit on 0byte + 604:23210+4 2334 05 DEC B ;reduce counter + 605:23214+5+6 2335 C8 RET Z ;exit after 12 bytes 8+.+3 + 606:23219+7 2336 FE2E CP '.' ; check if dot + 607:23226+7+5 2338 200A JR NZ, _format_filename_fat16_loop_copy ; if not continue as usual + 608:23233+6 233A 13 INC DE ;else skip char + 609: - 233B _format_filename_fat16_loop_skip_8: + 610:23239+4 233B 78 LD A,B + 611:23243+7 233C FE05 CP 5 + 612:23250+7+5 233E 38F1 JR C, _format_filename_fat16_loop + 613:23257+6 2340 23 INC HL + 614:23263+4 2341 05 DEC B + 615:23267+12 2342 18F7 JR _format_filename_fat16_loop_skip_8 + 616: + 617: - 2344 _format_filename_fat16_loop_copy: + 618:23279+7 2344 1A LD A, (DE) ; load byte + 619:23286+7 2345 77 LD (HL), A ; copy byte + 620:23293+6 2346 23 INC HL + 621:23299+6 2347 13 INC DE +**** main.asm **** + 197:23305+10 2348 C33123 JP _format_filename_fat16_loop + 198: .include "fat16_cmd.s" +**** include/fat16_cmd.s **** + 1: ;------------------------------------- + 2: ; Print current fat directory of MEM_FAT_CURRDIR + 3: ;------------------------------------- + 4: - 234B fat_print_directory: + 5:23315+10 234B 213F44 ld hl,MEM_FAT_CURRDIR + 6:23325+10 234E 11D140 ld de,MEM_IDE_POINTER + 7:23335+16 2351 EDA0 ldi + 8:23351+16 2353 EDA0 ldi + 9:23367+16 2355 EDA0 ldi + 10:23383+16 2357 EDA0 ldi + 11: + 12:23399+20 2359 ED5BB943 LD DE,(MEM_FAT_SECTORS) + 13:23419+20 235D ED53BC43 LD (MEM_FAT_COUNT1),DE + 14:23439+10 2361 21D140 LD HL,MEM_IDE_POINTER ;read first sector + 15:23449+7 2364 0601 LD B,1 + 16:23456+10 2366 11B641 LD DE, MEM_IDE_BUFFER ;where to store data? + 17:23466+17 2369 CD4315 call read_lba_sector + 18: + 19:23483+17 236C CD9101 call PRINTINLINE + 20: - 236F 0A0D2020 db 10,13," Filename Cluster Size",10,13,0 + 46696C65 + 6E616D65 + 20202020 + 20436C75 + 73746572 + 2053697A + 650A0D00 + 21: + 22:23500+10 238F 21B641 LD HL, MEM_IDE_BUFFER ;set buffer start + 23:23510+7 2392 0E10 LD C,16 ;set entries counter + 24: + 25: - 2394 _fat_print_directory_loop: ;loop over each entry (32byte) + 26:23517+7 2394 7E LD A,(HL) ; check first byte + 27:23524+11 2395 E5 PUSH HL ;backup start of entry + 28:23535+14 2396 DDE1 POP IX + 29:23549+11 2398 E5 PUSH HL + 30: ;ignore unwanted entries + 31:23560+7 2399 FE41 CP 0x41 ;skip invisible + 32:23567+10 239B CA2C24 JP Z, _fat_print_directory_loop_next + 33:23577+7 239E FEE5 CP 0xE5 ;skip deleted + 34:23584+10 23A0 CA2C24 JP Z, _fat_print_directory_loop_next + 35:23594+7 23A3 FE00 CP 0x00 ;reached end + 36:23601+10 23A5 CA5E24 JP Z, _fat_print_directory_loop_break + 37: + 38: ;check file attribute + 39:23611+19 23A8 DD7E0B ld a,(IX+0x0B) + 40:23630+7 23AB FE10 cp 0x10 ;if subdirectors + 41:23637+10 23AD CA0124 jp z, _fat_print_directory_dir ;print dir + 42: ;else print file + 43: - 23B0 _fat_print_directory_loop_file + 44: ;print filename + 45:23647+7 23B0 3E20 ld a,' ' + 46:23654+17 23B2 CDDE00 call print_char + 47:23671+7 23B5 3E20 ld a,' ' + 48:23678+17 23B7 CDDE00 call print_char + 49:23695+7 23BA 0608 LD B,8 + 50:23702+17 23BC CD7B18 call print_str_fixed + 51:23719+7 23BF 3E2E ld A,'.' + 52:23726+17 23C1 CDDE00 call print_char + 53:23743+7 23C4 0603 LD B,3 + 54:23750+17 23C6 CD7B18 call print_str_fixed + 55: + 56:23767+17 23C9 CD9101 call PRINTINLINE + 57: - 23CC 20307800 db " 0x",0 + 58: ;first cluster number + 59:23784+19 23D0 DD7E1B ld a,(ix+0x1B) + 60:23803+17 23D3 CD0E01 call print_a_hex + 61:23820+19 23D6 DD7E1A ld a,(ix+0x1A) + 62:23839+17 23D9 CD0E01 call print_a_hex + 63:23856+17 23DC CD9101 call PRINTINLINE + 64: - 23DF 20203078 db " 0x",0 + 00 + 65:23873+19 23E4 DD7E1F ld a,(ix+0x1F) + 66:23892+17 23E7 CD0E01 call print_a_hex + 67:23909+19 23EA DD7E1E ld a,(ix+0x1E) + 68:23928+17 23ED CD0E01 call print_a_hex + 69:23945+19 23F0 DD7E1D ld a,(ix+0x1D) + 70:23964+17 23F3 CD0E01 call print_a_hex + 71:23981+19 23F6 DD7E1C ld a,(ix+0x1C) + 72:24000+17 23F9 CD0E01 call print_a_hex + 73:24017+17 23FC CDF800 call print_newLine + 74:24034+12 23FF 182B jr _fat_print_directory_loop_next + 75: - 2401 _fat_print_directory_dir + 76:24046+7 2401 3E44 ld a,'D' + 77:24053+17 2403 CDDE00 call print_char + 78:24070+7 2406 3E20 ld a,' ' + 79:24077+17 2408 CDDE00 call print_char + 80:24094+7 240B 0608 LD B,8 + 81:24101+17 240D CD7B18 call print_str_fixed + 82:24118+17 2410 CD9101 call PRINTINLINE + 83: - 2413 20202020 db " 0x",0 + 20307800 + 84: ;first cluster number + 85:24135+19 241B DD7E1B ld a,(ix+0x1B) + 86:24154+17 241E CD0E01 call print_a_hex + 87:24171+19 2421 DD7E1A ld a,(ix+0x1A) + 88:24190+17 2424 CD0E01 call print_a_hex + 89:24207+17 2427 CDF800 call print_newLine + 90:24224+12 242A 1800 jr _fat_print_directory_loop_next + 91: + 92: - 242C _fat_print_directory_loop_next: ; read next entry + 93:24236+4 242C 0D DEC C ;next sector after 32 entries + 94:24240+7+5 242D 2808 JR Z,_fat_print_directory_loop_next_sector + 95:24247+10 242F E1 POP HL ;restore start + 96:24257+10 2430 112000 LD DE, 32 ;length of entry + 97:24267+11 2433 19 ADD HL,DE ;increment + 98:24278+10 2434 C39423 JP _fat_print_directory_loop + 99: + 100: - 2437 _fat_print_directory_loop_next_sector: ; end fo sector. read next sector from disk + 101:24288+10 2437 E1 POP HL ;clear stack from old hl + 102:24298+7 2438 2600 LD H,0 + 103:24305+7 243A 2E01 LD L,1 + 104:24312+17 243C CD8522 call _fat_math_sector_add_16 ;increment sector + 105: + 106:24329+20 243F ED5BBC43 LD DE,(MEM_FAT_COUNT1) ; decrement sector count (max FAT length) + 107:24349+6 2443 1B DEC DE + 108:24355+20 2444 ED53BC43 LD (MEM_FAT_COUNT1),DE + 109:24375+4 2448 7A LD A,D + 110:24379+4 2449 B3 OR E + 111:24383+5+6 244A C8 RET Z ; if DE is 0, mmax is reached. End here + 112: + 113:24388+10 244B 21D140 LD HL,MEM_IDE_POINTER ;read next sector + 114:24398+7 244E 0601 LD B,1 + 115: + 116:24405+10 2450 11B641 LD DE, MEM_IDE_BUFFER ;where to store data? + 117:24415+17 2453 CD4315 call read_lba_sector + 118: + 119:24432+10 2456 21B641 LD HL, MEM_IDE_BUFFER ;set buffer start + 120:24442+7 2459 0E10 LD C,16 ;set entries counter + 121:24449+10 245B C39423 JP _fat_print_directory_loop + 122: + 123: - 245E _fat_print_directory_loop_break + 124:24459+10 245E E1 POP HL + 125:24469+10 245F C9 ret + 126: + 127: ;------------------------------------- + 128: ; Changes current fat directory of MEM_FAT_CURRDIR + 129: ; input is relativ path + 130: ; DE points to path + 131: ;------------------------------------- + 132: - 2460 fat_cd_single: + 133:24479+11 2460 D5 push de + 134: ; check if user wants to go back (input = '..') + 135:24490+7 2461 1A ld a,(de) + 136:24497+7 2462 FE2E cp '.' + 137:24504+7+5 2464 205E jr nz, _fat_cd_navigate; if not, skip + 138:24511+6 2466 13 inc de ;check next + 139:24517+7 2467 1A ld a,(de) + 140:24524+7 2468 FE2E cp '.' + 141:24531+7+5 246A 2058 jr nz, _fat_cd_navigate; if not, skip + 142:24538+13 246C 3A7A40 ld a,(var_dir+79) ;last byte contains depth + 143:24551+4 246F B7 or a; Test if 0 + 144:24555+10 2470 CA1C25 jp z, _fat_cd_navigate_error ;cannot go back any more (already at root) + 145: ; check if .. exists in directory + 146:24565+7 2473 3E2E ld a,'.' ;prepare filename buffer + 147:24572+10 2475 21CF43 ld hl,[MEM_FAT_TMPFNAME] + 148:24582+7 2478 77 ld (hl),a + 149:24589+6 2479 23 inc hl + 150:24595+7 247A 77 ld (hl),a + 151:24602+6 247B 23 inc hl + 152:24608+7 247C 3E20 ld a,0x20 ;clear char 3-11 + 153:24615+7 247E 060B ld b,11 + 154: - 2480 _fat_cd_navigate_goback_fl: + 155:24622+7 2480 77 ld (hl),a + 156:24629+6 2481 23 inc hl + 157:24635+8+5 2482 10FC djnz _fat_cd_navigate_goback_fl ;fill loop end + 158:24643+17 2484 CDEC21 call fat_openfile_noprepare ;load file table (only 1st sector needed) + 159:24660+4 2487 B7 or a ;check for error + 160:24664+10 2488 C21C25 jp nz, _fat_cd_navigate_error ;entry not found exception + 161: + 162: + 163: ; find end of path + 164:24674+10 248B 212E40 ld hl,[var_dir+3] ;current position + 165:24684+10 248E 014C00 ld bc,76 + 166:24694+7 2491 3E00 ld a,0x00 ;termination char + 167:24701+16+5 2493 EDB1 cpir ;find end + 168:24717+10 2495 E22A25 jp po,_fat_cd_navigate_inerror ;in case of error, abort + 169: ;hl is now at end of string + 170:24727+10 2498 014C00 ld bc,76 + 171:24737+7 249B 3E5C ld a,'\' ;seperation char + 172:24744+16+5 249D EDB9 cpdr ;serach backwards for "/" + 173:24760+10 249F E22A25 jp po,_fat_cd_navigate_inerror ;in case of error, abort + 174: ;hl is now at end of string + 175:24770+6 24A2 23 inc hl + 176:24776+4 24A3 AF xor a + 177:24780+7 24A4 77 ld (hl),a ;set termination char + 178:24787+6 24A5 23 inc hl + 179:24793+7 24A6 77 ld (hl),a ;set termination char + 180:24800+13 24A7 3A7A40 ld a,(var_dir+79) + 181:24813+4 24AA 3D dec a + 182:24817+13 24AB 327A40 ld (var_dir+79),a ;decrement dir depth counter + 183: + 184:24830+10 24AE D1 pop de + 185: + 186:24840+10 24AF 212D40 ld hl,[var_dir+2] + 187:24850+7 24B2 3E5C ld a,'\' + 188:24857+7 24B4 77 ld (hl),a ;set first / + 189: + 190:24864+10 24B5 213744 ld hl,MEM_FAT_OF0_DATSEC ;setup directory pointer + 191:24874+10 24B8 113F44 ld de,MEM_FAT_CURRDIR + 192:24884+16 24BB EDA0 ldi + 193:24900+16 24BD EDA0 ldi + 194:24916+16 24BF EDA0 ldi + 195:24932+16 24C1 EDA0 ldi + 196: + 197:24948+10 24C3 C9 ret + 198: + 199: - 24C4 _fat_cd_navigate + 200:24958+10 24C4 D1 pop de ;get pointer to directory namme + 201:24968+11 24C5 D5 push de ;and re-store it for next use + 202:24979+17 24C6 CDE421 call fat_openfile ;find 'file' in current directory + 203: - 24C9 _fat_cd_navigate_findsec + 204:24996+4 24C9 B7 or a + 205:25000+10 24CA C21C25 jp nz, _fat_cd_navigate_error ;entry not found + 206:25010+13 24CD 3A2F44 ld a, (MEM_FAT_OF0_ATTRIBUTE) + 207:25023+7 24D0 FE10 cp 0x10 + 208:25030+10 24D2 C23225 jp nz, _fat_cd_navigate_errfile + 209:25040+13 24D5 3A7A40 ld a,(var_dir+79) + 210:25053+4 24D8 3C inc a + 211:25057+13 24D9 327A40 ld (var_dir+79),a ;increment dir depth counter + 212:25070+10 24DC 212D40 ld hl,[var_dir+2] ;load start of path string + 213:25080+7 24DF 3E00 ld a,0 ;load termination char + 214:25087+10 24E1 014C00 ld bc,76 ;max length of string + 215:25097+16+5 24E4 EDB1 cpir ;find end of path string + 216:25113+6 24E6 2B dec hl + 217:25119+10 24E7 E22A25 jp po,_fat_cd_navigate_inerror ;in case of error, abort + 218: ;HL now has last element, BC has remaining max length + 219:25129+13 24EA 3A7A40 ld a,(var_dir+79) ;last byte contains depth + 220:25142+7 24ED FE01 cp 1 ;if first path, skip / + 221:25149+7+5 24EF 2804 jr z, _fat_cd_navigate_findsec_skipslash + 222:25156+7 24F1 3E5C ld a,'\' + 223:25163+7 24F3 77 ld (hl),a + 224:25170+6 24F4 23 inc hl + 225: - 24F5 _fat_cd_navigate_findsec_skipslash + 226:25176+10 24F5 D1 pop de ;get argument from stack + 227:25186+4 24F6 EB ex de,hl + 228:25190+11 24F7 D5 push de ;store start to stack + 229: ;HL now has start of input string, DE has end of current path + 230:25201+10 24F8 010900 ld bc,09 ;maximum length of directory name +1 + 231: - 24FB _fat_cd_navigate_l2: ;copy new subdirectory + 232:25211+16 24FB EDA0 ldi ;copy + 233:25227+10 24FD E22425 jp po,_fat_cd_navigate_inerrorS ;in case of error, abort + 234:25237+7 2500 7E ld a,(hl) ;check next char + 235:25244+7 2501 FE5C cp '\' ;end at '\' + 236:25251+7+5 2503 2805 jr z, _fat_cd_navigate_end ;else next byte + 237:25258+4 2505 B7 or a ;or and at 0x00 + 238:25262+7+5 2506 2802 jr z, _fat_cd_navigate_end ;else next byte + 239:25269+12 2508 18F1 jr _fat_cd_navigate_l2 + 240: - 250A _fat_cd_navigate_end: + 241:25281+4 250A AF xor a + 242:25285+7 250B 12 ld (de),a ;set last byte to 0x00 (termination) + 243:25292+10 250C 213744 ld hl,MEM_FAT_OF0_DATSEC + 244: ;setup directory pointer + 245:25302+10 250F 113F44 ld de,MEM_FAT_CURRDIR + 246:25312+16 2512 EDA0 ldi + 247:25328+16 2514 EDA0 ldi + 248:25344+16 2516 EDA0 ldi + 249:25360+16 2518 EDA0 ldi + 250:25376+10 251A D1 pop de ;stack cleanup + 251:25386+10 251B C9 ret + 252: + 253: - 251C _fat_cd_navigate_error: + 254:25396+10 251C 213A25 ld hl,[_fat_cd_navigate_error_str] + 255:25406+17 251F CDE600 call print_str + 256:25423+10 2522 D1 pop de + 257:25433+10 2523 C9 ret + 258: + 259: - 2524 _fat_cd_navigate_inerrorS: ;with path reset + 260:25443+10 2524 D1 pop de ;restore former path + 261:25453+6 2525 1B dec de ;change pointer to remove previous '\' as well + 262:25459+4 2526 AF xor a ;clear a to 0x00 + 263:25463+7 2527 12 ld (de),a ;set last byte to 0x00 (termination) + 264:25470+12 2528 1801 jr _fat_cd_navigate_inerrore + 265: - 252A _fat_cd_navigate_inerror: ;without path reset + 266:25482+10 252A D1 pop de + 267: - 252B _fat_cd_navigate_inerrore: + 268:25492+10 252B 215125 ld hl,[_fat_cd_navigate_inputerr_str] + 269:25502+17 252E CDE600 call print_str + 270:25519+10 2531 C9 ret + 271: - 2532 _fat_cd_navigate_errfile: + 272:25529+10 2532 D1 pop de + 273:25539+10 2533 216425 ld hl,[_fat_cd_navigate_errfile_str] + 274:25549+17 2536 CDE600 call print_str + 275:25566+10 2539 C9 ret + 276: + 277: - 253A _fat_cd_navigate_error_str: + 278: - 253A 0A0D4E6F db 10,13,"No such directory!",10,13,0 + 20737563 + 68206469 + 72656374 + 6F727921 + 0A0D00 + 279: - 2551 _fat_cd_navigate_inputerr_str: + 280: - 2551 0A0D496E db 10,13,"Invalid input!",10,13,0 + 76616C69 + 6420696E + 70757421 + 0A0D00 + 281: - 2564 _fat_cd_navigate_errfile_str: + 282: - 2564 0A0D4361 db 10,13,"Cannot cd to file!",10,13,0 + 6E6E6F74 + 20636420 + 746F2066 + 696C6521 + 0A0D00 + 283: + 284: - 257B fat_exec: + 285:25576+11 257B D5 push de + 286: ;DE has pointer to arguments + 287:25587+17 257C CDE421 call fat_openfile + 288:25604+4 257F B7 or a + 289:25608+10 2580 C21226 jp nz, _fat_exec_notfound ;if not found, abort + 290: ;call fat_print_dbg + 291: ;load header + 292:25618+10 2583 11B641 ld de, MEM_IDE_BUFFER + 293:25628+17 2586 CDB921 call fat_readfilesec + 294: + 295: + 296: ;ld hl, MEM_IDE_BUFFER ;print sector + 297: ;ld b,0x20 + 298: ;call dump_pretty + 299: + 300:25645+13 2589 3AB641 ld a,(MEM_IDE_BUFFER) + 301:25658+7 258C FEC3 cp 0xC3 + 302:25665+10 258E C22B26 jp nz, _fat_exec_notexec + 303: + 304:25675+17 2591 CD9101 call PRINTINLINE + 305: - 2594 0A0D4C6F db 10,13,"Loading ",0 + 6164696E + 672000 + 306:25692+10 259F 218140 ld hl,[var_input+6] + 307:25702+17 25A2 CDE600 call print_str + 308:25719+17 25A5 CD9101 call PRINTINLINE + 309: - 25A8 20746F20 db " to 0x",0 + 307800 + 310: ;get start address + 311:25736+20 25AF ED4BC041 ld bc,(MEM_IDE_BUFFER + 10) + 312:25756+4 25B3 78 ld a,b + 313:25760+17 25B4 CD0E01 call print_a_hex + 314:25777+4 25B7 79 ld a,c + 315:25781+17 25B8 CD0E01 call print_a_hex + 316:25798+17 25BB CD9101 call PRINTINLINE + 317: - 25BE 202E2E2E db " ... ",0 + 2000 + 318: ;bc has start addr + 319:25815+20 25C4 ED434344 ld (MEM_FAT_EXEC_CURR),bc + 320:25835+20 25C8 ED434744 ld (MEM_FAT_EXEC_START),bc + 321: + 322: ;get amount of sectors to load + 323:25855+16 25CC 2AC441 ld hl,(MEM_IDE_BUFFER + 14) + 324:25871+4 25CF 6C ld l,h + 325:25875+8 25D0 CB3D srl l + 326:25883+7 25D2 2600 ld h,0 ;divide by 512 + 327:25890+6 25D4 23 inc hl ;increment because first sector is always loaded + 328: ; hl contains sector count + 329:25896+16 25D5 224544 ld (MEM_FAT_EXEC_COUNT), hl + 330: + 331:25912+10 25D8 D1 pop de ; restore filename + 332:25922+17 25D9 CDE421 call fat_openfile ;reset file information + 333: ;start reading + 334: - 25DC _fat_exec_readloop1: + 335:25939+20 25DC ED5B4344 ld de,(MEM_FAT_EXEC_CURR) + 336:25959+17 25E0 CDB921 call fat_readfilesec + 337:25976+16 25E3 2A4344 ld hl,(MEM_FAT_EXEC_CURR) + 338:25992+10 25E6 110002 ld de,512 + 339:26002+11 25E9 19 add hl,de + 340:26013+16 25EA 224344 ld (MEM_FAT_EXEC_CURR),hl + 341: + 342:26029+16 25ED 2A4544 ld hl,(MEM_FAT_EXEC_COUNT) + 343:26045+6 25F0 2B dec hl + 344:26051+16 25F1 224544 ld (MEM_FAT_EXEC_COUNT),hl + 345:26067+4 25F4 7C ld a,h + 346:26071+4 25F5 B5 or l + 347:26075+7+5 25F6 2802 jr z, _fat_exec_read_done + 348:26082+12 25F8 18E2 jr _fat_exec_readloop1 + 349: - 25FA _fat_exec_read_done: + 350:26094+17 25FA CD9101 call PRINTINLINE + 351: - 25FD 4C6F6164 db "Load complete!",10,13,0 + 20636F6D + 706C6574 + 65210A0D + 00 + 352:26111+16 260E 2A4744 ld hl,(MEM_FAT_EXEC_START) + 353:26127+4 2611 E9 jp (hl) + 354: + 355: + 356: - 2612 _fat_exec_notfound: + 357:26131+10 2612 D1 pop de + 358:26141+17 2613 CD9101 call PRINTINLINE + 359: - 2616 0A0D4669 db 10,13,"File not found!",10,13,0 + 6C65206E + 6F742066 + 6F756E64 + 210A0D00 + 360:26158+10 262A C9 ret + 361: + 362: - 262B _fat_exec_notexec: + 363:26168+10 262B D1 pop de + 364:26178+17 262C CD9101 call PRINTINLINE + 365: - 262F 0A0D4669 db 10,13,"File is not an executable!",10,13,0 + 6C652069 + 73206E6F + 7420616E + 20657865 + 63757461 + 626C6521 + 0A0D00 +**** main.asm **** + 199:26195+10 264E C9 ret + 200: + 201: ;================================================================ + 202: ; Strings + 203: ;================================================================ + 204: - 264F STR_Banner_Start: + 205: - 264F 5A384320 db "Z8C Monitor V2.1 by Dennis Gunia (2022-2024)",0 4D6F6E69 746F7220 56322E31 @@ -3938,35 +5154,35 @@ Statistics: 4 passes 0 jr promotions - 470 symbols - 8581 bytes + 559 symbols + 10756 bytes Symbol Table: ADDR_RTC =D0 208 -A_RTS_OFF 152 338 -A_RTS_ON 15B 347 +A_RTS_OFF 17F 383 +A_RTS_ON 188 392 BOOT_PHASE0 50 80 BOOT_PHASE1 6E 110 BOOT_PHASE1_LOOP 77 119 -BOOT_PHASE2 82 130 -COMMAND 17EB 6123 -COMMAND_BACKSPACE 1826 6182 -COMMAND_LUT 176B 5995 -COMMAND_PROCESS 184C 6220 -COMMAND_PROCESS_FOUND 1887 6279 -COMMAND_PROCESS_LOOP 184F 6223 -COMMAND_PROCESS_LOOP_STR1 1858 6232 -COMMAND_PROCESS_LOOP_STR2 186E 6254 -COMMAND_PROCESS_NEXT_ENTRY 1873 6259 -COMMAND_PROCESS_NEXT_ENTRYI 1872 6258 -COMMAND_PROCESS_NOT_FOUND 187E 6270 -COMMAND_READ 17F7 6135 -CONSOLE_INIT 9E 158 -CONSOLE_INIT_CTC 9E 158 -CONSOLE_INIT_SIO A6 166 +BOOT_PHASE2 89 137 +COMMAND 1915 6421 +COMMAND_BACKSPACE 1956 6486 +COMMAND_LUT 1883 6275 +COMMAND_PROCESS 197C 6524 +COMMAND_PROCESS_FOUND 19B7 6583 +COMMAND_PROCESS_LOOP 197F 6527 +COMMAND_PROCESS_LOOP_STR1 1988 6536 +COMMAND_PROCESS_LOOP_STR2 199E 6558 +COMMAND_PROCESS_NEXT_ENTRY 19A3 6563 +COMMAND_PROCESS_NEXT_ENTRYI 19A2 6562 +COMMAND_PROCESS_NOT_FOUND 19AE 6574 +COMMAND_READ 1927 6439 +CONSOLE_INIT A5 165 +CONSOLE_INIT_CTC A5 165 +CONSOLE_INIT_SIO AD 173 CS_APU_CTRL =F9 249 CS_APU_DATA =F8 248 CS_BANK =00 0 @@ -3987,18 +5203,18 @@ CS_SIO_A_C =09 9 CS_SIO_A_D =08 8 CS_SIO_B_C =0B 11 CS_SIO_B_D =0A 10 -DHEX_TO_BYTE 164 356 -DHEX_TO_BYTE_FAILED 180 384 -ERR_SYNTAX 189D 6301 -EXEC_RST_08 D04 3332 -EXEC_RST_10 D08 3336 -EXEC_RST_18 D14 3348 -HEX_TO_BIN 184 388 -HEX_TO_BIN_2 192 402 -HEX_TO_INVALID_2 199 409 +DHEX_TO_BYTE 1F6 502 +DHEX_TO_BYTE_FAILED 212 530 +ERR_SYNTAX 19CD 6605 +EXEC_RST_08 D96 3478 +EXEC_RST_10 D9A 3482 +EXEC_RST_18 DA6 3494 +HEX_TO_BIN 216 534 +HEX_TO_BIN_2 224 548 +HEX_TO_INVALID_2 22B 555 IDE_CMD_IDENT =EC 236 IDE_CMD_READSEC=20 32 -IDE_DEV_TABLE 1275 4725 +IDE_DEV_TABLE 12FA 4858 IDE_RD =40 64 IDE_REG_ALTSTS =16 22 IDE_REG_CMDSTS =0F 15 @@ -4019,7 +5235,6 @@ IDE_WR =20 32 IIC_CLK =01 1 IIC_DATA =02 2 INT_VEC 1B 27 -IN_BUFFER =402B 16427 IO_AY0_ADDR =40 64 IO_AY0_DATA =41 65 IO_AY1_ADDR =42 66 @@ -4041,42 +5256,67 @@ IO_RTC_SEC1 =21 33 IO_RTC_WEEK =2C 44 IO_RTC_YEAR1 =2B 43 IO_RTC_YERR0 =2A 42 -MEM_IDE_BUFFER 4117 16663 -MEM_IDE_DEVICE 402C 16428 -MEM_IDE_DEV_TABLE 4036 16438 -MEM_IDE_FSBUFFER 4317 17175 -MEM_IDE_PARTITION 402E 16430 -MEM_IDE_POINTER 4032 16434 -MEM_IDE_SELECTED 4076 16502 -MEM_IDE_STATUS 402D 16429 -MEM_IDE_STRING_0 4077 16503 -MEM_IDE_STRING_1 409F 16543 -MEM_IDE_STRING_2 40C7 16583 -MEM_IDE_STRING_3 40EF 16623 -MSG_CLEAR 14A 330 -NOT_IMPLEMENTED 1896 6294 -OP_CALL 18F8 6392 -OP_CLR 1A8C 6796 -OP_DASM 1979 6521 -OP_DUMP 1918 6424 -OP_EXEC 18DF 6367 -OP_IIC_IN 1A40 6720 -OP_IIC_OUT 19E0 6624 -OP_IO_IN 19A9 6569 -OP_IO_OUT 19BF 6591 -OP_LSDSK 1CA1 7329 -OP_RTIME 1A90 6800 -OP_SELDSK 1CA5 7333 -OP_SET 1948 6472 -OP_STIME 1C28 7208 -POST_CHECK_APU 1D12 7442 -POST_CHECK_IDE_30 1D3D 7485 -POST_CHECK_IDE_40 1D50 7504 -POST_CHECK_PIO 1CED 7405 -POST_START 1CDD 7389 -POST_TEST_RTC 1D6A 7530 +MEM_FAT_AMOUNT 43B8 17336 +MEM_FAT_CLUSTERLEN 43BB 17339 +MEM_FAT_COUNT1 43BC 17340 +MEM_FAT_CURDIR 43DF 17375 +MEM_FAT_CURRDIR 443F 17471 +MEM_FAT_DATASTART 43C1 17345 +MEM_FAT_DIRSEC 43CD 17357 +MEM_FAT_EXEC_COUNT 4445 17477 +MEM_FAT_EXEC_CURR 4443 17475 +MEM_FAT_EXEC_START 4447 17479 +MEM_FAT_FILEREMAIN 43C9 17353 +MEM_FAT_OF0_ATTRIBUTE 442F 17455 +MEM_FAT_OF0_CCLUST 4431 17457 +MEM_FAT_OF0_DATREM 443B 17467 +MEM_FAT_OF0_DATSEC 4437 17463 +MEM_FAT_OF0_FATSEC 4433 17459 +MEM_FAT_RESERVED 43B6 17334 +MEM_FAT_ROOTSTART 43C5 17349 +MEM_FAT_SECTORS 43B9 17337 +MEM_FAT_TMPFNAME 43CF 17359 +MEM_FAT_TMPPOINTER 43BD 17341 +MEM_IDE_BUFFER 41B6 16822 +MEM_IDE_DEVICE 40CB 16587 +MEM_IDE_DEV_TABLE 40D5 16597 +MEM_IDE_FSBUFFER 43B6 17334 +MEM_IDE_PARTITION 40CD 16589 +MEM_IDE_POINTER 40D1 16593 +MEM_IDE_SELECTED 4115 16661 +MEM_IDE_STATUS 40CC 16588 +MEM_IDE_STRING_0 4116 16662 +MEM_IDE_STRING_1 413E 16702 +MEM_IDE_STRING_2 4166 16742 +MEM_IDE_STRING_3 418E 16782 +MSG_CLEAR 177 375 +NOT_IMPLEMENTED 19C6 6598 +OP_CALL 1A28 6696 +OP_CD 1DF8 7672 +OP_CLR 1BBC 7100 +OP_DASM 1AA9 6825 +OP_DIR 1DF4 7668 +OP_DUMP 1A48 6728 +OP_EXEC 1A0F 6671 +OP_FSEXEC 1E15 7701 +OP_IIC_IN 1B70 7024 +OP_IIC_OUT 1B10 6928 +OP_IO_IN 1AD9 6873 +OP_IO_OUT 1AEF 6895 +OP_LSDSK 1DD1 7633 +OP_RTIME 1BC0 7104 +OP_SELDSK 1DD5 7637 +OP_SET 1A78 6776 +OP_STIME 1D58 7512 +POST_CHECK_APU 1E4E 7758 +POST_CHECK_IDE_30 1E79 7801 +POST_CHECK_IDE_40 1E8C 7820 +POST_CHECK_PIO 1E29 7721 +POST_START 1E19 7705 +POST_TEST_RTC 1EA6 7846 PRG_RAM_START =4110 16656 PRG_RAM_TOP =FF00 65280 +PRINTINLINE 191 401 PROG_MEM_START =4000 16384 PROG_ROM_START = 100 256 RST_00 00 0 @@ -4085,316 +5325,379 @@ RST_10 10 16 RST_18 18 24 STACK_RAM_TOP =FFFF 65535 START_ROM =00 0 -STRCONV_BYTES_TO_HEX 19B 411 -STRCONV_BYTES_TO_HEX_1 1AA 426 -STRCONV_BYTES_TO_HEX_2 1B4 436 -STR_Banner_Start 1E6F 7791 -STR_PD_HEADER 1724 5924 +STRCONV_BYTES_TO_HEX 22D 557 +STRCONV_BYTES_TO_HEX_1 23C 572 +STRCONV_BYTES_TO_HEX_2 246 582 +STR_Banner_Start 264F 9807 +STR_PD_HEADER 183C 6204 SYS_BUF_START =4010 16400 SYS_RAM_START =4000 16384 VAR_CONSOLE_BAUD=18 24 VAR_CONSOLE_CONF=0F 15 VDP_MEM =80 128 VDP_REG =81 129 -_COMMAND_PROCESS_FOUND 1895 6293 -_OP_CALL 1917 6423 -_OP_IIC_ACK_ERR 1A25 6693 -_OP_IIC_ACK_ERR_str 1A2C 6700 -_OP_IIC_IN_LOOP 1A72 6770 -_OP_IIC_IN_LOOP_TEXT 1A7F 6783 -_OP_IIC_OUT_LOOP 19F6 6646 -_OP_IIC_OUT_SEND 1A12 6674 -_OP_RTIME_NN 1A93 6803 -_OP_RTIME_RD_CMD 1B4B 6987 -_OP_SELDSK_INVALID 1CB4 7348 -_OP_SELDSK_INVALID_STR 1CC4 7364 -_OP_SET_LOOP 1960 6496 -_OP_STIME_INVALID 1BEE 7150 -_OP_STIME_PROMPT 1C05 7173 -_OP_STIME_PROMPT_ERR 1C1D 7197 -_OP_STIME_STR_DAY 1B4C 6988 -_OP_STIME_STR_HOUR 1B9D 7069 -_OP_STIME_STR_MIN 1BB8 7096 -_OP_STIME_STR_MON 1B67 7015 -_OP_STIME_STR_SEC 1BD3 7123 -_OP_STIME_STR_YEAR 1B82 7042 -_POST_CHECK_APU_FAILED 1D31 7473 -_POST_CHECK_IDE_FAILED 1D63 7523 -_POST_CHECK_PIO_FAILED 1D06 7430 -_POST_TEST_RTC_INVALID 1DA4 7588 -_POST_TEST_RTC_NOTFOUND 1D9D 7581 -_STR_NOT_FOUND 18B8 6328 -_STR_NOT_IMPLEMENTED 18A4 6308 -_STR_SYNTAX 18CC 6348 -_beep_pause_l1 D30 3376 -_ideif_init_drive_found 13E9 5097 -_ideif_init_drive_loop 13D1 5073 -_ideif_init_drive_nodrv 13E4 5092 -_ideif_init_drive_prt_fnd 1454 5204 -_ideif_init_drive_prt_l1 1442 5186 -_ideif_init_drive_prt_ln 144C 5196 -_ideif_prnt_devtable_hdr 1510 5392 -_ideif_prnt_devtable_l1 12E1 4833 -_ideif_prnt_devtable_l1_e2 13A7 5031 -_ideif_prnt_devtable_l1_es 1326 4902 -_ideif_prnt_devtable_l1_ms 13A4 5028 -_ideif_prnt_devtable_l1_nxt 12EE 4846 -_ideif_prnt_devtable_l1_s00 1314 4884 -_ideif_prnt_devtable_l1_s01 1319 4889 -_ideif_prnt_devtable_l1_s02 131E 4894 -_ideif_prnt_devtable_l1_sFF 1323 4899 -_ideif_prnt_devtable_l1_sel 12EC 4844 -_ideif_prnt_devtable_master 1574 5492 -_ideif_prnt_devtable_s00 1548 5448 -_ideif_prnt_devtable_s01 1553 5459 -_ideif_prnt_devtable_s02 155E 5470 -_ideif_prnt_devtable_sFF 1569 5481 -_ideif_prnt_devtable_slave 157C 5500 -_read_bcd_invalid 147 327 -_shift4 1C9C 7324 -beep D17 3351 -beep_loop D19 3353 -beep_pause D2F 3375 -dasm_00 91C 2332 -dasm_01 C08 3080 -dasm_02 9A2 2466 -dasm_03 BDA 3034 -dasm_08 A1F 2591 -dasm_09 BAD 2989 -dasm_0A 984 2436 -dasm_0B BF1 3057 -dasm_10 964 2404 -dasm_12 9AD 2477 -dasm_18 927 2343 -dasm_1A 98E 2446 -dasm_20 941 2369 -dasm_22 C4E 3150 -dasm_27 9E7 2535 -dasm_28 93A 2362 -dasm_2A C1F 3103 -dasm_2F 9EB 2539 -dasm_30 932 2354 -dasm_32 9B8 2488 -dasm_37 9F7 2551 -dasm_38 92B 2347 -dasm_3A 998 2456 -dasm_3F 9F3 2547 -dasm_76 9FB 2555 -dasm_80C6 A78 2680 -dasm_BE A15 2581 -dasm_C3 920 2336 -dasm_C88E A9E 2718 -dasm_C9 970 2416 -dasm_CD 96A 2410 -dasm_D9 A2C 2604 -dasm_DD 952 2386 -dasm_DD_01 C0F 3087 -dasm_DD_09 BC8 3016 -dasm_DD_22 C64 3172 -dasm_DD_23 BDF 3039 -dasm_DD_2A C36 3126 -dasm_DD_2B BF6 3062 -dasm_DD_34 B78 2936 -dasm_DD_35 B95 2965 -dasm_DD_86 A80 2688 -dasm_DD_8E AA6 2726 -dasm_DD_96 AC9 2761 -dasm_DD_9E AE9 2793 -dasm_DD_A6 B0A 2826 -dasm_DD_AE B41 2881 -dasm_DD_B6 B26 2854 -dasm_DD_BE B5D 2909 -dasm_DD_E1 CB6 3254 -dasm_DD_E3 A3C 2620 -dasm_DD_E5 CA0 3232 -dasm_DD_F9 C86 3206 -dasm_E1 CB0 3248 -dasm_E3 A30 2608 -dasm_E5 C9A 3226 -dasm_E9 949 2377 -dasm_ED_42 BBF 3007 -dasm_ED_43 C5A 3162 -dasm_ED_44 9EF 2543 -dasm_ED_45 97A 2426 -dasm_ED_46 A06 2566 -dasm_ED_4A BB6 2998 -dasm_ED_4B C2B 3115 -dasm_ED_4D 975 2421 -dasm_ED_56 A0B 2571 -dasm_ED_5E A10 2576 -dasm_ED_A0 A54 2644 -dasm_ED_A1 A66 2662 -dasm_ED_A8 A5D 2653 -dasm_ED_A9 A6F 2671 -dasm_ED_B0 A58 2648 -dasm_ED_B1 A6A 2666 -dasm_ED_B8 A61 2657 -dasm_ED_B9 A73 2675 -dasm_F3 A00 2560 -dasm_F9 C7C 3196 -dasm_FB A03 2563 -dasm_FD 95B 2395 -dasm_FD_01 C17 3095 -dasm_FD_09 BD1 3025 -dasm_FD_22 C70 3184 -dasm_FD_23 BE8 3048 -dasm_FD_2A C42 3138 -dasm_FD_2B BFF 3071 -dasm_FD_34 B84 2948 -dasm_FD_35 BA1 2977 -dasm_FD_86 A8F 2703 -dasm_FD_8E AB5 2741 -dasm_FD_96 AD5 2773 -dasm_FD_9E AF7 2807 -dasm_FD_A6 B16 2838 -dasm_FD_AE B4D 2893 -dasm_FD_B6 B31 2865 -dasm_FD_BE B68 2920 -dasm_FD_E1 CBE 3262 -dasm_FD_E3 A48 2632 -dasm_FD_E5 CA8 3240 -dasm_FD_F9 C90 3216 -dasm_FF 97F 2431 -dasm_UU CC6 3270 -dasm_UW CCA 3274 -dasm__AND B05 2821 -dasm__CP B59 2905 -dasm__DEC B90 2960 -dasm__ED_47 9D7 2519 -dasm__ED_4F 9DF 2527 -dasm__ED_57 9C7 2503 -dasm__ED_5F 9CF 2511 -dasm__INC B73 2931 -dasm__LD 9C3 2499 -dasm__OR B22 2850 -dasm__SBC AE1 2785 -dasm__SUB AC4 2756 -dasm__XOR B3C 2876 -dasm_opcode_table 4C4 1220 -dasm_print16hex_addr 2F1 753 -dasm_print8hex 309 777 -dasm_printFlags_table CCF 3279 -dasm_printRegister8_table CDF 3295 -dasm_printRegister8_table_HL CFF 3327 -dasm_printRegisterIX_table CE7 3303 -dasm_printRegisterIY_table CEF 3311 -dasm_printRegisterSP_table CF7 3319 -disassemble 1B5 437 -disassemble_continue 29B 667 -disassemble_err 28B 651 -disassemble_next 1B9 441 -disassemble_print_opcode_params_end 288 648 -disassemble_print_opcode_params_loop 234 564 -disassemble_print_opcode_raw 1F6 502 -disassemble_print_opcode_raw_fill 20A 522 -disassemble_table_first_match 2CD 717 -disassemble_table_found 2E7 743 -disassemble_table_notfound 2EB 747 -disassemble_table_seek 2A9 681 -disassemble_table_seek_loop 2AD 685 -dump_pretty 16C9 5833 -dump_pretty_ascii 16F3 5875 -dump_pretty_ascii_cont 1711 5905 -dump_pretty_ascii_loop 16FB 5883 -dump_pretty_ascii_none 170C 5900 -dump_pretty_col 16E6 5862 -dump_pretty_end 1723 5923 -dump_pretty_nextrow 1717 5911 -dump_pretty_row 16D1 5841 -ide_printerror E04 3588 -ide_readsector_256 D83 3459 -ide_readsector_256_done DB2 3506 -ide_readsector_256_waitloop D85 3461 -ide_readsector_512_inv DB3 3507 -ide_readsector_512_inv_waitloop DB8 3512 -ide_readsector_timeout DEE 3566 -ide_regread_8 D65 3429 -ide_regwrite_8 D49 3401 -ide_reset D3C 3388 -ide_writesector_256 E03 3587 -ideif_get_drv_pointer 1497 5271 -ideif_init_all 14AB 5291 -ideif_init_devtable 12B5 4789 -ideif_init_drive 13C8 5064 -ideif_prnt_devtable 12D3 4819 -iic_init 15DD 5597 -iic_read_ack 161C 5660 -iic_receive_buffer 15AE 5550 -iic_receive_buffer_done 15D1 5585 -iic_receive_buffer_err 15D7 5591 -iic_receive_buffer_loop 15BF 5567 -iic_receive_byte 16A2 5794 -iic_receive_byte_loop 16AF 5807 -iic_send_ack 1642 5698 -iic_send_buffer 1584 5508 -iic_send_buffer_done 15A2 5538 -iic_send_buffer_err 15A8 5544 -iic_send_buffer_loop 1594 5524 -iic_send_byte 167C 5756 -iic_send_byte_loop 1688 5768 -iic_send_ebit 15FB 5627 -iic_send_nack 165F 5727 -iic_send_sbit 15E6 5606 +_COMMAND_PROCESS_FOUND 19C5 6597 +_OP_CALL 1A47 6727 +_OP_IIC_ACK_ERR 1B55 6997 +_OP_IIC_ACK_ERR_str 1B5C 7004 +_OP_IIC_IN_LOOP 1BA2 7074 +_OP_IIC_IN_LOOP_TEXT 1BAF 7087 +_OP_IIC_OUT_LOOP 1B26 6950 +_OP_IIC_OUT_SEND 1B42 6978 +_OP_RTIME_NN 1BC3 7107 +_OP_RTIME_RD_CMD 1C7B 7291 +_OP_SELDSK_INVALID 1DE4 7652 +_OP_SELDSK_INVALID_STR 1DFC 7676 +_OP_SET_LOOP 1A90 6800 +_OP_STIME_INVALID 1D1E 7454 +_OP_STIME_PROMPT 1D35 7477 +_OP_STIME_PROMPT_ERR 1D4D 7501 +_OP_STIME_STR_DAY 1C7C 7292 +_OP_STIME_STR_HOUR 1CCD 7373 +_OP_STIME_STR_MIN 1CE8 7400 +_OP_STIME_STR_MON 1C97 7319 +_OP_STIME_STR_SEC 1D03 7427 +_OP_STIME_STR_YEAR 1CB2 7346 +_POST_CHECK_APU_FAILED 1E6D 7789 +_POST_CHECK_IDE_FAILED 1E9F 7839 +_POST_CHECK_PIO_FAILED 1E42 7746 +_POST_TEST_RTC_INVALID 1EE0 7904 +_POST_TEST_RTC_NOTFOUND 1ED9 7897 +_STR_NOT_FOUND 19E8 6632 +_STR_NOT_IMPLEMENTED 19D4 6612 +_STR_SYNTAX 19FC 6652 +_beep_pause_l1 DC2 3522 +_compare_filename_loop 2313 8979 +_compare_filename_nomatch 2321 8993 +_fat_cd_navigate 24C4 9412 +_fat_cd_navigate_end 250A 9482 +_fat_cd_navigate_errfile 2532 9522 +_fat_cd_navigate_errfile_str 2564 9572 +_fat_cd_navigate_error 251C 9500 +_fat_cd_navigate_error_str 253A 9530 +_fat_cd_navigate_findsec 24C9 9417 +_fat_cd_navigate_findsec_skipslash 24F5 9461 +_fat_cd_navigate_goback_fl 2480 9344 +_fat_cd_navigate_inerror 252A 9514 +_fat_cd_navigate_inerrorS 2524 9508 +_fat_cd_navigate_inerrore 252B 9515 +_fat_cd_navigate_inputerr_str 2551 9553 +_fat_cd_navigate_l2 24FB 9467 +_fat_exec_notexec 262B 9771 +_fat_exec_notfound 2612 9746 +_fat_exec_read_done 25FA 9722 +_fat_exec_readloop1 25DC 9692 +_fat_get_root_table_invalid 210B 8459 +_fat_getfatsec_notroot 214A 8522 +_fat_increment_32 2299 8857 +_fat_lfs_loop 2211 8721 +_fat_lfs_loop_compare_end 224B 8779 +_fat_lfs_loop_compare_match 224F 8783 +_fat_lfs_loop_compare_next_sector 2223 8739 +_fat_math_add32 22AD 8877 +_fat_math_mul32 22DE 8926 +_fat_math_mul32_l 22E5 8933 +_fat_math_mul32_noadd 22F2 8946 +_fat_math_sector_add_16 2285 8837 +_fat_print_directory_dir 2401 9217 +_fat_print_directory_loop 2394 9108 +_fat_print_directory_loop_break 245E 9310 +_fat_print_directory_loop_file 23B0 9136 +_fat_print_directory_loop_next 242C 9260 +_fat_print_directory_loop_next_sector 2437 9271 +_format_filename_fat16_clean 232A 9002 +_format_filename_fat16_loop 2331 9009 +_format_filename_fat16_loop_copy 2344 9028 +_format_filename_fat16_loop_skip_8 233B 9019 +_ideif_drv_sel_fail 15AB 5547 +_ideif_drv_sel_fstr0 1668 5736 +_ideif_drv_sel_pstr 165F 5727 +_ideif_drv_sel_sstr0 1676 5750 +_ideif_drv_sel_syn 1683 5763 +_ideif_init_drive_found 146E 5230 +_ideif_init_drive_loop 1456 5206 +_ideif_init_drive_nodrv 1469 5225 +_ideif_init_drive_prt_fnd 14D9 5337 +_ideif_init_drive_prt_l1 14C7 5319 +_ideif_init_drive_prt_ln 14D1 5329 +_ideif_prnt_devtable_hdr 15EB 5611 +_ideif_prnt_devtable_l1 1366 4966 +_ideif_prnt_devtable_l1_e2 142C 5164 +_ideif_prnt_devtable_l1_es 13AB 5035 +_ideif_prnt_devtable_l1_ms 1429 5161 +_ideif_prnt_devtable_l1_nxt 1373 4979 +_ideif_prnt_devtable_l1_s00 1399 5017 +_ideif_prnt_devtable_l1_s01 139E 5022 +_ideif_prnt_devtable_l1_s02 13A3 5027 +_ideif_prnt_devtable_l1_sFF 13A8 5032 +_ideif_prnt_devtable_l1_sel 1371 4977 +_ideif_prnt_devtable_master 164F 5711 +_ideif_prnt_devtable_s00 1623 5667 +_ideif_prnt_devtable_s01 162E 5678 +_ideif_prnt_devtable_s02 1639 5689 +_ideif_prnt_devtable_sFF 1644 5700 +_ideif_prnt_devtable_slave 1657 5719 +_read_bcd_invalid 14E 334 +_shift4 1DCC 7628 +beep DA9 3497 +beep_loop DAB 3499 +beep_pause DC1 3521 +compare_filename 230F 8975 +dasm_00 9AE 2478 +dasm_01 C9A 3226 +dasm_02 A34 2612 +dasm_03 C6C 3180 +dasm_08 AB1 2737 +dasm_09 C3F 3135 +dasm_0A A16 2582 +dasm_0B C83 3203 +dasm_10 9F6 2550 +dasm_12 A3F 2623 +dasm_18 9B9 2489 +dasm_1A A20 2592 +dasm_20 9D3 2515 +dasm_22 CE0 3296 +dasm_27 A79 2681 +dasm_28 9CC 2508 +dasm_2A CB1 3249 +dasm_2F A7D 2685 +dasm_30 9C4 2500 +dasm_32 A4A 2634 +dasm_37 A89 2697 +dasm_38 9BD 2493 +dasm_3A A2A 2602 +dasm_3F A85 2693 +dasm_76 A8D 2701 +dasm_80C6 B0A 2826 +dasm_BE AA7 2727 +dasm_C3 9B2 2482 +dasm_C88E B30 2864 +dasm_C9 A02 2562 +dasm_CD 9FC 2556 +dasm_D9 ABE 2750 +dasm_DD 9E4 2532 +dasm_DD_01 CA1 3233 +dasm_DD_09 C5A 3162 +dasm_DD_22 CF6 3318 +dasm_DD_23 C71 3185 +dasm_DD_2A CC8 3272 +dasm_DD_2B C88 3208 +dasm_DD_34 C0A 3082 +dasm_DD_35 C27 3111 +dasm_DD_86 B12 2834 +dasm_DD_8E B38 2872 +dasm_DD_96 B5B 2907 +dasm_DD_9E B7B 2939 +dasm_DD_A6 B9C 2972 +dasm_DD_AE BD3 3027 +dasm_DD_B6 BB8 3000 +dasm_DD_BE BEF 3055 +dasm_DD_E1 D48 3400 +dasm_DD_E3 ACE 2766 +dasm_DD_E5 D32 3378 +dasm_DD_F9 D18 3352 +dasm_E1 D42 3394 +dasm_E3 AC2 2754 +dasm_E5 D2C 3372 +dasm_E9 9DB 2523 +dasm_ED_42 C51 3153 +dasm_ED_43 CEC 3308 +dasm_ED_44 A81 2689 +dasm_ED_45 A0C 2572 +dasm_ED_46 A98 2712 +dasm_ED_4A C48 3144 +dasm_ED_4B CBD 3261 +dasm_ED_4D A07 2567 +dasm_ED_56 A9D 2717 +dasm_ED_5E AA2 2722 +dasm_ED_A0 AE6 2790 +dasm_ED_A1 AF8 2808 +dasm_ED_A8 AEF 2799 +dasm_ED_A9 B01 2817 +dasm_ED_B0 AEA 2794 +dasm_ED_B1 AFC 2812 +dasm_ED_B8 AF3 2803 +dasm_ED_B9 B05 2821 +dasm_F3 A92 2706 +dasm_F9 D0E 3342 +dasm_FB A95 2709 +dasm_FD 9ED 2541 +dasm_FD_01 CA9 3241 +dasm_FD_09 C63 3171 +dasm_FD_22 D02 3330 +dasm_FD_23 C7A 3194 +dasm_FD_2A CD4 3284 +dasm_FD_2B C91 3217 +dasm_FD_34 C16 3094 +dasm_FD_35 C33 3123 +dasm_FD_86 B21 2849 +dasm_FD_8E B47 2887 +dasm_FD_96 B67 2919 +dasm_FD_9E B89 2953 +dasm_FD_A6 BA8 2984 +dasm_FD_AE BDF 3039 +dasm_FD_B6 BC3 3011 +dasm_FD_BE BFA 3066 +dasm_FD_E1 D50 3408 +dasm_FD_E3 ADA 2778 +dasm_FD_E5 D3A 3386 +dasm_FD_F9 D22 3362 +dasm_FF A11 2577 +dasm_UU D58 3416 +dasm_UW D5C 3420 +dasm__AND B97 2967 +dasm__CP BEB 3051 +dasm__DEC C22 3106 +dasm__ED_47 A69 2665 +dasm__ED_4F A71 2673 +dasm__ED_57 A59 2649 +dasm__ED_5F A61 2657 +dasm__INC C05 3077 +dasm__LD A55 2645 +dasm__OR BB4 2996 +dasm__SBC B73 2931 +dasm__SUB B56 2902 +dasm__XOR BCE 3022 +dasm_opcode_table 556 1366 +dasm_print16hex_addr 383 899 +dasm_print8hex 39B 923 +dasm_printFlags_table D61 3425 +dasm_printRegister8_table D71 3441 +dasm_printRegister8_table_HL D91 3473 +dasm_printRegisterIX_table D79 3449 +dasm_printRegisterIY_table D81 3457 +dasm_printRegisterSP_table D89 3465 +disassemble 247 583 +disassemble_continue 32D 813 +disassemble_err 31D 797 +disassemble_next 24B 587 +disassemble_print_opcode_params_end 31A 794 +disassemble_print_opcode_params_loop 2C6 710 +disassemble_print_opcode_raw 288 648 +disassemble_print_opcode_raw_fill 29C 668 +disassemble_table_first_match 35F 863 +disassemble_table_found 379 889 +disassemble_table_notfound 37D 893 +disassemble_table_seek 33B 827 +disassemble_table_seek_loop 33F 831 +dump_pretty 17E1 6113 +dump_pretty_ascii 180B 6155 +dump_pretty_ascii_cont 1829 6185 +dump_pretty_ascii_loop 1813 6163 +dump_pretty_ascii_none 1824 6180 +dump_pretty_col 17FE 6142 +dump_pretty_end 183B 6203 +dump_pretty_nextrow 182F 6191 +dump_pretty_row 17E9 6121 +endPrint 19F 415 +fat_cd_single 2460 9312 +fat_copy_lba_pointer 2306 8966 +fat_exec 257B 9595 +fat_get_root_table 203E 8254 +fat_getfatsec 2133 8499 +fat_openfile 21E4 8676 +fat_openfile_noprepare 21EC 8684 +fat_print_directory 234B 9035 +fat_readfilesec 21B9 8633 +fat_reset_pointer 22F7 8951 +format_filename_fat16 2325 8997 +ide_printerror E89 3721 +ide_readsector_256 E15 3605 +ide_readsector_256_waitloop E17 3607 +ide_readsector_512_inv E3E 3646 +ide_readsector_512_inv_waitloop E43 3651 +ide_readsector_timeout E73 3699 +ide_regread_8 DF7 3575 +ide_regwrite_8 DDB 3547 +ide_reset DCE 3534 +ide_writesector_256 E88 3720 +ideif_drv_sel 1573 5491 +ideif_get_drv_pointer 151C 5404 +ideif_init_all 1530 5424 +ideif_init_devtable 133A 4922 +ideif_init_drive 144D 5197 +ideif_prnt_devtable 1358 4952 +iic_init 16F5 5877 +iic_read_ack 1734 5940 +iic_receive_buffer 16C6 5830 +iic_receive_buffer_done 16E9 5865 +iic_receive_buffer_err 16EF 5871 +iic_receive_buffer_loop 16D7 5847 +iic_receive_byte 17BA 6074 +iic_receive_byte_loop 17C7 6087 +iic_send_ack 175A 5978 +iic_send_buffer 169C 5788 +iic_send_buffer_done 16BA 5818 +iic_send_buffer_err 16C0 5824 +iic_send_buffer_loop 16AC 5804 +iic_send_byte 1794 6036 +iic_send_byte_loop 17A0 6048 +iic_send_ebit 1713 5907 +iic_send_nack 1777 6007 +iic_send_sbit 16FE 5886 mon_var_template 44 68 -mon_var_template_end 370 880 -param_01 317 791 -param_02 33E 830 -param_03 35B 859 -param_03_done 393 915 -param_03_neg 37C 892 -param_04 397 919 -param_04_i 3A7 935 -param_05 3AD 941 -param_06 3BA 954 -param_07 3D4 980 -param_08 3E1 993 -param_09 3F6 1014 -param_09_0A 3FC 1020 -param_0A 3ED 1005 -param_10 40B 1035 -param_11 41B 1051 -param_11_12 42A 1066 -param_11_12_all 44A 1098 -param_11_12_def 43D 1085 -param_11_12_ix 442 1090 -param_11_12_iy 447 1095 -param_12 423 1059 -param_13 45B 1115 -param_80 47A 1146 -param_80_seek 481 1153 -param_81 471 1137 -param_comma 4B5 1205 -param_printRegister 490 1168 -param_printRegisterA 4AE 1198 -param_printRegisterHL 4A6 1190 -print_a_hex 107 263 -print_bcd 119 281 -print_char D7 215 -print_clear EA 234 -print_newLine F1 241 -print_str DF 223 -print_str_end E9 233 -print_str_fixed 1763 5987 -print_wait_out FC 252 -read_bcd 131 305 -read_char 11F 287 -read_lba_sector 14BE 5310 -str_dev_done 1508 5384 -str_dev_waitready 14F0 5360 -str_error_start E37 3639 -str_error_start1 E54 3668 -str_error_start2 E5D 3677 -str_error_time E66 3686 -str_post_apu 1DFC 7676 -str_post_ide_30 1DAB 7595 -str_post_ide_40 1DC6 7622 -str_post_nd 1E32 7730 -str_post_ok 1E6A 7786 -str_post_pio 1DE1 7649 -str_post_rtc 1E17 7703 -str_post_rtc_iv 1E40 7744 +mon_var_template_end 40F 1039 +nxtILC 194 404 +param_01 3A9 937 +param_02 3D0 976 +param_03 3ED 1005 +param_03_done 425 1061 +param_03_neg 40E 1038 +param_04 429 1065 +param_04_i 439 1081 +param_05 43F 1087 +param_06 44C 1100 +param_07 466 1126 +param_08 473 1139 +param_09 488 1160 +param_09_0A 48E 1166 +param_0A 47F 1151 +param_10 49D 1181 +param_11 4AD 1197 +param_11_12 4BC 1212 +param_11_12_all 4DC 1244 +param_11_12_def 4CF 1231 +param_11_12_ix 4D4 1236 +param_11_12_iy 4D9 1241 +param_12 4B5 1205 +param_13 4ED 1261 +param_80 50C 1292 +param_80_seek 513 1299 +param_81 503 1283 +param_comma 547 1351 +param_printRegister 522 1314 +param_printRegisterA 540 1344 +param_printRegisterHL 538 1336 +print_16_hex 16A 362 +print_32_hex 151 337 +print_a_hex 10E 270 +print_bcd 120 288 +print_char DE 222 +print_clear F1 241 +print_newLine F8 248 +print_reg 1A4 420 +print_str E6 230 +print_str_end F0 240 +print_str_fixed 187B 6267 +print_wait_out 103 259 +read_bcd 138 312 +read_char 126 294 +read_lba_sector 1543 5443 +str_dev_done 15E3 5603 +str_dev_waitready 15CB 5579 +str_error_start EBC 3772 +str_error_start1 ED9 3801 +str_error_start2 EE2 3810 +str_error_time EEB 3819 +str_post_apu 1F38 7992 +str_post_ide_30 1EE7 7911 +str_post_ide_40 1F02 7938 +str_post_nd 1F6E 8046 +str_post_ok 1FA6 8102 +str_post_pio 1F1D 7965 +str_post_rtc 1F53 8019 +str_post_rtc_iv 1F7C 8060 var_apu_present 400A 16394 -var_buffer 402B 16427 var_buffer_len 4000 16384 var_bytes_count=411A 16666 var_curserchar 4006 16390 @@ -4403,7 +5706,9 @@ var_curseron 4005 16389 var_curserstate 4004 16388 var_curserx 4002 16386 var_cursery 4003 16387 -var_idebuffer 402C 16428 +var_dir 402B 16427 +var_idebuffer 40CB 16587 +var_input 407B 16507 var_last_char 4001 16385 var_opcode =4114 16660 var_opcode_length=4116 16662 diff --git a/OperatingSystem/monitor_v2/zout/symbols.s b/OperatingSystem/monitor_v2/zout/symbols.s index 4afd540..d4c7f58 100644 --- a/OperatingSystem/monitor_v2/zout/symbols.s +++ b/OperatingSystem/monitor_v2/zout/symbols.s @@ -2,27 +2,27 @@ ;Do not make any changes here! ADDR_RTC equ 0xD0 -A_RTS_OFF equ 0x152 -A_RTS_ON equ 0x15B +A_RTS_OFF equ 0x17F +A_RTS_ON equ 0x188 BOOT_PHASE0 equ 0x50 BOOT_PHASE1 equ 0x6E BOOT_PHASE1_LOOP equ 0x77 -BOOT_PHASE2 equ 0x82 -COMMAND equ 0x17EB -COMMAND_BACKSPACE equ 0x1826 -COMMAND_LUT equ 0x176B -COMMAND_PROCESS equ 0x184C -COMMAND_PROCESS_FOUND equ 0x1887 -COMMAND_PROCESS_LOOP equ 0x184F -COMMAND_PROCESS_LOOP_STR1 equ 0x1858 -COMMAND_PROCESS_LOOP_STR2 equ 0x186E -COMMAND_PROCESS_NEXT_ENTRY equ 0x1873 -COMMAND_PROCESS_NEXT_ENTRYI equ 0x1872 -COMMAND_PROCESS_NOT_FOUND equ 0x187E -COMMAND_READ equ 0x17F7 -CONSOLE_INIT equ 0x9E -CONSOLE_INIT_CTC equ 0x9E -CONSOLE_INIT_SIO equ 0xA6 +BOOT_PHASE2 equ 0x89 +COMMAND equ 0x1915 +COMMAND_BACKSPACE equ 0x1956 +COMMAND_LUT equ 0x1883 +COMMAND_PROCESS equ 0x197C +COMMAND_PROCESS_FOUND equ 0x19B7 +COMMAND_PROCESS_LOOP equ 0x197F +COMMAND_PROCESS_LOOP_STR1 equ 0x1988 +COMMAND_PROCESS_LOOP_STR2 equ 0x199E +COMMAND_PROCESS_NEXT_ENTRY equ 0x19A3 +COMMAND_PROCESS_NEXT_ENTRYI equ 0x19A2 +COMMAND_PROCESS_NOT_FOUND equ 0x19AE +COMMAND_READ equ 0x1927 +CONSOLE_INIT equ 0xA5 +CONSOLE_INIT_CTC equ 0xA5 +CONSOLE_INIT_SIO equ 0xAD CS_APU_CTRL equ 0xF9 CS_APU_DATA equ 0xF8 CS_BANK equ 0x00 @@ -43,18 +43,18 @@ CS_SIO_A_C equ 0x09 CS_SIO_A_D equ 0x08 CS_SIO_B_C equ 0x0B CS_SIO_B_D equ 0x0A -DHEX_TO_BYTE equ 0x164 -DHEX_TO_BYTE_FAILED equ 0x180 -ERR_SYNTAX equ 0x189D -EXEC_RST_08 equ 0xD04 -EXEC_RST_10 equ 0xD08 -EXEC_RST_18 equ 0xD14 -HEX_TO_BIN equ 0x184 -HEX_TO_BIN_2 equ 0x192 -HEX_TO_INVALID_2 equ 0x199 +DHEX_TO_BYTE equ 0x1F6 +DHEX_TO_BYTE_FAILED equ 0x212 +ERR_SYNTAX equ 0x19CD +EXEC_RST_08 equ 0xD96 +EXEC_RST_10 equ 0xD9A +EXEC_RST_18 equ 0xDA6 +HEX_TO_BIN equ 0x216 +HEX_TO_BIN_2 equ 0x224 +HEX_TO_INVALID_2 equ 0x22B IDE_CMD_IDENT equ 0xEC IDE_CMD_READSEC equ 0x20 -IDE_DEV_TABLE equ 0x1275 +IDE_DEV_TABLE equ 0x12FA IDE_RD equ 0x40 IDE_REG_ALTSTS equ 0x16 IDE_REG_CMDSTS equ 0x0F @@ -75,7 +75,6 @@ IDE_WR equ 0x20 IIC_CLK equ 0x01 IIC_DATA equ 0x02 INT_VEC equ 0x1B -IN_BUFFER equ 0x402B IO_AY0_ADDR equ 0x40 IO_AY0_DATA equ 0x41 IO_AY1_ADDR equ 0x42 @@ -97,42 +96,67 @@ IO_RTC_SEC1 equ 0x21 IO_RTC_WEEK equ 0x2C IO_RTC_YEAR1 equ 0x2B IO_RTC_YERR0 equ 0x2A -MEM_IDE_BUFFER equ 0x4117 -MEM_IDE_DEVICE equ 0x402C -MEM_IDE_DEV_TABLE equ 0x4036 -MEM_IDE_FSBUFFER equ 0x4317 -MEM_IDE_PARTITION equ 0x402E -MEM_IDE_POINTER equ 0x4032 -MEM_IDE_SELECTED equ 0x4076 -MEM_IDE_STATUS equ 0x402D -MEM_IDE_STRING_0 equ 0x4077 -MEM_IDE_STRING_1 equ 0x409F -MEM_IDE_STRING_2 equ 0x40C7 -MEM_IDE_STRING_3 equ 0x40EF -MSG_CLEAR equ 0x14A -NOT_IMPLEMENTED equ 0x1896 -OP_CALL equ 0x18F8 -OP_CLR equ 0x1A8C -OP_DASM equ 0x1979 -OP_DUMP equ 0x1918 -OP_EXEC equ 0x18DF -OP_IIC_IN equ 0x1A40 -OP_IIC_OUT equ 0x19E0 -OP_IO_IN equ 0x19A9 -OP_IO_OUT equ 0x19BF -OP_LSDSK equ 0x1CA1 -OP_RTIME equ 0x1A90 -OP_SELDSK equ 0x1CA5 -OP_SET equ 0x1948 -OP_STIME equ 0x1C28 -POST_CHECK_APU equ 0x1D12 -POST_CHECK_IDE_30 equ 0x1D3D -POST_CHECK_IDE_40 equ 0x1D50 -POST_CHECK_PIO equ 0x1CED -POST_START equ 0x1CDD -POST_TEST_RTC equ 0x1D6A +MEM_FAT_AMOUNT equ 0x43B8 +MEM_FAT_CLUSTERLEN equ 0x43BB +MEM_FAT_COUNT1 equ 0x43BC +MEM_FAT_CURDIR equ 0x43DF +MEM_FAT_CURRDIR equ 0x443F +MEM_FAT_DATASTART equ 0x43C1 +MEM_FAT_DIRSEC equ 0x43CD +MEM_FAT_EXEC_COUNT equ 0x4445 +MEM_FAT_EXEC_CURR equ 0x4443 +MEM_FAT_EXEC_START equ 0x4447 +MEM_FAT_FILEREMAIN equ 0x43C9 +MEM_FAT_OF0_ATTRIBUTE equ 0x442F +MEM_FAT_OF0_CCLUST equ 0x4431 +MEM_FAT_OF0_DATREM equ 0x443B +MEM_FAT_OF0_DATSEC equ 0x4437 +MEM_FAT_OF0_FATSEC equ 0x4433 +MEM_FAT_RESERVED equ 0x43B6 +MEM_FAT_ROOTSTART equ 0x43C5 +MEM_FAT_SECTORS equ 0x43B9 +MEM_FAT_TMPFNAME equ 0x43CF +MEM_FAT_TMPPOINTER equ 0x43BD +MEM_IDE_BUFFER equ 0x41B6 +MEM_IDE_DEVICE equ 0x40CB +MEM_IDE_DEV_TABLE equ 0x40D5 +MEM_IDE_FSBUFFER equ 0x43B6 +MEM_IDE_PARTITION equ 0x40CD +MEM_IDE_POINTER equ 0x40D1 +MEM_IDE_SELECTED equ 0x4115 +MEM_IDE_STATUS equ 0x40CC +MEM_IDE_STRING_0 equ 0x4116 +MEM_IDE_STRING_1 equ 0x413E +MEM_IDE_STRING_2 equ 0x4166 +MEM_IDE_STRING_3 equ 0x418E +MSG_CLEAR equ 0x177 +NOT_IMPLEMENTED equ 0x19C6 +OP_CALL equ 0x1A28 +OP_CD equ 0x1DF8 +OP_CLR equ 0x1BBC +OP_DASM equ 0x1AA9 +OP_DIR equ 0x1DF4 +OP_DUMP equ 0x1A48 +OP_EXEC equ 0x1A0F +OP_FSEXEC equ 0x1E15 +OP_IIC_IN equ 0x1B70 +OP_IIC_OUT equ 0x1B10 +OP_IO_IN equ 0x1AD9 +OP_IO_OUT equ 0x1AEF +OP_LSDSK equ 0x1DD1 +OP_RTIME equ 0x1BC0 +OP_SELDSK equ 0x1DD5 +OP_SET equ 0x1A78 +OP_STIME equ 0x1D58 +POST_CHECK_APU equ 0x1E4E +POST_CHECK_IDE_30 equ 0x1E79 +POST_CHECK_IDE_40 equ 0x1E8C +POST_CHECK_PIO equ 0x1E29 +POST_START equ 0x1E19 +POST_TEST_RTC equ 0x1EA6 PRG_RAM_START equ 0x4110 PRG_RAM_TOP equ 0xFF00 +PRINTINLINE equ 0x191 PROG_MEM_START equ 0x4000 PROG_ROM_START equ 0x100 RST_00 equ 0x00 @@ -141,316 +165,379 @@ RST_10 equ 0x10 RST_18 equ 0x18 STACK_RAM_TOP equ 0xFFFF START_ROM equ 0x00 -STRCONV_BYTES_TO_HEX equ 0x19B -STRCONV_BYTES_TO_HEX_1 equ 0x1AA -STRCONV_BYTES_TO_HEX_2 equ 0x1B4 -STR_Banner_Start equ 0x1E6F -STR_PD_HEADER equ 0x1724 +STRCONV_BYTES_TO_HEX equ 0x22D +STRCONV_BYTES_TO_HEX_1 equ 0x23C +STRCONV_BYTES_TO_HEX_2 equ 0x246 +STR_Banner_Start equ 0x264F +STR_PD_HEADER equ 0x183C SYS_BUF_START equ 0x4010 SYS_RAM_START equ 0x4000 VAR_CONSOLE_BAUD equ 0x18 VAR_CONSOLE_CONF equ 0x0F VDP_MEM equ 0x80 VDP_REG equ 0x81 -_COMMAND_PROCESS_FOUND equ 0x1895 -_OP_CALL equ 0x1917 -_OP_IIC_ACK_ERR equ 0x1A25 -_OP_IIC_ACK_ERR_str equ 0x1A2C -_OP_IIC_IN_LOOP equ 0x1A72 -_OP_IIC_IN_LOOP_TEXT equ 0x1A7F -_OP_IIC_OUT_LOOP equ 0x19F6 -_OP_IIC_OUT_SEND equ 0x1A12 -_OP_RTIME_NN equ 0x1A93 -_OP_RTIME_RD_CMD equ 0x1B4B -_OP_SELDSK_INVALID equ 0x1CB4 -_OP_SELDSK_INVALID_STR equ 0x1CC4 -_OP_SET_LOOP equ 0x1960 -_OP_STIME_INVALID equ 0x1BEE -_OP_STIME_PROMPT equ 0x1C05 -_OP_STIME_PROMPT_ERR equ 0x1C1D -_OP_STIME_STR_DAY equ 0x1B4C -_OP_STIME_STR_HOUR equ 0x1B9D -_OP_STIME_STR_MIN equ 0x1BB8 -_OP_STIME_STR_MON equ 0x1B67 -_OP_STIME_STR_SEC equ 0x1BD3 -_OP_STIME_STR_YEAR equ 0x1B82 -_POST_CHECK_APU_FAILED equ 0x1D31 -_POST_CHECK_IDE_FAILED equ 0x1D63 -_POST_CHECK_PIO_FAILED equ 0x1D06 -_POST_TEST_RTC_INVALID equ 0x1DA4 -_POST_TEST_RTC_NOTFOUND equ 0x1D9D -_STR_NOT_FOUND equ 0x18B8 -_STR_NOT_IMPLEMENTED equ 0x18A4 -_STR_SYNTAX equ 0x18CC -_beep_pause_l1 equ 0xD30 -_ideif_init_drive_found equ 0x13E9 -_ideif_init_drive_loop equ 0x13D1 -_ideif_init_drive_nodrv equ 0x13E4 -_ideif_init_drive_prt_fnd equ 0x1454 -_ideif_init_drive_prt_l1 equ 0x1442 -_ideif_init_drive_prt_ln equ 0x144C -_ideif_prnt_devtable_hdr equ 0x1510 -_ideif_prnt_devtable_l1 equ 0x12E1 -_ideif_prnt_devtable_l1_e2 equ 0x13A7 -_ideif_prnt_devtable_l1_es equ 0x1326 -_ideif_prnt_devtable_l1_ms equ 0x13A4 -_ideif_prnt_devtable_l1_nxt equ 0x12EE -_ideif_prnt_devtable_l1_s00 equ 0x1314 -_ideif_prnt_devtable_l1_s01 equ 0x1319 -_ideif_prnt_devtable_l1_s02 equ 0x131E -_ideif_prnt_devtable_l1_sFF equ 0x1323 -_ideif_prnt_devtable_l1_sel equ 0x12EC -_ideif_prnt_devtable_master equ 0x1574 -_ideif_prnt_devtable_s00 equ 0x1548 -_ideif_prnt_devtable_s01 equ 0x1553 -_ideif_prnt_devtable_s02 equ 0x155E -_ideif_prnt_devtable_sFF equ 0x1569 -_ideif_prnt_devtable_slave equ 0x157C -_read_bcd_invalid equ 0x147 -_shift4 equ 0x1C9C -beep equ 0xD17 -beep_loop equ 0xD19 -beep_pause equ 0xD2F -dasm_00 equ 0x91C -dasm_01 equ 0xC08 -dasm_02 equ 0x9A2 -dasm_03 equ 0xBDA -dasm_08 equ 0xA1F -dasm_09 equ 0xBAD -dasm_0A equ 0x984 -dasm_0B equ 0xBF1 -dasm_10 equ 0x964 -dasm_12 equ 0x9AD -dasm_18 equ 0x927 -dasm_1A equ 0x98E -dasm_20 equ 0x941 -dasm_22 equ 0xC4E -dasm_27 equ 0x9E7 -dasm_28 equ 0x93A -dasm_2A equ 0xC1F -dasm_2F equ 0x9EB -dasm_30 equ 0x932 -dasm_32 equ 0x9B8 -dasm_37 equ 0x9F7 -dasm_38 equ 0x92B -dasm_3A equ 0x998 -dasm_3F equ 0x9F3 -dasm_76 equ 0x9FB -dasm_80C6 equ 0xA78 -dasm_BE equ 0xA15 -dasm_C3 equ 0x920 -dasm_C88E equ 0xA9E -dasm_C9 equ 0x970 -dasm_CD equ 0x96A -dasm_D9 equ 0xA2C -dasm_DD equ 0x952 -dasm_DD_01 equ 0xC0F -dasm_DD_09 equ 0xBC8 -dasm_DD_22 equ 0xC64 -dasm_DD_23 equ 0xBDF -dasm_DD_2A equ 0xC36 -dasm_DD_2B equ 0xBF6 -dasm_DD_34 equ 0xB78 -dasm_DD_35 equ 0xB95 -dasm_DD_86 equ 0xA80 -dasm_DD_8E equ 0xAA6 -dasm_DD_96 equ 0xAC9 -dasm_DD_9E equ 0xAE9 -dasm_DD_A6 equ 0xB0A -dasm_DD_AE equ 0xB41 -dasm_DD_B6 equ 0xB26 -dasm_DD_BE equ 0xB5D -dasm_DD_E1 equ 0xCB6 -dasm_DD_E3 equ 0xA3C -dasm_DD_E5 equ 0xCA0 -dasm_DD_F9 equ 0xC86 -dasm_E1 equ 0xCB0 -dasm_E3 equ 0xA30 -dasm_E5 equ 0xC9A -dasm_E9 equ 0x949 -dasm_ED_42 equ 0xBBF -dasm_ED_43 equ 0xC5A -dasm_ED_44 equ 0x9EF -dasm_ED_45 equ 0x97A -dasm_ED_46 equ 0xA06 -dasm_ED_4A equ 0xBB6 -dasm_ED_4B equ 0xC2B -dasm_ED_4D equ 0x975 -dasm_ED_56 equ 0xA0B -dasm_ED_5E equ 0xA10 -dasm_ED_A0 equ 0xA54 -dasm_ED_A1 equ 0xA66 -dasm_ED_A8 equ 0xA5D -dasm_ED_A9 equ 0xA6F -dasm_ED_B0 equ 0xA58 -dasm_ED_B1 equ 0xA6A -dasm_ED_B8 equ 0xA61 -dasm_ED_B9 equ 0xA73 -dasm_F3 equ 0xA00 -dasm_F9 equ 0xC7C -dasm_FB equ 0xA03 -dasm_FD equ 0x95B -dasm_FD_01 equ 0xC17 -dasm_FD_09 equ 0xBD1 -dasm_FD_22 equ 0xC70 -dasm_FD_23 equ 0xBE8 -dasm_FD_2A equ 0xC42 -dasm_FD_2B equ 0xBFF -dasm_FD_34 equ 0xB84 -dasm_FD_35 equ 0xBA1 -dasm_FD_86 equ 0xA8F -dasm_FD_8E equ 0xAB5 -dasm_FD_96 equ 0xAD5 -dasm_FD_9E equ 0xAF7 -dasm_FD_A6 equ 0xB16 -dasm_FD_AE equ 0xB4D -dasm_FD_B6 equ 0xB31 -dasm_FD_BE equ 0xB68 -dasm_FD_E1 equ 0xCBE -dasm_FD_E3 equ 0xA48 -dasm_FD_E5 equ 0xCA8 -dasm_FD_F9 equ 0xC90 -dasm_FF equ 0x97F -dasm_UU equ 0xCC6 -dasm_UW equ 0xCCA -dasm__AND equ 0xB05 -dasm__CP equ 0xB59 -dasm__DEC equ 0xB90 -dasm__ED_47 equ 0x9D7 -dasm__ED_4F equ 0x9DF -dasm__ED_57 equ 0x9C7 -dasm__ED_5F equ 0x9CF -dasm__INC equ 0xB73 -dasm__LD equ 0x9C3 -dasm__OR equ 0xB22 -dasm__SBC equ 0xAE1 -dasm__SUB equ 0xAC4 -dasm__XOR equ 0xB3C -dasm_opcode_table equ 0x4C4 -dasm_print16hex_addr equ 0x2F1 -dasm_print8hex equ 0x309 -dasm_printFlags_table equ 0xCCF -dasm_printRegister8_table equ 0xCDF -dasm_printRegister8_table_HL equ 0xCFF -dasm_printRegisterIX_table equ 0xCE7 -dasm_printRegisterIY_table equ 0xCEF -dasm_printRegisterSP_table equ 0xCF7 -disassemble equ 0x1B5 -disassemble_continue equ 0x29B -disassemble_err equ 0x28B -disassemble_next equ 0x1B9 -disassemble_print_opcode_params_end equ 0x288 -disassemble_print_opcode_params_loop equ 0x234 -disassemble_print_opcode_raw equ 0x1F6 -disassemble_print_opcode_raw_fill equ 0x20A -disassemble_table_first_match equ 0x2CD -disassemble_table_found equ 0x2E7 -disassemble_table_notfound equ 0x2EB -disassemble_table_seek equ 0x2A9 -disassemble_table_seek_loop equ 0x2AD -dump_pretty equ 0x16C9 -dump_pretty_ascii equ 0x16F3 -dump_pretty_ascii_cont equ 0x1711 -dump_pretty_ascii_loop equ 0x16FB -dump_pretty_ascii_none equ 0x170C -dump_pretty_col equ 0x16E6 -dump_pretty_end equ 0x1723 -dump_pretty_nextrow equ 0x1717 -dump_pretty_row equ 0x16D1 -ide_printerror equ 0xE04 -ide_readsector_256 equ 0xD83 -ide_readsector_256_done equ 0xDB2 -ide_readsector_256_waitloop equ 0xD85 -ide_readsector_512_inv equ 0xDB3 -ide_readsector_512_inv_waitloop equ 0xDB8 -ide_readsector_timeout equ 0xDEE -ide_regread_8 equ 0xD65 -ide_regwrite_8 equ 0xD49 -ide_reset equ 0xD3C -ide_writesector_256 equ 0xE03 -ideif_get_drv_pointer equ 0x1497 -ideif_init_all equ 0x14AB -ideif_init_devtable equ 0x12B5 -ideif_init_drive equ 0x13C8 -ideif_prnt_devtable equ 0x12D3 -iic_init equ 0x15DD -iic_read_ack equ 0x161C -iic_receive_buffer equ 0x15AE -iic_receive_buffer_done equ 0x15D1 -iic_receive_buffer_err equ 0x15D7 -iic_receive_buffer_loop equ 0x15BF -iic_receive_byte equ 0x16A2 -iic_receive_byte_loop equ 0x16AF -iic_send_ack equ 0x1642 -iic_send_buffer equ 0x1584 -iic_send_buffer_done equ 0x15A2 -iic_send_buffer_err equ 0x15A8 -iic_send_buffer_loop equ 0x1594 -iic_send_byte equ 0x167C -iic_send_byte_loop equ 0x1688 -iic_send_ebit equ 0x15FB -iic_send_nack equ 0x165F -iic_send_sbit equ 0x15E6 +_COMMAND_PROCESS_FOUND equ 0x19C5 +_OP_CALL equ 0x1A47 +_OP_IIC_ACK_ERR equ 0x1B55 +_OP_IIC_ACK_ERR_str equ 0x1B5C +_OP_IIC_IN_LOOP equ 0x1BA2 +_OP_IIC_IN_LOOP_TEXT equ 0x1BAF +_OP_IIC_OUT_LOOP equ 0x1B26 +_OP_IIC_OUT_SEND equ 0x1B42 +_OP_RTIME_NN equ 0x1BC3 +_OP_RTIME_RD_CMD equ 0x1C7B +_OP_SELDSK_INVALID equ 0x1DE4 +_OP_SELDSK_INVALID_STR equ 0x1DFC +_OP_SET_LOOP equ 0x1A90 +_OP_STIME_INVALID equ 0x1D1E +_OP_STIME_PROMPT equ 0x1D35 +_OP_STIME_PROMPT_ERR equ 0x1D4D +_OP_STIME_STR_DAY equ 0x1C7C +_OP_STIME_STR_HOUR equ 0x1CCD +_OP_STIME_STR_MIN equ 0x1CE8 +_OP_STIME_STR_MON equ 0x1C97 +_OP_STIME_STR_SEC equ 0x1D03 +_OP_STIME_STR_YEAR equ 0x1CB2 +_POST_CHECK_APU_FAILED equ 0x1E6D +_POST_CHECK_IDE_FAILED equ 0x1E9F +_POST_CHECK_PIO_FAILED equ 0x1E42 +_POST_TEST_RTC_INVALID equ 0x1EE0 +_POST_TEST_RTC_NOTFOUND equ 0x1ED9 +_STR_NOT_FOUND equ 0x19E8 +_STR_NOT_IMPLEMENTED equ 0x19D4 +_STR_SYNTAX equ 0x19FC +_beep_pause_l1 equ 0xDC2 +_compare_filename_loop equ 0x2313 +_compare_filename_nomatch equ 0x2321 +_fat_cd_navigate equ 0x24C4 +_fat_cd_navigate_end equ 0x250A +_fat_cd_navigate_errfile equ 0x2532 +_fat_cd_navigate_errfile_str equ 0x2564 +_fat_cd_navigate_error equ 0x251C +_fat_cd_navigate_error_str equ 0x253A +_fat_cd_navigate_findsec equ 0x24C9 +_fat_cd_navigate_findsec_skipslash equ 0x24F5 +_fat_cd_navigate_goback_fl equ 0x2480 +_fat_cd_navigate_inerror equ 0x252A +_fat_cd_navigate_inerrorS equ 0x2524 +_fat_cd_navigate_inerrore equ 0x252B +_fat_cd_navigate_inputerr_str equ 0x2551 +_fat_cd_navigate_l2 equ 0x24FB +_fat_exec_notexec equ 0x262B +_fat_exec_notfound equ 0x2612 +_fat_exec_read_done equ 0x25FA +_fat_exec_readloop1 equ 0x25DC +_fat_get_root_table_invalid equ 0x210B +_fat_getfatsec_notroot equ 0x214A +_fat_increment_32 equ 0x2299 +_fat_lfs_loop equ 0x2211 +_fat_lfs_loop_compare_end equ 0x224B +_fat_lfs_loop_compare_match equ 0x224F +_fat_lfs_loop_compare_next_sector equ 0x2223 +_fat_math_add32 equ 0x22AD +_fat_math_mul32 equ 0x22DE +_fat_math_mul32_l equ 0x22E5 +_fat_math_mul32_noadd equ 0x22F2 +_fat_math_sector_add_16 equ 0x2285 +_fat_print_directory_dir equ 0x2401 +_fat_print_directory_loop equ 0x2394 +_fat_print_directory_loop_break equ 0x245E +_fat_print_directory_loop_file equ 0x23B0 +_fat_print_directory_loop_next equ 0x242C +_fat_print_directory_loop_next_sector equ 0x2437 +_format_filename_fat16_clean equ 0x232A +_format_filename_fat16_loop equ 0x2331 +_format_filename_fat16_loop_copy equ 0x2344 +_format_filename_fat16_loop_skip_8 equ 0x233B +_ideif_drv_sel_fail equ 0x15AB +_ideif_drv_sel_fstr0 equ 0x1668 +_ideif_drv_sel_pstr equ 0x165F +_ideif_drv_sel_sstr0 equ 0x1676 +_ideif_drv_sel_syn equ 0x1683 +_ideif_init_drive_found equ 0x146E +_ideif_init_drive_loop equ 0x1456 +_ideif_init_drive_nodrv equ 0x1469 +_ideif_init_drive_prt_fnd equ 0x14D9 +_ideif_init_drive_prt_l1 equ 0x14C7 +_ideif_init_drive_prt_ln equ 0x14D1 +_ideif_prnt_devtable_hdr equ 0x15EB +_ideif_prnt_devtable_l1 equ 0x1366 +_ideif_prnt_devtable_l1_e2 equ 0x142C +_ideif_prnt_devtable_l1_es equ 0x13AB +_ideif_prnt_devtable_l1_ms equ 0x1429 +_ideif_prnt_devtable_l1_nxt equ 0x1373 +_ideif_prnt_devtable_l1_s00 equ 0x1399 +_ideif_prnt_devtable_l1_s01 equ 0x139E +_ideif_prnt_devtable_l1_s02 equ 0x13A3 +_ideif_prnt_devtable_l1_sFF equ 0x13A8 +_ideif_prnt_devtable_l1_sel equ 0x1371 +_ideif_prnt_devtable_master equ 0x164F +_ideif_prnt_devtable_s00 equ 0x1623 +_ideif_prnt_devtable_s01 equ 0x162E +_ideif_prnt_devtable_s02 equ 0x1639 +_ideif_prnt_devtable_sFF equ 0x1644 +_ideif_prnt_devtable_slave equ 0x1657 +_read_bcd_invalid equ 0x14E +_shift4 equ 0x1DCC +beep equ 0xDA9 +beep_loop equ 0xDAB +beep_pause equ 0xDC1 +compare_filename equ 0x230F +dasm_00 equ 0x9AE +dasm_01 equ 0xC9A +dasm_02 equ 0xA34 +dasm_03 equ 0xC6C +dasm_08 equ 0xAB1 +dasm_09 equ 0xC3F +dasm_0A equ 0xA16 +dasm_0B equ 0xC83 +dasm_10 equ 0x9F6 +dasm_12 equ 0xA3F +dasm_18 equ 0x9B9 +dasm_1A equ 0xA20 +dasm_20 equ 0x9D3 +dasm_22 equ 0xCE0 +dasm_27 equ 0xA79 +dasm_28 equ 0x9CC +dasm_2A equ 0xCB1 +dasm_2F equ 0xA7D +dasm_30 equ 0x9C4 +dasm_32 equ 0xA4A +dasm_37 equ 0xA89 +dasm_38 equ 0x9BD +dasm_3A equ 0xA2A +dasm_3F equ 0xA85 +dasm_76 equ 0xA8D +dasm_80C6 equ 0xB0A +dasm_BE equ 0xAA7 +dasm_C3 equ 0x9B2 +dasm_C88E equ 0xB30 +dasm_C9 equ 0xA02 +dasm_CD equ 0x9FC +dasm_D9 equ 0xABE +dasm_DD equ 0x9E4 +dasm_DD_01 equ 0xCA1 +dasm_DD_09 equ 0xC5A +dasm_DD_22 equ 0xCF6 +dasm_DD_23 equ 0xC71 +dasm_DD_2A equ 0xCC8 +dasm_DD_2B equ 0xC88 +dasm_DD_34 equ 0xC0A +dasm_DD_35 equ 0xC27 +dasm_DD_86 equ 0xB12 +dasm_DD_8E equ 0xB38 +dasm_DD_96 equ 0xB5B +dasm_DD_9E equ 0xB7B +dasm_DD_A6 equ 0xB9C +dasm_DD_AE equ 0xBD3 +dasm_DD_B6 equ 0xBB8 +dasm_DD_BE equ 0xBEF +dasm_DD_E1 equ 0xD48 +dasm_DD_E3 equ 0xACE +dasm_DD_E5 equ 0xD32 +dasm_DD_F9 equ 0xD18 +dasm_E1 equ 0xD42 +dasm_E3 equ 0xAC2 +dasm_E5 equ 0xD2C +dasm_E9 equ 0x9DB +dasm_ED_42 equ 0xC51 +dasm_ED_43 equ 0xCEC +dasm_ED_44 equ 0xA81 +dasm_ED_45 equ 0xA0C +dasm_ED_46 equ 0xA98 +dasm_ED_4A equ 0xC48 +dasm_ED_4B equ 0xCBD +dasm_ED_4D equ 0xA07 +dasm_ED_56 equ 0xA9D +dasm_ED_5E equ 0xAA2 +dasm_ED_A0 equ 0xAE6 +dasm_ED_A1 equ 0xAF8 +dasm_ED_A8 equ 0xAEF +dasm_ED_A9 equ 0xB01 +dasm_ED_B0 equ 0xAEA +dasm_ED_B1 equ 0xAFC +dasm_ED_B8 equ 0xAF3 +dasm_ED_B9 equ 0xB05 +dasm_F3 equ 0xA92 +dasm_F9 equ 0xD0E +dasm_FB equ 0xA95 +dasm_FD equ 0x9ED +dasm_FD_01 equ 0xCA9 +dasm_FD_09 equ 0xC63 +dasm_FD_22 equ 0xD02 +dasm_FD_23 equ 0xC7A +dasm_FD_2A equ 0xCD4 +dasm_FD_2B equ 0xC91 +dasm_FD_34 equ 0xC16 +dasm_FD_35 equ 0xC33 +dasm_FD_86 equ 0xB21 +dasm_FD_8E equ 0xB47 +dasm_FD_96 equ 0xB67 +dasm_FD_9E equ 0xB89 +dasm_FD_A6 equ 0xBA8 +dasm_FD_AE equ 0xBDF +dasm_FD_B6 equ 0xBC3 +dasm_FD_BE equ 0xBFA +dasm_FD_E1 equ 0xD50 +dasm_FD_E3 equ 0xADA +dasm_FD_E5 equ 0xD3A +dasm_FD_F9 equ 0xD22 +dasm_FF equ 0xA11 +dasm_UU equ 0xD58 +dasm_UW equ 0xD5C +dasm__AND equ 0xB97 +dasm__CP equ 0xBEB +dasm__DEC equ 0xC22 +dasm__ED_47 equ 0xA69 +dasm__ED_4F equ 0xA71 +dasm__ED_57 equ 0xA59 +dasm__ED_5F equ 0xA61 +dasm__INC equ 0xC05 +dasm__LD equ 0xA55 +dasm__OR equ 0xBB4 +dasm__SBC equ 0xB73 +dasm__SUB equ 0xB56 +dasm__XOR equ 0xBCE +dasm_opcode_table equ 0x556 +dasm_print16hex_addr equ 0x383 +dasm_print8hex equ 0x39B +dasm_printFlags_table equ 0xD61 +dasm_printRegister8_table equ 0xD71 +dasm_printRegister8_table_HL equ 0xD91 +dasm_printRegisterIX_table equ 0xD79 +dasm_printRegisterIY_table equ 0xD81 +dasm_printRegisterSP_table equ 0xD89 +disassemble equ 0x247 +disassemble_continue equ 0x32D +disassemble_err equ 0x31D +disassemble_next equ 0x24B +disassemble_print_opcode_params_end equ 0x31A +disassemble_print_opcode_params_loop equ 0x2C6 +disassemble_print_opcode_raw equ 0x288 +disassemble_print_opcode_raw_fill equ 0x29C +disassemble_table_first_match equ 0x35F +disassemble_table_found equ 0x379 +disassemble_table_notfound equ 0x37D +disassemble_table_seek equ 0x33B +disassemble_table_seek_loop equ 0x33F +dump_pretty equ 0x17E1 +dump_pretty_ascii equ 0x180B +dump_pretty_ascii_cont equ 0x1829 +dump_pretty_ascii_loop equ 0x1813 +dump_pretty_ascii_none equ 0x1824 +dump_pretty_col equ 0x17FE +dump_pretty_end equ 0x183B +dump_pretty_nextrow equ 0x182F +dump_pretty_row equ 0x17E9 +endPrint equ 0x19F +fat_cd_single equ 0x2460 +fat_copy_lba_pointer equ 0x2306 +fat_exec equ 0x257B +fat_get_root_table equ 0x203E +fat_getfatsec equ 0x2133 +fat_openfile equ 0x21E4 +fat_openfile_noprepare equ 0x21EC +fat_print_directory equ 0x234B +fat_readfilesec equ 0x21B9 +fat_reset_pointer equ 0x22F7 +format_filename_fat16 equ 0x2325 +ide_printerror equ 0xE89 +ide_readsector_256 equ 0xE15 +ide_readsector_256_waitloop equ 0xE17 +ide_readsector_512_inv equ 0xE3E +ide_readsector_512_inv_waitloop equ 0xE43 +ide_readsector_timeout equ 0xE73 +ide_regread_8 equ 0xDF7 +ide_regwrite_8 equ 0xDDB +ide_reset equ 0xDCE +ide_writesector_256 equ 0xE88 +ideif_drv_sel equ 0x1573 +ideif_get_drv_pointer equ 0x151C +ideif_init_all equ 0x1530 +ideif_init_devtable equ 0x133A +ideif_init_drive equ 0x144D +ideif_prnt_devtable equ 0x1358 +iic_init equ 0x16F5 +iic_read_ack equ 0x1734 +iic_receive_buffer equ 0x16C6 +iic_receive_buffer_done equ 0x16E9 +iic_receive_buffer_err equ 0x16EF +iic_receive_buffer_loop equ 0x16D7 +iic_receive_byte equ 0x17BA +iic_receive_byte_loop equ 0x17C7 +iic_send_ack equ 0x175A +iic_send_buffer equ 0x169C +iic_send_buffer_done equ 0x16BA +iic_send_buffer_err equ 0x16C0 +iic_send_buffer_loop equ 0x16AC +iic_send_byte equ 0x1794 +iic_send_byte_loop equ 0x17A0 +iic_send_ebit equ 0x1713 +iic_send_nack equ 0x1777 +iic_send_sbit equ 0x16FE mon_var_template equ 0x44 -mon_var_template_end equ 0x370 -param_01 equ 0x317 -param_02 equ 0x33E -param_03 equ 0x35B -param_03_done equ 0x393 -param_03_neg equ 0x37C -param_04 equ 0x397 -param_04_i equ 0x3A7 -param_05 equ 0x3AD -param_06 equ 0x3BA -param_07 equ 0x3D4 -param_08 equ 0x3E1 -param_09 equ 0x3F6 -param_09_0A equ 0x3FC -param_0A equ 0x3ED -param_10 equ 0x40B -param_11 equ 0x41B -param_11_12 equ 0x42A -param_11_12_all equ 0x44A -param_11_12_def equ 0x43D -param_11_12_ix equ 0x442 -param_11_12_iy equ 0x447 -param_12 equ 0x423 -param_13 equ 0x45B -param_80 equ 0x47A -param_80_seek equ 0x481 -param_81 equ 0x471 -param_comma equ 0x4B5 -param_printRegister equ 0x490 -param_printRegisterA equ 0x4AE -param_printRegisterHL equ 0x4A6 -print_a_hex equ 0x107 -print_bcd equ 0x119 -print_char equ 0xD7 -print_clear equ 0xEA -print_newLine equ 0xF1 -print_str equ 0xDF -print_str_end equ 0xE9 -print_str_fixed equ 0x1763 -print_wait_out equ 0xFC -read_bcd equ 0x131 -read_char equ 0x11F -read_lba_sector equ 0x14BE -str_dev_done equ 0x1508 -str_dev_waitready equ 0x14F0 -str_error_start equ 0xE37 -str_error_start1 equ 0xE54 -str_error_start2 equ 0xE5D -str_error_time equ 0xE66 -str_post_apu equ 0x1DFC -str_post_ide_30 equ 0x1DAB -str_post_ide_40 equ 0x1DC6 -str_post_nd equ 0x1E32 -str_post_ok equ 0x1E6A -str_post_pio equ 0x1DE1 -str_post_rtc equ 0x1E17 -str_post_rtc_iv equ 0x1E40 +mon_var_template_end equ 0x40F +nxtILC equ 0x194 +param_01 equ 0x3A9 +param_02 equ 0x3D0 +param_03 equ 0x3ED +param_03_done equ 0x425 +param_03_neg equ 0x40E +param_04 equ 0x429 +param_04_i equ 0x439 +param_05 equ 0x43F +param_06 equ 0x44C +param_07 equ 0x466 +param_08 equ 0x473 +param_09 equ 0x488 +param_09_0A equ 0x48E +param_0A equ 0x47F +param_10 equ 0x49D +param_11 equ 0x4AD +param_11_12 equ 0x4BC +param_11_12_all equ 0x4DC +param_11_12_def equ 0x4CF +param_11_12_ix equ 0x4D4 +param_11_12_iy equ 0x4D9 +param_12 equ 0x4B5 +param_13 equ 0x4ED +param_80 equ 0x50C +param_80_seek equ 0x513 +param_81 equ 0x503 +param_comma equ 0x547 +param_printRegister equ 0x522 +param_printRegisterA equ 0x540 +param_printRegisterHL equ 0x538 +print_16_hex equ 0x16A +print_32_hex equ 0x151 +print_a_hex equ 0x10E +print_bcd equ 0x120 +print_char equ 0xDE +print_clear equ 0xF1 +print_newLine equ 0xF8 +print_reg equ 0x1A4 +print_str equ 0xE6 +print_str_end equ 0xF0 +print_str_fixed equ 0x187B +print_wait_out equ 0x103 +read_bcd equ 0x138 +read_char equ 0x126 +read_lba_sector equ 0x1543 +str_dev_done equ 0x15E3 +str_dev_waitready equ 0x15CB +str_error_start equ 0xEBC +str_error_start1 equ 0xED9 +str_error_start2 equ 0xEE2 +str_error_time equ 0xEEB +str_post_apu equ 0x1F38 +str_post_ide_30 equ 0x1EE7 +str_post_ide_40 equ 0x1F02 +str_post_nd equ 0x1F6E +str_post_ok equ 0x1FA6 +str_post_pio equ 0x1F1D +str_post_rtc equ 0x1F53 +str_post_rtc_iv equ 0x1F7C var_apu_present equ 0x400A -var_buffer equ 0x402B var_buffer_len equ 0x4000 var_bytes_count equ 0x411A var_curserchar equ 0x4006 @@ -459,7 +546,9 @@ var_curseron equ 0x4005 var_curserstate equ 0x4004 var_curserx equ 0x4002 var_cursery equ 0x4003 -var_idebuffer equ 0x402C +var_dir equ 0x402B +var_idebuffer equ 0x40CB +var_input equ 0x407B var_last_char equ 0x4001 var_opcode equ 0x4114 var_opcode_length equ 0x4116 diff --git a/OperatingSystem/software/include/fat16.s b/OperatingSystem/software/include/fat16.s index c37c945..d1386b0 100644 --- a/OperatingSystem/software/include/fat16.s +++ b/OperatingSystem/software/include/fat16.s @@ -7,24 +7,42 @@ MEM_FAT_AMOUNT: ; Amount of FATs (1byte) defs 1 MEM_FAT_SECTORS: ; Length of FAT (2byte) defs 2 +MEM_FAT_CLUSTERLEN: ; Length of Cluster (1byte) + defs 1 MEM_FAT_COUNT1: ; Counter Var for reading FAT (2byte) defs 1 MEM_FAT_TMPPOINTER: ; Temporary working pointer defs 4 -MEM_FAT_TMPPOINTER1: ; Temporary working pointer +MEM_FAT_DATASTART: ; Start of data area defs 4 +MEM_FAT_ROOTSTART: ; Start of Root directory + defs 4 +MEM_FAT_FILEREMAIN: ; Remaining sectors in file + defs 4 +MEM_FAT_DIRSEC: ; Sectors per directory + defs 2 MEM_FAT_TMPFNAME: ; Temporary filename defs 16 - +MEM_FAT_CURDIR: ; Current Directory + defs 80 +MEM_FAT_OF0_ATTRIBUTE: ;Current file attribute + defw 0 MEM_FAT_OF0_CCLUST: ;Current cluster of file defw 0 MEM_FAT_OF0_FATSEC: ;Current sector in FAT defs 4 MEM_FAT_OF0_DATSEC: ;Current sector in Data defs 4 -MEM_FAT_OF0_DATREM: ;Remaining sector in Data - defs 2 - +MEM_FAT_OF0_DATREM: ;Remaining bytes in Data + defs 4 +MEM_FAT_CURRDIR: ;Current directory + defs 4 +MEM_FAT_EXEC_CURR: + defw 0 +MEM_FAT_EXEC_COUNT: + defw 0 +MEM_FAT_EXEC_START: + defw 0 dephase @@ -34,10 +52,10 @@ MEM_FAT_OF0_DATREM: ;Remaining sector in Data fat_get_root_table: call fat_reset_pointer ;reset fat pointer - ;call fat_print_dbg ; Load first sector on active partition LD HL, MEM_IDE_POINTER ; pointer to LBA address LD A,1 ;read 1 sector + LD DE, MEM_IDE_BUFFER ;where to store data? call read_lba_sector ; check for valid Boot sector @@ -45,13 +63,10 @@ fat_get_root_table: cp 0xEB ;first byte should be 0xEB jp nz, _fat_get_root_table_invalid - ;debug sector - ;ld hl, MEM_IDE_BUFFER - ;ld b,20 - ;call dump_pretty - ; Read and store FS Properties LD IX,MEM_IDE_BUFFER + LD A,(IX+0x0D) + LD (MEM_FAT_CLUSTERLEN),A LD A,(IX+0x0E) LD (MEM_FAT_RESERVED),A LD A,(IX+0x0F) @@ -63,28 +78,95 @@ fat_get_root_table: LD A,(IX+0x17) LD (MEM_FAT_SECTORS+1),A - ;Get Root FAT - LD A, (MEM_FAT_SECTORS+1) ; load FAT Sector size to DE - LD D,A - LD A, (MEM_FAT_SECTORS) - LD E,A - XOR A ; clear HL - LD H,A - LD L,A - LD A,(MEM_FAT_AMOUNT) ; Load counter for multiplication - LD B,A -_fat_get_root_table_loop: ; multiply - ADD HL,DE - DJNZ _fat_get_root_table_loop + ;Get Data Start Sector + ;calculate fat length + ld bc,(MEM_FAT_SECTORS) + ld a,(MEM_FAT_AMOUNT) ;add fat to cluster number + ld d,0 + ld e,a + call _fat_math_mul32 + ; BCHL contains result -> store to PTR.MEM_FAT_ROOTSTART + ld (MEM_FAT_ROOTSTART+0),hl + ld (MEM_FAT_ROOTSTART+2),bc - ; add reserved sectors - LD D,0 - LD A,(MEM_FAT_RESERVED) - LD E,A - ADD HL,DE + ;add offset (reserved sectors) + ld hl,(MEM_IDE_BUFFER +0x0E) ; load sectors into hl + ld (MEM_FAT_TMPPOINTER), hl + xor a + ld (MEM_FAT_TMPPOINTER+2),a + ld (MEM_FAT_TMPPOINTER+3),a + + ld bc,[MEM_FAT_ROOTSTART] + ld de,[MEM_FAT_TMPPOINTER] + call _fat_math_add32 ;MEM_FAT_ROOTSTART now contains the first sector + ;of the Root directory + + ;add offset (partition location) + call ideif_get_drv_pointer + inc ix + inc ix + push ix + pop de ;copy poiter to hl + ld bc,[MEM_FAT_ROOTSTART] + call _fat_math_add32 ;MEM_FAT_OF0_DATSEC now contains the first sector + ;of the cluster + ;copy value from MEM_FAT_ROOTSTART to MEM_IDE_POINTER + ld hl,MEM_FAT_ROOTSTART + ld de,MEM_IDE_POINTER + ldi + ldi + ldi + ldi + + ;copy value from MEM_FAT_ROOTSTART to MEM_IDE_POINTER + ld hl,MEM_FAT_ROOTSTART + ld de,MEM_FAT_DATASTART + ldi + ldi + ldi + ldi + + ld hl,MEM_FAT_ROOTSTART + ld de,MEM_FAT_CURRDIR + ldi + ldi + ldi + ldi + + ;add offset to data area + ;multiply cluster by length of cluster + + ;calculate sectors for root dir + ld hl,(MEM_IDE_BUFFER+0x11) ;load Maximum root directory entries + ld a,h + ld l,a + xor a ;set a 0, clear carry flag + ld h,a ;shift right by 8 bit = /512 + + ;last step: multiply by 16 + ex de,hl + ld bc,16 + call _fat_math_mul32 + ; BCHL contains result -> store to PTR.MEM_FAT_TMPPOINTER + ld (MEM_FAT_TMPPOINTER+0),hl + ld (MEM_FAT_TMPPOINTER+2),bc + + ld (MEM_FAT_DIRSEC),hl + ; add offset to MEM_FAT_DATASTART + ld de,[MEM_FAT_TMPPOINTER] + ld bc,[MEM_FAT_DATASTART] + call _fat_math_add32 ;MEM_FAT_DATASTART now contains the correct sector + ;at teh beginnig of the data area + + + ;done all FS vars populated + + ;navigate to root directory + ld a,'\' + ld(MEM_FAT_CURDIR),a + xor a + ld(MEM_FAT_CURDIR+1),a - ; add - call _fat_math_sector_add_16 ret _fat_get_root_table_invalid: @@ -95,14 +177,21 @@ _fat_get_root_table_invalid: ret ;------------------------------------- -; Print current fat directory of MEM_IDE_POINTER +; Print current fat directory of MEM_FAT_CURRDIR ;------------------------------------- fat_print_directory: - + ld hl,MEM_FAT_CURRDIR + ld de,MEM_IDE_POINTER + ldi + ldi + ldi + ldi + LD DE,(MEM_FAT_SECTORS) LD (MEM_FAT_COUNT1),DE LD HL,MEM_IDE_POINTER ;read first sector LD B,1 + LD DE, MEM_IDE_BUFFER ;where to store data? call read_lba_sector call PRINTINLINE @@ -209,6 +298,8 @@ _fat_print_directory_loop_next_sector: ; end fo sector. read next sector from d LD HL,MEM_IDE_POINTER ;read next sector LD B,1 + + LD DE, MEM_IDE_BUFFER ;where to store data? call read_lba_sector LD HL, MEM_IDE_BUFFER ;set buffer start @@ -226,83 +317,165 @@ _fat_print_directory_loop_break_dirty ; call print_str ;print ret -;------------------------------------- -; FAT locate file startcluster -; -; DE pointer to file name -;------------------------------------- -fat_lfs: - PUSH DE - LD HL,[MEM_FAT_TMPFNAME] ; prepare filename - CALL format_filename_fat16 - - LD A,16 ;init counter for FAT sectors - LD (MEM_FAT_COUNT1),A - - LD HL,MEM_IDE_POINTER ;read first sector - LD B,1 - call read_lba_sector - - LD HL, MEM_IDE_BUFFER ;set buffer start - LD C,16 ;set entries counter - -_fat_lfs_loop: - POP DE - PUSH DE - CALL compare_filename - JR C, _fat_lfs_loop_compare_match ;on match - - ; prepare next entry - DEC C ;next sector after 16 entries - JR Z,_fat_lfs_loop_compare_next_sector - LD DE, 32 ;length of entry - ADD HL,DE ;increment - JP _fat_lfs_loop - -_fat_lfs_loop_compare_next_sector: - LD H,0 - LD L,1 - call _fat_math_sector_add_16 ;increment sector - LD A,(MEM_FAT_COUNT1) ; decrement sector count (max FAT length) - DEC A - LD (MEM_FAT_COUNT1),A - JP Z, _fat_lfs_loop_compare_end ; if DE is 0, mmax is reached. End here - ;call print_a_hex - - LD HL,MEM_IDE_POINTER ;read next sector - LD B,1 - call read_lba_sector - - LD HL, MEM_IDE_BUFFER ;set buffer start - LD C,16 ;set entries counter - JP _fat_lfs_loop - -_fat_lfs_loop_compare_end: - POP DE - LD HL, [str_file_notfound] - CALL print_str ;print - RET - -_fat_lfs_loop_compare_match: - ; get entry - POP DE - LD B,8 - call print_str_fixed - ld A,'.' - call print_char - LD B,3 - call print_str_fixed - - LD HL, [str_file_found] - CALL print_str ;print - - RET +; fat change directory +; relative path +; DE pointer to path +fat_cd_single: + push de + ; check if user wants to go back (input = '..') + ld a,(de) + cp '.' + jr nz, _fat_cd_navigate; if not, skip + inc de ;check next + ld a,(de) + cp '.' + jr nz, _fat_cd_navigate; if not, skip + ld a,(var_dir+79) ;last byte contains depth + or a; Test if 0 + jp z, _fat_cd_navigate_error ;cannot go back any more (already at root) + ; check if .. exists in directory + ld a,'.' ;prepare filename buffer + ld hl,[MEM_FAT_TMPFNAME] + ld (hl),a + inc hl + ld (hl),a + inc hl + ld a,0x20 ;clear char 3-11 + ld b,11 +_fat_cd_navigate_goback_fl: + ld (hl),a + inc hl + djnz _fat_cd_navigate_goback_fl ;fill loop end + call fat_openfile_noprepare ;load file table (only 1st sector needed) + or a ;check for error + jp nz, _fat_cd_navigate_error ;entry not found exception + ; find end of path + ld hl,[var_dir+3] ;current position + ld bc,76 + ld a,0x00 ;termination char + cpir ;find end + jp po,_fat_cd_navigate_inerror ;in case of error, abort + ;hl is now at end of string + ld bc,76 + ld a,'\' ;seperation char + cpdr ;serach backwards for "/" + jp po,_fat_cd_navigate_inerror ;in case of error, abort + ;hl is now at end of string + inc hl + xor a + ld (hl),a ;set termination char + inc hl + ld (hl),a ;set termination char + ld a,(var_dir+79) + dec a + ld (var_dir+79),a ;decrement dir depth counter + + pop de + + ld hl,[var_dir+2] + ld a,'\' + ld (hl),a ;set first / + + ld hl,MEM_FAT_OF0_DATSEC ;setup directory pointer + ld de,MEM_FAT_CURRDIR + ldi + ldi + ldi + ldi + + ret + +_fat_cd_navigate + pop de ;get pointer to directory namme + push de ;and re-store it for next use + call fat_openfile ;find 'file' in current directory +_fat_cd_navigate_findsec + or a + jp nz, _fat_cd_navigate_error ;entry not found + ld a, (MEM_FAT_OF0_ATTRIBUTE) + cp 0x10 + jp nz, _fat_cd_navigate_errfile + ld a,(var_dir+79) + inc a + ld (var_dir+79),a ;increment dir depth counter + ld hl,[var_dir+2] ;load start of path string + ld a,0 ;load termination char + ld bc,76 ;max length of string + cpir ;find end of path string + dec hl + jp po,_fat_cd_navigate_inerror ;in case of error, abort + ;HL now has last element, BC has remaining max length + ld a,(var_dir+79) ;last byte contains depth + cp 1 ;if first path, skip / + jr z, _fat_cd_navigate_findsec_skipslash + ld a,'\' + ld (hl),a + inc hl +_fat_cd_navigate_findsec_skipslash + pop de ;get argument from stack + ex de,hl + push de ;store start to stack + ;HL now has start of input string, DE has end of current path + ld bc,09 ;maximum length of directory name +1 +_fat_cd_navigate_l2: ;copy new subdirectory + ldi ;copy + jp po,_fat_cd_navigate_inerrorS ;in case of error, abort + ld a,(hl) ;check next char + cp '\' ;end at '\' + jr z, _fat_cd_navigate_end ;else next byte + or a ;or and at 0x00 + jr z, _fat_cd_navigate_end ;else next byte + jr _fat_cd_navigate_l2 +_fat_cd_navigate_end: + xor a + ld (de),a ;set last byte to 0x00 (termination) + ld hl,MEM_FAT_OF0_DATSEC + ;setup directory pointer + ld de,MEM_FAT_CURRDIR + ldi + ldi + ldi + ldi + pop de ;stack cleanup + ret + +_fat_cd_navigate_error: + ld hl,[_fat_cd_navigate_error_str] + call print_str + pop de + ret + +_fat_cd_navigate_inerrorS: ;with path reset + pop de ;restore former path + dec de ;change pointer to remove previous '\' as well + xor a ;clear a to 0x00 + ld (de),a ;set last byte to 0x00 (termination) + jr _fat_cd_navigate_inerrore +_fat_cd_navigate_inerror: ;without path reset + pop de +_fat_cd_navigate_inerrore: + ld hl,[_fat_cd_navigate_inputerr_str] + call print_str + ret +_fat_cd_navigate_errfile: + pop de + ld hl,[_fat_cd_navigate_errfile_str] + call print_str + ret + +_fat_cd_navigate_error_str: + db 10,13,"No such directory!",10,13,0 +_fat_cd_navigate_inputerr_str: + db 10,13,"Invalid input!",10,13,0 +_fat_cd_navigate_errfile_str: + db 10,13,"Cannot cd to file!",10,13,0 ;=================== UTIL Functions =========================== ; 32 Bit addition to pointer ; HL has value +;deprecated!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! _fat_math_sector_add_16: ld (MEM_FAT_TMPPOINTER), hl xor a @@ -313,7 +486,26 @@ _fat_math_sector_add_16: ld bc,[MEM_IDE_POINTER] call _fat_math_add32 ret +;deprecated!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + ;hl contains pointer +_fat_increment_32 + ld a,(HL) ; byte 0 + add 1 + ld (hl),a + inc hl + ld a,(HL) ; byte 1 + adc 0 + ld (hl),a + inc hl + ld a,(HL) ; byte 2 + adc 0 + ld (hl),a + inc hl + ld a,(HL) ; byte 3 + adc 0 + ld (hl),a + ret ;bc contains pointer to a (also result) ;de contains pointer to b _fat_math_add32 @@ -369,6 +561,30 @@ _fat_math_add32 pop hl ret + +; Multiply 16-bit values (with 32-bit result) +; Operands BC, DE +; Result -> BCHL +_fat_math_mul32: + ld a,c + ld c,b + ld hl,0 + ld b,16 +_fat_math_mul32_l: + add hl,hl + rla + rl c + jr nc,_fat_math_mul32_noadd + add hl,de + adc a,0 + jp nc,_fat_math_mul32_noadd + inc c +_fat_math_mul32_noadd: + djnz _fat_math_mul32_l + ld b,c + ld c,a + ret + ; reset LBA pointer to first sector in selected partition fat_reset_pointer: call ideif_get_drv_pointer @@ -390,73 +606,3 @@ fat_copy_lba_pointer: POP BC ret -; compares filenames -; HL points to name1 -; DE points to name2 -; Carry is set if match -; Destroys DE, AF -compare_filename: - PUSH HL - PUSH BC - LD B, 11 ;Counter -_compare_filename_loop: - LD A,(DE) - LD C,A - LD A,(HL) - XOR C ;check if identical (should return 0) - JR NZ, _compare_filename_nomatch - DEC B ;decrement counter - JR NZ, _compare_filename_loop ;if not last, continue - POP BC ;if last, it matches - POP HL - SCF - RET -_compare_filename_nomatch: - POP BC - POP HL - SCF - CCF - RET - -; formats filename to 8+3 format -; DE points to source filename to string -; HL points to destination -format_filename_fat16: - LD B, 11 ;counter - PUSH HL - XOR A -_format_filename_fat16_clean: - LD (HL),A - INC HL - DJNZ _format_filename_fat16_clean - POP HL ; continue with copy - LD B, 13 -_format_filename_fat16_loop: - LD A, (DE) ; load byte - OR A - RET Z ;exit on 0byte - DEC B ;reduce counter - RET Z ;exit after 12 bytes 8+.+3 - CP '.' ; check if dot - JR NZ, _format_filename_fat16_loop_copy ; if not continue as usual - INC DE ;else skip char -_format_filename_fat16_loop_skip_8: - LD A,B - CP 5 - JR C, _format_filename_fat16_loop - INC HL - DEC B - JR _format_filename_fat16_loop_skip_8 - -_format_filename_fat16_loop_copy: - LD A, (DE) ; load byte - LD (HL), A ; copy byte - INC HL - INC DE - JP _format_filename_fat16_loop - -str_file_notfound: - db "File not found!",13,10,0 - -str_file_found: - db " File located!",13,10,0 \ No newline at end of file diff --git a/OperatingSystem/software/include/fat16_file.s b/OperatingSystem/software/include/fat16_file.s index 2526a51..0ccc011 100644 --- a/OperatingSystem/software/include/fat16_file.s +++ b/OperatingSystem/software/include/fat16_file.s @@ -11,10 +11,23 @@ ; store result in MEM_FAT_OF0_FATSEC ; stores next cluster in MEM_FAT_OF0_CCLUST fat_getfatsec: + ld HL,(MEM_FAT_OF0_CCLUST) ;load cluster + ld a,h ;if not 0x0000 + or l + jp nz, _fat_getfatsec_notroot + ;if 0x0000, goto root directory + ld hl,MEM_FAT_ROOTSTART + ld de,MEM_FAT_OF0_DATSEC + ldi ;quick and dirty hack to go back to root directory + ldi + ldi + ldi + ret + +_fat_getfatsec_notroot: ld HL,(MEM_FAT_OF0_CCLUST) ;load cluster ;each sector contains 256 clusters ;first 8bits are not needed (/256) - ld a,h ;divide by 256 ld l,a xor a @@ -22,7 +35,7 @@ fat_getfatsec: ld bc,(MEM_FAT_RESERVED) ;add reserved sectors add hl,bc - ld(MEM_FAT_OF0_FATSEC+0),hl;store sector to MEM_FAT_TMPPOINTER1 + ld(MEM_FAT_OF0_FATSEC+0),hl;store sector xor a ld(MEM_FAT_OF0_FATSEC+2),a ld(MEM_FAT_OF0_FATSEC+3),a @@ -36,17 +49,40 @@ fat_getfatsec: call _fat_math_add32 ;MEM_FAT_OF0_FATSEC now contains the correct sector ;in the FAT - call fat_print_dbg - ;read FAT sector ld hl,MEM_FAT_OF0_FATSEC ;read next sector ld b,1 + LD DE, MEM_IDE_BUFFER ;where to store data? call read_lba_sector - ld hl, MEM_IDE_BUFFER - ld b,20 - call dump_pretty + ;calculate data sector + ;multiply cluster by length of cluster + xor a ;clear carry + ld a,(MEM_FAT_CLUSTERLEN) + ld b,0 + ld c,a + ld de,(MEM_FAT_OF0_CCLUST) ;load cluster number + dec de ; sub 2 becaus fat starts at 3 + dec de + call _fat_math_mul32 + ; BCHL contains result -> store to PTR.MEM_FAT_OF0_DATSEC + ld (MEM_FAT_OF0_DATSEC+0),hl + ld (MEM_FAT_OF0_DATSEC+2),bc + ; add start of data region to addr + ld bc,[MEM_FAT_OF0_DATSEC] + ld de,[MEM_FAT_DATASTART] + call _fat_math_add32 ;MEM_FAT_OF0_FATSEC now contains the correct sector + ;in the FAT + ;MEM_FAT_OF0_DATSEC now has the first sector of the selected cluster + + ;reset MEM_FAT_OF0_DATREM to default cluster length + ld a,(MEM_FAT_CLUSTERLEN) + ld l,a + ld h,0 + ld (MEM_FAT_OF0_DATREM), hl + + ;get next cluster ;calculate offset address ld a,(MEM_FAT_OF0_CCLUST) RLA ;shift to left (x2) @@ -56,14 +92,234 @@ fat_getfatsec: ld h,a ld de,MEM_IDE_BUFFER add hl,de - ;copy pointer + ;copy pointer (hl to de) ld de,MEM_FAT_OF0_CCLUST ldi ;copy byte for next cluster from FAT ldi - - - call fat_print_dbg - ret ;store data +; reads single sector of file +; must run fat_readfilesec before to initialize +; if a ix 0x00, success +; if a is 0xFF, end reached +fat_readfilesec: + call fat_print_dbg + ld hl,[MEM_FAT_OF0_DATSEC] + ld b,1 + LD DE, MEM_IDE_BUFFER ;where to store data? + call read_lba_sector ;read sectore + ld hl,[MEM_FAT_OF0_DATSEC] ;increment pointer to next sector + call _fat_increment_32 ;*** + ld hl,(MEM_FAT_OF0_DATREM) ;reduce counter + xor a + ld de,1 + sbc hl,de ;decrement counter + ld (MEM_FAT_OF0_DATREM),hl ;store decremented counter + ret nz ;when not zero, exit function + ;if zero: + ld a, 0xFF ;preload error code + ld hl,(MEM_FAT_OF0_CCLUST) ;check next chunk + ld de,0xFFFF ;end mark + sbc hl,de ;if Z match + ret z ;If 0xFFFF, end is reched. Return + ;if next cluster available: + xor a + call fat_getfatsec ; read next cluster information + ret + +;------------------------------------- +; FAT open file +; +; DE pointer to file name +;------------------------------------- +fat_openfile: + PUSH DE + ;MEM_FAT_TMPFNAME now has valid text to compare + LD HL,[MEM_FAT_TMPFNAME] + call format_filename_fat16 + POP DE +fat_openfile_noprepare: + PUSH DE + ;prepare pointer + ld hl,MEM_FAT_CURRDIR + ld de,MEM_IDE_POINTER + ldi + ldi + ldi + ldi + + LD A,(MEM_FAT_DIRSEC) ;init counter for FAT sectors + LD (MEM_FAT_COUNT1),A + + LD HL,MEM_IDE_POINTER ;read first sector + LD B,1 + LD DE, MEM_IDE_BUFFER ;where to store data? + call read_lba_sector + + ;LD HL,MEM_IDE_BUFFER ;Dump IDE Buffer + ;LD B,32 + ;call dump_pretty + + ;LD HL,MEM_FAT_TMPFNAME ;Dump IDE Buffer + ;LD B,1 + ;call dump_pretty + + LD HL, MEM_IDE_BUFFER ;set buffer start + LD C,16 ;set entries counter + +_fat_lfs_loop: + LD DE,[MEM_FAT_TMPFNAME] + CALL compare_filename + JR C, _fat_lfs_loop_compare_match ;on match + + ; prepare next entry + DEC C ;next sector after 16 entries + JR Z,_fat_lfs_loop_compare_next_sector + LD DE, 32 ;length of entry + ADD HL,DE ;increment + JP _fat_lfs_loop + +_fat_lfs_loop_compare_next_sector: + ld hl,[MEM_IDE_POINTER] + call _fat_increment_32 ;increment sector + + LD A,(MEM_FAT_COUNT1) ; decrement sector count (max FAT length) + DEC A + LD (MEM_FAT_COUNT1),A + JP Z, _fat_lfs_loop_compare_end ; if DE is 0, mmax is reached. End here + ;call print_a_hex + + LD HL,MEM_IDE_POINTER ;read next sector + LD B,1 + LD DE, MEM_IDE_BUFFER ;where to store data? + call read_lba_sector + + LD HL, MEM_IDE_BUFFER ;set buffer start + LD C,16 ;set entries counter + + ld a,(HL) + or a + jp z, _fat_lfs_loop_compare_end ;skip empty sectors + + JP _fat_lfs_loop + +_fat_lfs_loop_compare_end: + POP DE + ;LD HL, [str_file_notfound] + ;CALL print_str ;print + ld a,0xFF + RET + +_fat_lfs_loop_compare_match: + ; get entry + POP DE + + ; HL points to Start of Table item + PUSH HL + POP IX + ; get important information + ld a,(ix+0x1B) ;first cluster number + ld (MEM_FAT_OF0_CCLUST+1),a + ld a,(ix+0x1A) + ld (MEM_FAT_OF0_CCLUST+0),a + ld a,(ix+0x0B) + ld (MEM_FAT_OF0_ATTRIBUTE+0),a + + xor a ;clear carry ;set MEM_FAT_OF0_DATREM to remaining sectors + ld a,(ix+0x1F) ;cluste length shift by 256 + rra + ld (MEM_FAT_FILEREMAIN+2),a + ld a,(ix+0x1E) + rra + ld (MEM_FAT_FILEREMAIN+1),a + ld a,(ix+0x1D) + rra + ld (MEM_FAT_FILEREMAIN+0),a + ld a,0 + ld (MEM_FAT_FILEREMAIN+3),a + call fat_getfatsec ;get sector information + ;call print_newLine + + ;LD B,8 + ;call print_str_fixed + ;ld A,'.' + ;call print_char + ;LD B,3 + ;call print_str_fixed + ;LD HL, [str_file_found] + ;CALL print_str ;print + xor a + RET + + +; compares filenames +; HL points to name1 +; DE points to name2 +; Carry is set if match +; Destroys DE, AF +compare_filename: + PUSH HL + push BC + LD B, 11 ;Counter +_compare_filename_loop: + LD A,(DE) + LD C,A + LD A,(HL) + INC HL + INC DE + XOR C ;check if identical (should return 0) + JR NZ, _compare_filename_nomatch + djnz _compare_filename_loop ;if not last, continue + POP BC + POP HL + SCF + RET +_compare_filename_nomatch: + POP BC + POP HL + XOR A ; clear carry flag + RET + +; formats filename to 8+3 format +; DE points to source filename to string +; HL points to destination +format_filename_fat16: + LD B, 11 ;counter + PUSH HL + LD A, ' ' +_format_filename_fat16_clean: + LD (HL),A + INC HL + DJNZ _format_filename_fat16_clean + POP HL ; continue with copy + LD B, 13 +_format_filename_fat16_loop: + LD A, (DE) ; load byte + OR A + RET Z ;exit on 0byte + DEC B ;reduce counter + RET Z ;exit after 12 bytes 8+.+3 + CP '.' ; check if dot + JR NZ, _format_filename_fat16_loop_copy ; if not continue as usual + INC DE ;else skip char +_format_filename_fat16_loop_skip_8: + LD A,B + CP 5 + JR C, _format_filename_fat16_loop + INC HL + DEC B + JR _format_filename_fat16_loop_skip_8 + +_format_filename_fat16_loop_copy: + LD A, (DE) ; load byte + LD (HL), A ; copy byte + INC HL + INC DE + JP _format_filename_fat16_loop + +str_file_notfound: + db "File not found!",13,10,0 + +str_file_found: + db " File located!",13,10,0 \ No newline at end of file diff --git a/OperatingSystem/software/test.asm b/OperatingSystem/software/test.asm index 8596186..9994e18 100644 --- a/OperatingSystem/software/test.asm +++ b/OperatingSystem/software/test.asm @@ -1,170 +1,107 @@ .include "extern_symbols.s" ;include monitor symbols. - org 0x8000 + org 0x6000 -sel_dsk: - call ideif_drv_sel - call fat_print_dbg - ret - - org 0x8010 - call fat_print_dbg - ret - - org 0x8020 - call fat_print_directory - ret - - org 0x8030 - ld hl,0x0006 - ld (MEM_FAT_OF0_CCLUST),hl - call fat_getfatsec - ret - -fat_print_dbg: - call PRINTINLINE - db 10,13,"PTR.MEM_IDE_POINTER: 0x",0 - ld ix,MEM_IDE_POINTER - call print_32_hex - call PRINTINLINE - db " | PTR.MEM_IDE_PARTITION: 0x",0 - ld ix,MEM_IDE_PARTITION - call print_32_hex - - call PRINTINLINE - db 10,13,"PTR.MEM_FAT_TMPPOINTER: 0x",0 - ld ix,MEM_FAT_TMPPOINTER - call print_32_hex - call PRINTINLINE - db " | PTR.MEM_FAT_TMPPOINTER1: 0x",0 - ld ix,MEM_FAT_TMPPOINTER1 - call print_32_hex - - call PRINTINLINE - db 10,13,"VAL.MEM_FAT_RESERVED: 0x",0 - ld ix,MEM_FAT_RESERVED - call print_16_hex - call PRINTINLINE - db " | VAL.MEM_FAT_AMOUNT: 0x",0 - ld a,(MEM_FAT_AMOUNT) - call print_a_hex - - call PRINTINLINE - db 10,13,"VAL.MEM_FAT_SECTORS: 0x",0 - ld ix,MEM_FAT_SECTORS - call print_16_hex - call PRINTINLINE - db " | VAL.MEM_FAT_COUNT1: 0x",0 - ld a,(MEM_FAT_COUNT1) - call print_a_hex - - call PRINTINLINE - db 10,13,"VAL.MEM_FAT_OF0_CCLUST: 0x",0 - ld ix,MEM_FAT_OF0_CCLUST - call print_16_hex - call PRINTINLINE - db " | PTR.MEM_FAT_OF0_FATSEC: 0x",0 - ld ix,MEM_FAT_OF0_FATSEC - call print_32_hex - - call PRINTINLINE - db 10,13,"VAL.MEM_FAT_OF0_DATSEC: 0x",0 - ld ix,MEM_FAT_OF0_DATSEC - call print_32_hex - call PRINTINLINE - db " | PTR.MEM_FAT_OF0_DATREM: 0x",0 - ld ix,MEM_FAT_OF0_DATREM - call print_16_hex - - call print_newLine - ret - -print_32_hex: - ld a,(ix+3) - call print_a_hex - ld a,(ix+2) - call print_a_hex - ld a,(ix+1) - call print_a_hex - ld a,(ix+0) - call print_a_hex - ret - -print_16_hex: - ld a,(ix+1) - call print_a_hex - ld a,(ix+0) - call print_a_hex - ret - -; a contains drive to select -; populate fs vars as well -ideif_drv_sel: - ld (MEM_IDE_SELECTED),a - push af - call ideif_get_drv_pointer ;test if drive is marked as available - ld a,(ix+0) +MEM_FAT_EXEC_CURR .equ var_scratch+10 +MEM_FAT_EXEC_COUNT .equ var_scratch+12 +MEM_FAT_EXEC_START .equ var_scratch+14 +fat_exec: + ld de,[var_input+6] ;prepare input like to mimic rom behaviour + push de + ;DE has pointer to arguments + call fat_openfile or a - jp nz, _ideif_drv_sel_fail ;if not-> fail - - call fat_get_root_table ;else get root table - ;backup tmp pointer - ld hl,(MEM_IDE_POINTER) - ld de,(MEM_IDE_PARTITION) ;use MEM_IDE_PARTITION to backup the pointer - call fat_copy_lba_pointer - ld hl,[_ideif_drv_sel_pstr] ;print success message + jp nz, _fat_exec_notfound ;if not found, abort + ;call fat_print_dbg + ;load header + ld de, MEM_IDE_BUFFER + call fat_readfilesec + + + ;ld hl, MEM_IDE_BUFFER ;print sector + ;ld b,0x20 + ;call dump_pretty + + ld a,(MEM_IDE_BUFFER) + cp 0xC3 + jp nz, _fat_exec_notexec + + call PRINTINLINE + db 10,13,"Loading ",0 + ld hl,[var_input+6] call print_str - pop af - add 69 - call print_char - ld hl,[_ideif_drv_sel_sstr0] - call print_str - ret -_ideif_drv_sel_fail: - ld hl,[_ideif_drv_sel_pstr] - call print_str - pop af - add 69 - call print_char - ld hl,[_ideif_drv_sel_fstr0] - call print_str - LD DE,0x20 - LD BC,0x70 - CALL beep + call PRINTINLINE + db " to 0x",0 + ;get start address + ld bc,(MEM_IDE_BUFFER + 10) + ld a,b + call print_a_hex + ld a,c + call print_a_hex + call PRINTINLINE + db " ... ",0 + ;bc has start addr + ld (MEM_FAT_EXEC_CURR),bc + ld (MEM_FAT_EXEC_START),bc + + ;get amount of sectors to load + ld hl,(MEM_IDE_BUFFER + 14) + ld l,h + srl l + ld h,0 ;divide by 512 + inc hl ;increment because first sector is always loaded + ; hl contains sector count + ld (MEM_FAT_EXEC_COUNT), hl + + pop de ; restore filename + call fat_openfile ;reset file information + ;start reading +_fat_exec_readloop1: + ld de,(MEM_FAT_EXEC_CURR) + call fat_readfilesec + ld hl,(MEM_FAT_EXEC_CURR) + ld de,512 + add hl,de + ld (MEM_FAT_EXEC_CURR),hl + + ld hl,(MEM_FAT_EXEC_COUNT) + dec hl + ld (MEM_FAT_EXEC_COUNT),hl + ld a,h + or l + jr z, _fat_exec_read_done + jr _fat_exec_readloop1 +_fat_exec_read_done: + call PRINTINLINE + db "Load complete!",10,13,0 + ld hl,(MEM_FAT_EXEC_START) + jp (hl) + + +_fat_exec_notfound: + call PRINTINLINE + db 10,13,"File not found!",10,13,0 ret -_ideif_drv_sel_pstr: - db 10,13,"Drive ",0 -_ideif_drv_sel_fstr0: - db ": not ready",10,13,0 -_ideif_drv_sel_sstr0: - db ": selected",10,13,0 -_ideif_drv_sel_syn: - db 10,13,"Invalid drive letter",10,13,0 -.include "fat16.s" ;include monitor symbols. -.include "fat16_file.s" ;include monitor symbols. +_fat_exec_notexec: + call PRINTINLINE + db 10,13,"File is not an executable!",10,13,0 + ret + -;------------------------------------------------------------------------------ -; PRINTINLINE -; -; String output function -; -; Prints in-line data (bytes immediately following the PRINTINLINE call) -; until a string terminator is encountered (0 - null char). -;------------------------------------------------------------------------------ -PRINTINLINE: - EX (SP),HL ; PUSH HL and put RET ADDress into HL - PUSH AF - PUSH BC -nxtILC: - LD A,(HL) - CP 0 - JR Z,endPrint - CALL print_char - INC HL - JR nxtILC -endPrint: - INC HL ; Get past "null" terminator - POP BC - POP AF - EX (SP),HL ; PUSH new RET ADDress on stack and restore HL - RET \ No newline at end of file + +_test_loop: + call fat_readfilesec + push af + ld hl, MEM_IDE_BUFFER ;print sector + ld b,0x20 + call dump_pretty + ;call PRINTINLINE + ;db 10,13,"SECREAD",10,13,0 + pop af + or a + jp z, _test_loop + + ;check if end of file + + + ret diff --git a/OperatingSystem/software/zout/test.bin b/OperatingSystem/software/zout/test.bin index 2ee5260..edbd482 100644 Binary files a/OperatingSystem/software/zout/test.bin and b/OperatingSystem/software/zout/test.bin differ diff --git a/OperatingSystem/software/zout/test.hex b/OperatingSystem/software/zout/test.hex index 5600e75..80e9c8b 100644 --- a/OperatingSystem/software/zout/test.hex +++ b/OperatingSystem/software/zout/test.hex @@ -1,99 +1,16 @@ -:07800000CD5A82CD3A80C980 -:04801000CD3A80C91C -:04802000CD8583C9BE -:10803000210600223543CDBB85C9CD0C860A0D50E3 -:1080400054522E4D454D5F4944455F504F494E5463 -:1080500045523A20202020307800DD213240CD34B6 -:1080600082CD0C8620207C20205054522E4D454D30 -:108070005F4944455F504152544954494F4E3A205C -:108080002020307800DD212E40CD3482CD0C860AB0 -:108090000D5054522E4D454D5F4641545F544D5046 -:1080A000504F494E5445523A20307800DD211D434F -:1080B000CD3482CD0C8620207C20205054522E4D71 -:1080C000454D5F4641545F544D50504F494E5445C5 -:1080D00052313A20307800DD212143CD3482CD0C5D -:1080E000860A0D56414C2E4D454D5F4641545F5218 -:1080F000455345525645443A202020307800DD2132 -:108100001743CD4D82CD0C862020202020207C20BE -:108110002056414C2E4D454D5F4641545F414D4FD9 -:10812000554E543A2020202020203078003A194320 -:10813000CD0701CD0C860A0D56414C2E4D454D5FA5 -:108140004641545F534543544F52533A2020202018 -:10815000307800DD211A43CD4D82CD0C86202020C1 -:108160002020207C202056414C2E4D454D5F46411D -:10817000545F434F554E54313A2020202020203068 -:1081800078003A1C43CD0701CD0C860A0D56414CB0 -:108190002E4D454D5F4641545F4F46305F43434C43 -:1081A0005553543A20307800DD213543CD4D82CDF2 -:1081B0000C862020202020207C20205054522E4D40 -:1081C000454D5F4641545F4F46305F4641545345ED -:1081D000433A2020307800DD213743CD3482CD0C66 -:1081E000860A0D56414C2E4D454D5F4641545F4F1A -:1081F00046305F4441545345433A20307800DD21F6 -:108200003B43CD3482CD0C8620207C20205054521C -:108210002E4D454D5F4641545F4F46305F444154BB -:1082200052454D3A2020307800DD213F43CD4D822C -:10823000CDF100C9DD7E03CD0701DD7E02CD070152 -:10824000DD7E01CD0701DD7E00CD0701C9DD7E01A8 -:10825000CD0701DD7E00CD0701C9327640F5CD970F -:1082600014DD7E00B7C28882CD0B832A3240ED5BDD -:108270002E40CD548521A482CDDF00F1C645CDD757 -:108280000021BB82CDDF00C921A482CDDF00F1C671 -:1082900045CDD70021AD82CDDF0011200001700057 -:1082A000CD170DC90A0D447269766520003A206E1B -:1082B0006F742072656164790A0D003A2073656CF1 -:1082C00065637465640A0D000A0D496E76616C6918 -:1082D00064206472697665206C65747465720A0D39 -:1082E000000000000000000000000000000000008E -:1082F000000000000000000000000000000000007E -:108300000000000000000000000000CD4585213283 -:10831000403E01CDBE143A1741FEEBC25D83DD2124 -:108320001741DD7E0E321743DD7E0F321843DD7EAE -:1083300010321943DD7E16321A43DD7E17321B439D -:108340003A1B43573A1A435FAF676F3A19434719CD -:1083500010FD16003A17435F19CD0085C9CD0C8674 -:108360000A0D43616E6E6F742066696E6420626FE1 -:108370006F7420736563746F722E0A0D00CD9714AD -:10838000DD360002C9ED5B1A43ED531C4321324038 -:108390000601CDBE14CD0C860A0D202046696C6501 -:1083A0006E616D652020202020436C7573746572AA -:1083B0002053697A650A0D002117410E107EE5DD14 -:1083C000E1E5FE41CA6384FEE5CA6384FE00CA9407 -:1083D00084DD7E0BFE10CA31843E20CDD7003E20C6 -:1083E000CDD7000608CD63173E2ECDD7000603CDAE -:1083F0006317CD0C8620307800DD7E1BCD0701DDB4 -:108400007E1ACD0701CD0C862020307800DD7E1F3E -:10841000CD0701DD7E1ECD0701DD7E1DCD0701DD0F -:108420007E1CCD07013E0ACDD7003E0DCDD70018EA -:10843000323E44CDD7003E20CDD7000608CD63178D -:10844000CD0C862020202020307800DD7E1BCD073B -:1084500001DD7E1ACD07013E0ACDD7003E0DCDD7F6 -:108460000018000D2808E111200019C3BD83E12682 -:10847000002E01CD0085ED5B1C431BED531C437AA0 -:10848000B3CA95842132400601CDBE142117410E96 -:1084900010C3BD83E1C9D5212543CD73853E10327C -:1084A0001C432132400601CDBE142117410E10D1CC -:1084B000D5CD5D8538330D280711200019C3AF8451 -:1084C00026002E01CD00853A1C433D321C43CAE1F3 -:1084D000842132400601CDBE142117410E10C3AFD6 -:1084E00084D1219885CDDF00C9D10608CD63173E20 -:1084F0002ECDD7000603CD631721AA85CDDF00C995 -:10850000221D43AF321F43322043111D430132402D -:10851000CD1485C9E5C5D51A6F131A67130A5F0311 -:108520000A5719D1C17D02037C02031313C5D51A62 -:108530006F131A67130A5F030A57ED5AD1C17D0200 -:10854000037C02E1C9CD9714DD23DD23DDE5E111D4 -:1085500032401800C506000E04EDB0C1C9E5C506DD -:108560000B1A4F7EA920070520F7C1E137C9C1E1E9 -:10857000373FC9060BE5AF772310FCE1060D1AB7AC -:10858000C805C8FE2E200A1378FE0538F123051809 -:10859000F71A772313C37E8546696C65206E6F7466 -:1085A00020666F756E64210D0A002046696C652097 -:1085B0006C6F6361746564210D0A002A35437C6F1A -:1085C000AF67ED4B174309223743AF323943323A95 -:1085D00043CD9714DD23DD23DDE5D1013743CD14F1 -:1085E00085CD3A802137430601CDBE1421174106BF -:1085F00014CDC9163A3543176F3E0017671117415E -:1086000019113543EDA0EDA0CD3A80C9E3F5C57E43 -:0F861000FE002806CDD7002318F523C1F1E3C9DA +:10600000118140D5CDD321B7C29A6011B641CDA838 +:10601000213AB641FEC3C2B260CD91010A0D4C6F68 +:106020006164696E672000218140CDE600CD910159 +:1060300020746F20307800ED4BC04178CD0E01798F +:10604000CD0E01CD9101202E2E2E2000ED431540C6 +:10605000ED4319402AC4416CCB3D26002322174052 +:10606000D1CDD321ED5B1540CDA8212A15401100DB +:1060700002192215402A17402B2217407CB528020E +:1060800018E2CD91014C6F616420636F6D706C6597 +:106090007465210A0D002A1940E9CD91010A0D46C7 +:1060A000696C65206E6F7420666F756E64210A0DD1 +:1060B00000C9CD91010A0D46696C65206973206E97 +:1060C0006F7420616E2065786563757461626C65BC +:1060D000210A0D00C9CDA821F521B6410620CDE148 +:0760E00017F1B7CAD560C932 :00000001FF diff --git a/OperatingSystem/software/zout/test.lst b/OperatingSystem/software/zout/test.lst index e334db4..3214b71 100644 --- a/OperatingSystem/software/zout/test.lst +++ b/OperatingSystem/software/zout/test.lst @@ -4,27 +4,27 @@ 2: ;Do not make any changes here! 3: 4: - 00D0 ADDR_RTC equ 0xD0 - 5: - 0152 A_RTS_OFF equ 0x152 - 6: - 015B A_RTS_ON equ 0x15B + 5: - 017F A_RTS_OFF equ 0x17F + 6: - 0188 A_RTS_ON equ 0x188 7: - 0050 BOOT_PHASE0 equ 0x50 8: - 006E BOOT_PHASE1 equ 0x6E 9: - 0077 BOOT_PHASE1_LOOP equ 0x77 - 10: - 0082 BOOT_PHASE2 equ 0x82 - 11: - 17EB COMMAND equ 0x17EB - 12: - 1826 COMMAND_BACKSPACE equ 0x1826 - 13: - 176B COMMAND_LUT equ 0x176B - 14: - 184C COMMAND_PROCESS equ 0x184C - 15: - 1887 COMMAND_PROCESS_FOUND equ 0x1887 - 16: - 184F COMMAND_PROCESS_LOOP equ 0x184F - 17: - 1858 COMMAND_PROCESS_LOOP_STR1 equ 0x1858 - 18: - 186E COMMAND_PROCESS_LOOP_STR2 equ 0x186E - 19: - 1873 COMMAND_PROCESS_NEXT_ENTRY equ 0x1873 - 20: - 1872 COMMAND_PROCESS_NEXT_ENTRYI equ 0x1872 - 21: - 187E COMMAND_PROCESS_NOT_FOUND equ 0x187E - 22: - 17F7 COMMAND_READ equ 0x17F7 - 23: - 009E CONSOLE_INIT equ 0x9E - 24: - 009E CONSOLE_INIT_CTC equ 0x9E - 25: - 00A6 CONSOLE_INIT_SIO equ 0xA6 + 10: - 0089 BOOT_PHASE2 equ 0x89 + 11: - 190E COMMAND equ 0x190E + 12: - 194F COMMAND_BACKSPACE equ 0x194F + 13: - 1883 COMMAND_LUT equ 0x1883 + 14: - 1975 COMMAND_PROCESS equ 0x1975 + 15: - 19B0 COMMAND_PROCESS_FOUND equ 0x19B0 + 16: - 1978 COMMAND_PROCESS_LOOP equ 0x1978 + 17: - 1981 COMMAND_PROCESS_LOOP_STR1 equ 0x1981 + 18: - 1997 COMMAND_PROCESS_LOOP_STR2 equ 0x1997 + 19: - 199C COMMAND_PROCESS_NEXT_ENTRY equ 0x199C + 20: - 199B COMMAND_PROCESS_NEXT_ENTRYI equ 0x199B + 21: - 19A7 COMMAND_PROCESS_NOT_FOUND equ 0x19A7 + 22: - 1920 COMMAND_READ equ 0x1920 + 23: - 00A5 CONSOLE_INIT equ 0xA5 + 24: - 00A5 CONSOLE_INIT_CTC equ 0xA5 + 25: - 00AD CONSOLE_INIT_SIO equ 0xAD 26: - 00F9 CS_APU_CTRL equ 0xF9 27: - 00F8 CS_APU_DATA equ 0xF8 28: - 0000 CS_BANK equ 0x00 @@ -45,18 +45,18 @@ 43: - 0008 CS_SIO_A_D equ 0x08 44: - 000B CS_SIO_B_C equ 0x0B 45: - 000A CS_SIO_B_D equ 0x0A - 46: - 0164 DHEX_TO_BYTE equ 0x164 - 47: - 0180 DHEX_TO_BYTE_FAILED equ 0x180 - 48: - 189D ERR_SYNTAX equ 0x189D - 49: - 0D04 EXEC_RST_08 equ 0xD04 - 50: - 0D08 EXEC_RST_10 equ 0xD08 - 51: - 0D14 EXEC_RST_18 equ 0xD14 - 52: - 0184 HEX_TO_BIN equ 0x184 - 53: - 0192 HEX_TO_BIN_2 equ 0x192 - 54: - 0199 HEX_TO_INVALID_2 equ 0x199 + 46: - 01F6 DHEX_TO_BYTE equ 0x1F6 + 47: - 0212 DHEX_TO_BYTE_FAILED equ 0x212 + 48: - 19C6 ERR_SYNTAX equ 0x19C6 + 49: - 0D96 EXEC_RST_08 equ 0xD96 + 50: - 0D9A EXEC_RST_10 equ 0xD9A + 51: - 0DA6 EXEC_RST_18 equ 0xDA6 + 52: - 0216 HEX_TO_BIN equ 0x216 + 53: - 0224 HEX_TO_BIN_2 equ 0x224 + 54: - 022B HEX_TO_INVALID_2 equ 0x22B 55: - 00EC IDE_CMD_IDENT equ 0xEC 56: - 0020 IDE_CMD_READSEC equ 0x20 - 57: - 1275 IDE_DEV_TABLE equ 0x1275 + 57: - 12FA IDE_DEV_TABLE equ 0x12FA 58: - 0040 IDE_RD equ 0x40 59: - 0016 IDE_REG_ALTSTS equ 0x16 60: - 000F IDE_REG_CMDSTS equ 0x0F @@ -77,1238 +77,608 @@ 75: - 0001 IIC_CLK equ 0x01 76: - 0002 IIC_DATA equ 0x02 77: - 001B INT_VEC equ 0x1B - 78: - 402B IN_BUFFER equ 0x402B - 79: - 0040 IO_AY0_ADDR equ 0x40 - 80: - 0041 IO_AY0_DATA equ 0x41 - 81: - 0042 IO_AY1_ADDR equ 0x42 - 82: - 0043 IO_AY1_DATA equ 0x43 - 83: - 0020 IO_REG0 equ 0x20 - 84: - 0025 IO_RTC_AMPM equ 0x25 - 85: - 002D IO_RTC_CTR_D equ 0x2D - 86: - 002E IO_RTC_CTR_E equ 0x2E - 87: - 002F IO_RTC_CTR_F equ 0x2F - 88: - 0026 IO_RTC_DAY0 equ 0x26 - 89: - 0027 IO_RTC_DAY1 equ 0x27 - 90: - 0024 IO_RTC_HOUR equ 0x24 - 91: - 0022 IO_RTC_MIN0 equ 0x22 - 92: - 0023 IO_RTC_MIN1 equ 0x23 - 93: - 0028 IO_RTC_MON0 equ 0x28 - 94: - 0029 IO_RTC_MON1 equ 0x29 - 95: - 0020 IO_RTC_SEC0 equ 0x20 - 96: - 0021 IO_RTC_SEC1 equ 0x21 - 97: - 002C IO_RTC_WEEK equ 0x2C - 98: - 002B IO_RTC_YEAR1 equ 0x2B - 99: - 002A IO_RTC_YERR0 equ 0x2A - 100: - 4117 MEM_IDE_BUFFER equ 0x4117 - 101: - 402C MEM_IDE_DEVICE equ 0x402C - 102: - 4036 MEM_IDE_DEV_TABLE equ 0x4036 - 103: - 4317 MEM_IDE_FSBUFFER equ 0x4317 - 104: - 402E MEM_IDE_PARTITION equ 0x402E - 105: - 4032 MEM_IDE_POINTER equ 0x4032 - 106: - 4076 MEM_IDE_SELECTED equ 0x4076 - 107: - 402D MEM_IDE_STATUS equ 0x402D - 108: - 4077 MEM_IDE_STRING_0 equ 0x4077 - 109: - 409F MEM_IDE_STRING_1 equ 0x409F - 110: - 40C7 MEM_IDE_STRING_2 equ 0x40C7 - 111: - 40EF MEM_IDE_STRING_3 equ 0x40EF - 112: - 014A MSG_CLEAR equ 0x14A - 113: - 1896 NOT_IMPLEMENTED equ 0x1896 - 114: - 18F8 OP_CALL equ 0x18F8 - 115: - 1A8C OP_CLR equ 0x1A8C - 116: - 1979 OP_DASM equ 0x1979 - 117: - 1918 OP_DUMP equ 0x1918 - 118: - 18DF OP_EXEC equ 0x18DF - 119: - 1A40 OP_IIC_IN equ 0x1A40 - 120: - 19E0 OP_IIC_OUT equ 0x19E0 - 121: - 19A9 OP_IO_IN equ 0x19A9 - 122: - 19BF OP_IO_OUT equ 0x19BF - 123: - 1CA1 OP_LSDSK equ 0x1CA1 - 124: - 1A90 OP_RTIME equ 0x1A90 - 125: - 1CA5 OP_SELDSK equ 0x1CA5 - 126: - 1948 OP_SET equ 0x1948 - 127: - 1C28 OP_STIME equ 0x1C28 - 128: - 1D12 POST_CHECK_APU equ 0x1D12 - 129: - 1D3D POST_CHECK_IDE_30 equ 0x1D3D - 130: - 1D50 POST_CHECK_IDE_40 equ 0x1D50 - 131: - 1CED POST_CHECK_PIO equ 0x1CED - 132: - 1CDD POST_START equ 0x1CDD - 133: - 1D6A POST_TEST_RTC equ 0x1D6A - 134: - 4110 PRG_RAM_START equ 0x4110 - 135: - FF00 PRG_RAM_TOP equ 0xFF00 - 136: - 4000 PROG_MEM_START equ 0x4000 - 137: - 0100 PROG_ROM_START equ 0x100 - 138: - 0000 RST_00 equ 0x00 - 139: - 0008 RST_08 equ 0x08 - 140: - 0010 RST_10 equ 0x10 - 141: - 0018 RST_18 equ 0x18 - 142: - FFFF STACK_RAM_TOP equ 0xFFFF - 143: - 0000 START_ROM equ 0x00 - 144: - 019B STRCONV_BYTES_TO_HEX equ 0x19B - 145: - 01AA STRCONV_BYTES_TO_HEX_1 equ 0x1AA - 146: - 01B4 STRCONV_BYTES_TO_HEX_2 equ 0x1B4 - 147: - 1E6F STR_Banner_Start equ 0x1E6F - 148: - 1724 STR_PD_HEADER equ 0x1724 - 149: - 4010 SYS_BUF_START equ 0x4010 - 150: - 4000 SYS_RAM_START equ 0x4000 - 151: - 0018 VAR_CONSOLE_BAUD equ 0x18 - 152: - 000F VAR_CONSOLE_CONF equ 0x0F - 153: - 0080 VDP_MEM equ 0x80 - 154: - 0081 VDP_REG equ 0x81 - 155: - 1895 _COMMAND_PROCESS_FOUND equ 0x1895 - 156: - 1917 _OP_CALL equ 0x1917 - 157: - 1A25 _OP_IIC_ACK_ERR equ 0x1A25 - 158: - 1A2C _OP_IIC_ACK_ERR_str equ 0x1A2C - 159: - 1A72 _OP_IIC_IN_LOOP equ 0x1A72 - 160: - 1A7F _OP_IIC_IN_LOOP_TEXT equ 0x1A7F - 161: - 19F6 _OP_IIC_OUT_LOOP equ 0x19F6 - 162: - 1A12 _OP_IIC_OUT_SEND equ 0x1A12 - 163: - 1A93 _OP_RTIME_NN equ 0x1A93 - 164: - 1B4B _OP_RTIME_RD_CMD equ 0x1B4B - 165: - 1CB4 _OP_SELDSK_INVALID equ 0x1CB4 - 166: - 1CC4 _OP_SELDSK_INVALID_STR equ 0x1CC4 - 167: - 1960 _OP_SET_LOOP equ 0x1960 - 168: - 1BEE _OP_STIME_INVALID equ 0x1BEE - 169: - 1C05 _OP_STIME_PROMPT equ 0x1C05 - 170: - 1C1D _OP_STIME_PROMPT_ERR equ 0x1C1D - 171: - 1B4C _OP_STIME_STR_DAY equ 0x1B4C - 172: - 1B9D _OP_STIME_STR_HOUR equ 0x1B9D - 173: - 1BB8 _OP_STIME_STR_MIN equ 0x1BB8 - 174: - 1B67 _OP_STIME_STR_MON equ 0x1B67 - 175: - 1BD3 _OP_STIME_STR_SEC equ 0x1BD3 - 176: - 1B82 _OP_STIME_STR_YEAR equ 0x1B82 - 177: - 1D31 _POST_CHECK_APU_FAILED equ 0x1D31 - 178: - 1D63 _POST_CHECK_IDE_FAILED equ 0x1D63 - 179: - 1D06 _POST_CHECK_PIO_FAILED equ 0x1D06 - 180: - 1DA4 _POST_TEST_RTC_INVALID equ 0x1DA4 - 181: - 1D9D _POST_TEST_RTC_NOTFOUND equ 0x1D9D - 182: - 18B8 _STR_NOT_FOUND equ 0x18B8 - 183: - 18A4 _STR_NOT_IMPLEMENTED equ 0x18A4 - 184: - 18CC _STR_SYNTAX equ 0x18CC - 185: - 0D30 _beep_pause_l1 equ 0xD30 - 186: - 13E9 _ideif_init_drive_found equ 0x13E9 - 187: - 13D1 _ideif_init_drive_loop equ 0x13D1 - 188: - 13E4 _ideif_init_drive_nodrv equ 0x13E4 - 189: - 1454 _ideif_init_drive_prt_fnd equ 0x1454 - 190: - 1442 _ideif_init_drive_prt_l1 equ 0x1442 - 191: - 144C _ideif_init_drive_prt_ln equ 0x144C - 192: - 1510 _ideif_prnt_devtable_hdr equ 0x1510 - 193: - 12E1 _ideif_prnt_devtable_l1 equ 0x12E1 - 194: - 13A7 _ideif_prnt_devtable_l1_e2 equ 0x13A7 - 195: - 1326 _ideif_prnt_devtable_l1_es equ 0x1326 - 196: - 13A4 _ideif_prnt_devtable_l1_ms equ 0x13A4 - 197: - 12EE _ideif_prnt_devtable_l1_nxt equ 0x12EE - 198: - 1314 _ideif_prnt_devtable_l1_s00 equ 0x1314 - 199: - 1319 _ideif_prnt_devtable_l1_s01 equ 0x1319 - 200: - 131E _ideif_prnt_devtable_l1_s02 equ 0x131E - 201: - 1323 _ideif_prnt_devtable_l1_sFF equ 0x1323 - 202: - 12EC _ideif_prnt_devtable_l1_sel equ 0x12EC - 203: - 1574 _ideif_prnt_devtable_master equ 0x1574 - 204: - 1548 _ideif_prnt_devtable_s00 equ 0x1548 - 205: - 1553 _ideif_prnt_devtable_s01 equ 0x1553 - 206: - 155E _ideif_prnt_devtable_s02 equ 0x155E - 207: - 1569 _ideif_prnt_devtable_sFF equ 0x1569 - 208: - 157C _ideif_prnt_devtable_slave equ 0x157C - 209: - 0147 _read_bcd_invalid equ 0x147 - 210: - 1C9C _shift4 equ 0x1C9C - 211: - 0D17 beep equ 0xD17 - 212: - 0D19 beep_loop equ 0xD19 - 213: - 0D2F beep_pause equ 0xD2F - 214: - 091C dasm_00 equ 0x91C - 215: - 0C08 dasm_01 equ 0xC08 - 216: - 09A2 dasm_02 equ 0x9A2 - 217: - 0BDA dasm_03 equ 0xBDA - 218: - 0A1F dasm_08 equ 0xA1F - 219: - 0BAD dasm_09 equ 0xBAD - 220: - 0984 dasm_0A equ 0x984 - 221: - 0BF1 dasm_0B equ 0xBF1 - 222: - 0964 dasm_10 equ 0x964 - 223: - 09AD dasm_12 equ 0x9AD - 224: - 0927 dasm_18 equ 0x927 - 225: - 098E dasm_1A equ 0x98E - 226: - 0941 dasm_20 equ 0x941 - 227: - 0C4E dasm_22 equ 0xC4E - 228: - 09E7 dasm_27 equ 0x9E7 - 229: - 093A dasm_28 equ 0x93A - 230: - 0C1F dasm_2A equ 0xC1F - 231: - 09EB dasm_2F equ 0x9EB - 232: - 0932 dasm_30 equ 0x932 - 233: - 09B8 dasm_32 equ 0x9B8 - 234: - 09F7 dasm_37 equ 0x9F7 - 235: - 092B dasm_38 equ 0x92B - 236: - 0998 dasm_3A equ 0x998 - 237: - 09F3 dasm_3F equ 0x9F3 - 238: - 09FB dasm_76 equ 0x9FB - 239: - 0A78 dasm_80C6 equ 0xA78 - 240: - 0A15 dasm_BE equ 0xA15 - 241: - 0920 dasm_C3 equ 0x920 - 242: - 0A9E dasm_C88E equ 0xA9E - 243: - 0970 dasm_C9 equ 0x970 - 244: - 096A dasm_CD equ 0x96A - 245: - 0A2C dasm_D9 equ 0xA2C - 246: - 0952 dasm_DD equ 0x952 - 247: - 0C0F dasm_DD_01 equ 0xC0F - 248: - 0BC8 dasm_DD_09 equ 0xBC8 - 249: - 0C64 dasm_DD_22 equ 0xC64 - 250: - 0BDF dasm_DD_23 equ 0xBDF - 251: - 0C36 dasm_DD_2A equ 0xC36 - 252: - 0BF6 dasm_DD_2B equ 0xBF6 - 253: - 0B78 dasm_DD_34 equ 0xB78 - 254: - 0B95 dasm_DD_35 equ 0xB95 - 255: - 0A80 dasm_DD_86 equ 0xA80 - 256: - 0AA6 dasm_DD_8E equ 0xAA6 - 257: - 0AC9 dasm_DD_96 equ 0xAC9 - 258: - 0AE9 dasm_DD_9E equ 0xAE9 - 259: - 0B0A dasm_DD_A6 equ 0xB0A - 260: - 0B41 dasm_DD_AE equ 0xB41 - 261: - 0B26 dasm_DD_B6 equ 0xB26 - 262: - 0B5D dasm_DD_BE equ 0xB5D - 263: - 0CB6 dasm_DD_E1 equ 0xCB6 - 264: - 0A3C dasm_DD_E3 equ 0xA3C - 265: - 0CA0 dasm_DD_E5 equ 0xCA0 - 266: - 0C86 dasm_DD_F9 equ 0xC86 - 267: - 0CB0 dasm_E1 equ 0xCB0 - 268: - 0A30 dasm_E3 equ 0xA30 - 269: - 0C9A dasm_E5 equ 0xC9A - 270: - 0949 dasm_E9 equ 0x949 - 271: - 0BBF dasm_ED_42 equ 0xBBF - 272: - 0C5A dasm_ED_43 equ 0xC5A - 273: - 09EF dasm_ED_44 equ 0x9EF - 274: - 097A dasm_ED_45 equ 0x97A - 275: - 0A06 dasm_ED_46 equ 0xA06 - 276: - 0BB6 dasm_ED_4A equ 0xBB6 - 277: - 0C2B dasm_ED_4B equ 0xC2B - 278: - 0975 dasm_ED_4D equ 0x975 - 279: - 0A0B dasm_ED_56 equ 0xA0B - 280: - 0A10 dasm_ED_5E equ 0xA10 - 281: - 0A54 dasm_ED_A0 equ 0xA54 - 282: - 0A66 dasm_ED_A1 equ 0xA66 - 283: - 0A5D dasm_ED_A8 equ 0xA5D - 284: - 0A6F dasm_ED_A9 equ 0xA6F - 285: - 0A58 dasm_ED_B0 equ 0xA58 - 286: - 0A6A dasm_ED_B1 equ 0xA6A - 287: - 0A61 dasm_ED_B8 equ 0xA61 - 288: - 0A73 dasm_ED_B9 equ 0xA73 - 289: - 0A00 dasm_F3 equ 0xA00 - 290: - 0C7C dasm_F9 equ 0xC7C - 291: - 0A03 dasm_FB equ 0xA03 - 292: - 095B dasm_FD equ 0x95B - 293: - 0C17 dasm_FD_01 equ 0xC17 - 294: - 0BD1 dasm_FD_09 equ 0xBD1 - 295: - 0C70 dasm_FD_22 equ 0xC70 - 296: - 0BE8 dasm_FD_23 equ 0xBE8 - 297: - 0C42 dasm_FD_2A equ 0xC42 - 298: - 0BFF dasm_FD_2B equ 0xBFF - 299: - 0B84 dasm_FD_34 equ 0xB84 - 300: - 0BA1 dasm_FD_35 equ 0xBA1 - 301: - 0A8F dasm_FD_86 equ 0xA8F - 302: - 0AB5 dasm_FD_8E equ 0xAB5 - 303: - 0AD5 dasm_FD_96 equ 0xAD5 - 304: - 0AF7 dasm_FD_9E equ 0xAF7 - 305: - 0B16 dasm_FD_A6 equ 0xB16 - 306: - 0B4D dasm_FD_AE equ 0xB4D - 307: - 0B31 dasm_FD_B6 equ 0xB31 - 308: - 0B68 dasm_FD_BE equ 0xB68 - 309: - 0CBE dasm_FD_E1 equ 0xCBE - 310: - 0A48 dasm_FD_E3 equ 0xA48 - 311: - 0CA8 dasm_FD_E5 equ 0xCA8 - 312: - 0C90 dasm_FD_F9 equ 0xC90 - 313: - 097F dasm_FF equ 0x97F - 314: - 0CC6 dasm_UU equ 0xCC6 - 315: - 0CCA dasm_UW equ 0xCCA - 316: - 0B05 dasm__AND equ 0xB05 - 317: - 0B59 dasm__CP equ 0xB59 - 318: - 0B90 dasm__DEC equ 0xB90 - 319: - 09D7 dasm__ED_47 equ 0x9D7 - 320: - 09DF dasm__ED_4F equ 0x9DF - 321: - 09C7 dasm__ED_57 equ 0x9C7 - 322: - 09CF dasm__ED_5F equ 0x9CF - 323: - 0B73 dasm__INC equ 0xB73 - 324: - 09C3 dasm__LD equ 0x9C3 - 325: - 0B22 dasm__OR equ 0xB22 - 326: - 0AE1 dasm__SBC equ 0xAE1 - 327: - 0AC4 dasm__SUB equ 0xAC4 - 328: - 0B3C dasm__XOR equ 0xB3C - 329: - 04C4 dasm_opcode_table equ 0x4C4 - 330: - 02F1 dasm_print16hex_addr equ 0x2F1 - 331: - 0309 dasm_print8hex equ 0x309 - 332: - 0CCF dasm_printFlags_table equ 0xCCF - 333: - 0CDF dasm_printRegister8_table equ 0xCDF - 334: - 0CFF dasm_printRegister8_table_HL equ 0xCFF - 335: - 0CE7 dasm_printRegisterIX_table equ 0xCE7 - 336: - 0CEF dasm_printRegisterIY_table equ 0xCEF - 337: - 0CF7 dasm_printRegisterSP_table equ 0xCF7 - 338: - 01B5 disassemble equ 0x1B5 - 339: - 029B disassemble_continue equ 0x29B - 340: - 028B disassemble_err equ 0x28B - 341: - 01B9 disassemble_next equ 0x1B9 - 342: - 0288 disassemble_print_opcode_params_end equ 0x288 - 343: - 0234 disassemble_print_opcode_params_loop equ 0x234 - 344: - 01F6 disassemble_print_opcode_raw equ 0x1F6 - 345: - 020A disassemble_print_opcode_raw_fill equ 0x20A - 346: - 02CD disassemble_table_first_match equ 0x2CD - 347: - 02E7 disassemble_table_found equ 0x2E7 - 348: - 02EB disassemble_table_notfound equ 0x2EB - 349: - 02A9 disassemble_table_seek equ 0x2A9 - 350: - 02AD disassemble_table_seek_loop equ 0x2AD - 351: - 16C9 dump_pretty equ 0x16C9 - 352: - 16F3 dump_pretty_ascii equ 0x16F3 - 353: - 1711 dump_pretty_ascii_cont equ 0x1711 - 354: - 16FB dump_pretty_ascii_loop equ 0x16FB - 355: - 170C dump_pretty_ascii_none equ 0x170C - 356: - 16E6 dump_pretty_col equ 0x16E6 - 357: - 1723 dump_pretty_end equ 0x1723 - 358: - 1717 dump_pretty_nextrow equ 0x1717 - 359: - 16D1 dump_pretty_row equ 0x16D1 - 360: - 0E04 ide_printerror equ 0xE04 - 361: - 0D83 ide_readsector_256 equ 0xD83 - 362: - 0DB2 ide_readsector_256_done equ 0xDB2 - 363: - 0D85 ide_readsector_256_waitloop equ 0xD85 - 364: - 0DB3 ide_readsector_512_inv equ 0xDB3 - 365: - 0DB8 ide_readsector_512_inv_waitloop equ 0xDB8 - 366: - 0DEE ide_readsector_timeout equ 0xDEE - 367: - 0D65 ide_regread_8 equ 0xD65 - 368: - 0D49 ide_regwrite_8 equ 0xD49 - 369: - 0D3C ide_reset equ 0xD3C - 370: - 0E03 ide_writesector_256 equ 0xE03 - 371: - 1497 ideif_get_drv_pointer equ 0x1497 - 372: - 14AB ideif_init_all equ 0x14AB - 373: - 12B5 ideif_init_devtable equ 0x12B5 - 374: - 13C8 ideif_init_drive equ 0x13C8 - 375: - 12D3 ideif_prnt_devtable equ 0x12D3 - 376: - 15DD iic_init equ 0x15DD - 377: - 161C iic_read_ack equ 0x161C - 378: - 15AE iic_receive_buffer equ 0x15AE - 379: - 15D1 iic_receive_buffer_done equ 0x15D1 - 380: - 15D7 iic_receive_buffer_err equ 0x15D7 - 381: - 15BF iic_receive_buffer_loop equ 0x15BF - 382: - 16A2 iic_receive_byte equ 0x16A2 - 383: - 16AF iic_receive_byte_loop equ 0x16AF - 384: - 1642 iic_send_ack equ 0x1642 - 385: - 1584 iic_send_buffer equ 0x1584 - 386: - 15A2 iic_send_buffer_done equ 0x15A2 - 387: - 15A8 iic_send_buffer_err equ 0x15A8 - 388: - 1594 iic_send_buffer_loop equ 0x1594 - 389: - 167C iic_send_byte equ 0x167C - 390: - 1688 iic_send_byte_loop equ 0x1688 - 391: - 15FB iic_send_ebit equ 0x15FB - 392: - 165F iic_send_nack equ 0x165F - 393: - 15E6 iic_send_sbit equ 0x15E6 - 394: - 0044 mon_var_template equ 0x44 - 395: - 0370 mon_var_template_end equ 0x370 - 396: - 0317 param_01 equ 0x317 - 397: - 033E param_02 equ 0x33E - 398: - 035B param_03 equ 0x35B - 399: - 0393 param_03_done equ 0x393 - 400: - 037C param_03_neg equ 0x37C - 401: - 0397 param_04 equ 0x397 - 402: - 03A7 param_04_i equ 0x3A7 - 403: - 03AD param_05 equ 0x3AD - 404: - 03BA param_06 equ 0x3BA - 405: - 03D4 param_07 equ 0x3D4 - 406: - 03E1 param_08 equ 0x3E1 - 407: - 03F6 param_09 equ 0x3F6 - 408: - 03FC param_09_0A equ 0x3FC - 409: - 03ED param_0A equ 0x3ED - 410: - 040B param_10 equ 0x40B - 411: - 041B param_11 equ 0x41B - 412: - 042A param_11_12 equ 0x42A - 413: - 044A param_11_12_all equ 0x44A - 414: - 043D param_11_12_def equ 0x43D - 415: - 0442 param_11_12_ix equ 0x442 - 416: - 0447 param_11_12_iy equ 0x447 - 417: - 0423 param_12 equ 0x423 - 418: - 045B param_13 equ 0x45B - 419: - 047A param_80 equ 0x47A - 420: - 0481 param_80_seek equ 0x481 - 421: - 0471 param_81 equ 0x471 - 422: - 04B5 param_comma equ 0x4B5 - 423: - 0490 param_printRegister equ 0x490 - 424: - 04AE param_printRegisterA equ 0x4AE - 425: - 04A6 param_printRegisterHL equ 0x4A6 - 426: - 0107 print_a_hex equ 0x107 - 427: - 0119 print_bcd equ 0x119 - 428: - 00D7 print_char equ 0xD7 - 429: - 00EA print_clear equ 0xEA - 430: - 00F1 print_newLine equ 0xF1 - 431: - 00DF print_str equ 0xDF - 432: - 00E9 print_str_end equ 0xE9 - 433: - 1763 print_str_fixed equ 0x1763 - 434: - 00FC print_wait_out equ 0xFC - 435: - 0131 read_bcd equ 0x131 - 436: - 011F read_char equ 0x11F - 437: - 14BE read_lba_sector equ 0x14BE - 438: - 1508 str_dev_done equ 0x1508 - 439: - 14F0 str_dev_waitready equ 0x14F0 - 440: - 0E37 str_error_start equ 0xE37 - 441: - 0E54 str_error_start1 equ 0xE54 - 442: - 0E5D str_error_start2 equ 0xE5D - 443: - 0E66 str_error_time equ 0xE66 - 444: - 1DFC str_post_apu equ 0x1DFC - 445: - 1DAB str_post_ide_30 equ 0x1DAB - 446: - 1DC6 str_post_ide_40 equ 0x1DC6 - 447: - 1E32 str_post_nd equ 0x1E32 - 448: - 1E6A str_post_ok equ 0x1E6A - 449: - 1DE1 str_post_pio equ 0x1DE1 - 450: - 1E17 str_post_rtc equ 0x1E17 - 451: - 1E40 str_post_rtc_iv equ 0x1E40 - 452: - 400A var_apu_present equ 0x400A - 453: - 402B var_buffer equ 0x402B - 454: - 4000 var_buffer_len equ 0x4000 - 455: - 411A var_bytes_count equ 0x411A - 456: - 4006 var_curserchar equ 0x4006 - 457: - 4007 var_curserlastaddr equ 0x4007 - 458: - 4005 var_curseron equ 0x4005 - 459: - 4004 var_curserstate equ 0x4004 - 460: - 4002 var_curserx equ 0x4002 - 461: - 4003 var_cursery equ 0x4003 - 462: - 402C var_idebuffer equ 0x402C - 463: - 4001 var_last_char equ 0x4001 - 464: - 4114 var_opcode equ 0x4114 - 465: - 4116 var_opcode_length equ 0x4116 - 466: - 4119 var_opcode_pcount equ 0x4119 - 467: - 4110 var_opcode_start equ 0x4110 - 468: - 4117 var_opcode_string equ 0x4117 - 469: - 4112 var_opcode_table equ 0x4112 - 470: - 4115 var_opcode_x equ 0x4115 - 471: - 4009 var_pio_present equ 0x4009 - 472: - 401B var_ps2mem equ 0x401B - 473: - 400B var_scratch equ 0x400B + 78: - 0040 IO_AY0_ADDR equ 0x40 + 79: - 0041 IO_AY0_DATA equ 0x41 + 80: - 0042 IO_AY1_ADDR equ 0x42 + 81: - 0043 IO_AY1_DATA equ 0x43 + 82: - 0020 IO_REG0 equ 0x20 + 83: - 0025 IO_RTC_AMPM equ 0x25 + 84: - 002D IO_RTC_CTR_D equ 0x2D + 85: - 002E IO_RTC_CTR_E equ 0x2E + 86: - 002F IO_RTC_CTR_F equ 0x2F + 87: - 0026 IO_RTC_DAY0 equ 0x26 + 88: - 0027 IO_RTC_DAY1 equ 0x27 + 89: - 0024 IO_RTC_HOUR equ 0x24 + 90: - 0022 IO_RTC_MIN0 equ 0x22 + 91: - 0023 IO_RTC_MIN1 equ 0x23 + 92: - 0028 IO_RTC_MON0 equ 0x28 + 93: - 0029 IO_RTC_MON1 equ 0x29 + 94: - 0020 IO_RTC_SEC0 equ 0x20 + 95: - 0021 IO_RTC_SEC1 equ 0x21 + 96: - 002C IO_RTC_WEEK equ 0x2C + 97: - 002B IO_RTC_YEAR1 equ 0x2B + 98: - 002A IO_RTC_YERR0 equ 0x2A + 99: - 43B8 MEM_FAT_AMOUNT equ 0x43B8 + 100: - 43BB MEM_FAT_CLUSTERLEN equ 0x43BB + 101: - 43BC MEM_FAT_COUNT1 equ 0x43BC + 102: - 43DF MEM_FAT_CURDIR equ 0x43DF + 103: - 443F MEM_FAT_CURRDIR equ 0x443F + 104: - 43C1 MEM_FAT_DATASTART equ 0x43C1 + 105: - 43CD MEM_FAT_DIRSEC equ 0x43CD + 106: - 43C9 MEM_FAT_FILEREMAIN equ 0x43C9 + 107: - 442F MEM_FAT_OF0_ATTRIBUTE equ 0x442F + 108: - 4431 MEM_FAT_OF0_CCLUST equ 0x4431 + 109: - 443B MEM_FAT_OF0_DATREM equ 0x443B + 110: - 4437 MEM_FAT_OF0_DATSEC equ 0x4437 + 111: - 4433 MEM_FAT_OF0_FATSEC equ 0x4433 + 112: - 43B6 MEM_FAT_RESERVED equ 0x43B6 + 113: - 43C5 MEM_FAT_ROOTSTART equ 0x43C5 + 114: - 43B9 MEM_FAT_SECTORS equ 0x43B9 + 115: - 43CF MEM_FAT_TMPFNAME equ 0x43CF + 116: - 43BD MEM_FAT_TMPPOINTER equ 0x43BD + 117: - 41B6 MEM_IDE_BUFFER equ 0x41B6 + 118: - 40CB MEM_IDE_DEVICE equ 0x40CB + 119: - 40D5 MEM_IDE_DEV_TABLE equ 0x40D5 + 120: - 43B6 MEM_IDE_FSBUFFER equ 0x43B6 + 121: - 40CD MEM_IDE_PARTITION equ 0x40CD + 122: - 40D1 MEM_IDE_POINTER equ 0x40D1 + 123: - 4115 MEM_IDE_SELECTED equ 0x4115 + 124: - 40CC MEM_IDE_STATUS equ 0x40CC + 125: - 4116 MEM_IDE_STRING_0 equ 0x4116 + 126: - 413E MEM_IDE_STRING_1 equ 0x413E + 127: - 4166 MEM_IDE_STRING_2 equ 0x4166 + 128: - 418E MEM_IDE_STRING_3 equ 0x418E + 129: - 0177 MSG_CLEAR equ 0x177 + 130: - 19BF NOT_IMPLEMENTED equ 0x19BF + 131: - 1A21 OP_CALL equ 0x1A21 + 132: - 1DF1 OP_CD equ 0x1DF1 + 133: - 1BB5 OP_CLR equ 0x1BB5 + 134: - 1AA2 OP_DASM equ 0x1AA2 + 135: - 1DED OP_DIR equ 0x1DED + 136: - 1A41 OP_DUMP equ 0x1A41 + 137: - 1A08 OP_EXEC equ 0x1A08 + 138: - 1B69 OP_IIC_IN equ 0x1B69 + 139: - 1B09 OP_IIC_OUT equ 0x1B09 + 140: - 1AD2 OP_IO_IN equ 0x1AD2 + 141: - 1AE8 OP_IO_OUT equ 0x1AE8 + 142: - 1DCA OP_LSDSK equ 0x1DCA + 143: - 1BB9 OP_RTIME equ 0x1BB9 + 144: - 1DCE OP_SELDSK equ 0x1DCE + 145: - 1A71 OP_SET equ 0x1A71 + 146: - 1D51 OP_STIME equ 0x1D51 + 147: - 1E43 POST_CHECK_APU equ 0x1E43 + 148: - 1E6E POST_CHECK_IDE_30 equ 0x1E6E + 149: - 1E81 POST_CHECK_IDE_40 equ 0x1E81 + 150: - 1E1E POST_CHECK_PIO equ 0x1E1E + 151: - 1E0E POST_START equ 0x1E0E + 152: - 1E9B POST_TEST_RTC equ 0x1E9B + 153: - 4110 PRG_RAM_START equ 0x4110 + 154: - FF00 PRG_RAM_TOP equ 0xFF00 + 155: - 0191 PRINTINLINE equ 0x191 + 156: - 4000 PROG_MEM_START equ 0x4000 + 157: - 0100 PROG_ROM_START equ 0x100 + 158: - 0000 RST_00 equ 0x00 + 159: - 0008 RST_08 equ 0x08 + 160: - 0010 RST_10 equ 0x10 + 161: - 0018 RST_18 equ 0x18 + 162: - FFFF STACK_RAM_TOP equ 0xFFFF + 163: - 0000 START_ROM equ 0x00 + 164: - 022D STRCONV_BYTES_TO_HEX equ 0x22D + 165: - 023C STRCONV_BYTES_TO_HEX_1 equ 0x23C + 166: - 0246 STRCONV_BYTES_TO_HEX_2 equ 0x246 + 167: - 256A STR_Banner_Start equ 0x256A + 168: - 183C STR_PD_HEADER equ 0x183C + 169: - 4010 SYS_BUF_START equ 0x4010 + 170: - 4000 SYS_RAM_START equ 0x4000 + 171: - 0018 VAR_CONSOLE_BAUD equ 0x18 + 172: - 000F VAR_CONSOLE_CONF equ 0x0F + 173: - 0080 VDP_MEM equ 0x80 + 174: - 0081 VDP_REG equ 0x81 + 175: - 19BE _COMMAND_PROCESS_FOUND equ 0x19BE + 176: - 1A40 _OP_CALL equ 0x1A40 + 177: - 1B4E _OP_IIC_ACK_ERR equ 0x1B4E + 178: - 1B55 _OP_IIC_ACK_ERR_str equ 0x1B55 + 179: - 1B9B _OP_IIC_IN_LOOP equ 0x1B9B + 180: - 1BA8 _OP_IIC_IN_LOOP_TEXT equ 0x1BA8 + 181: - 1B1F _OP_IIC_OUT_LOOP equ 0x1B1F + 182: - 1B3B _OP_IIC_OUT_SEND equ 0x1B3B + 183: - 1BBC _OP_RTIME_NN equ 0x1BBC + 184: - 1C74 _OP_RTIME_RD_CMD equ 0x1C74 + 185: - 1DDD _OP_SELDSK_INVALID equ 0x1DDD + 186: - 1DF5 _OP_SELDSK_INVALID_STR equ 0x1DF5 + 187: - 1A89 _OP_SET_LOOP equ 0x1A89 + 188: - 1D17 _OP_STIME_INVALID equ 0x1D17 + 189: - 1D2E _OP_STIME_PROMPT equ 0x1D2E + 190: - 1D46 _OP_STIME_PROMPT_ERR equ 0x1D46 + 191: - 1C75 _OP_STIME_STR_DAY equ 0x1C75 + 192: - 1CC6 _OP_STIME_STR_HOUR equ 0x1CC6 + 193: - 1CE1 _OP_STIME_STR_MIN equ 0x1CE1 + 194: - 1C90 _OP_STIME_STR_MON equ 0x1C90 + 195: - 1CFC _OP_STIME_STR_SEC equ 0x1CFC + 196: - 1CAB _OP_STIME_STR_YEAR equ 0x1CAB + 197: - 1E62 _POST_CHECK_APU_FAILED equ 0x1E62 + 198: - 1E94 _POST_CHECK_IDE_FAILED equ 0x1E94 + 199: - 1E37 _POST_CHECK_PIO_FAILED equ 0x1E37 + 200: - 1ED5 _POST_TEST_RTC_INVALID equ 0x1ED5 + 201: - 1ECE _POST_TEST_RTC_NOTFOUND equ 0x1ECE + 202: - 19E1 _STR_NOT_FOUND equ 0x19E1 + 203: - 19CD _STR_NOT_IMPLEMENTED equ 0x19CD + 204: - 19F5 _STR_SYNTAX equ 0x19F5 + 205: - 0DC2 _beep_pause_l1 equ 0xDC2 + 206: - 2302 _compare_filename_loop equ 0x2302 + 207: - 2310 _compare_filename_nomatch equ 0x2310 + 208: - 24B3 _fat_cd_navigate equ 0x24B3 + 209: - 24F9 _fat_cd_navigate_end equ 0x24F9 + 210: - 2521 _fat_cd_navigate_errfile equ 0x2521 + 211: - 2553 _fat_cd_navigate_errfile_str equ 0x2553 + 212: - 250B _fat_cd_navigate_error equ 0x250B + 213: - 2529 _fat_cd_navigate_error_str equ 0x2529 + 214: - 24B8 _fat_cd_navigate_findsec equ 0x24B8 + 215: - 24E4 _fat_cd_navigate_findsec_skipslash equ 0x24E4 + 216: - 246F _fat_cd_navigate_goback_fl equ 0x246F + 217: - 2519 _fat_cd_navigate_inerror equ 0x2519 + 218: - 2513 _fat_cd_navigate_inerrorS equ 0x2513 + 219: - 251A _fat_cd_navigate_inerrore equ 0x251A + 220: - 2540 _fat_cd_navigate_inputerr_str equ 0x2540 + 221: - 24EA _fat_cd_navigate_l2 equ 0x24EA + 222: - 20FA _fat_get_root_table_invalid equ 0x20FA + 223: - 2139 _fat_getfatsec_notroot equ 0x2139 + 224: - 2288 _fat_increment_32 equ 0x2288 + 225: - 2200 _fat_lfs_loop equ 0x2200 + 226: - 223A _fat_lfs_loop_compare_end equ 0x223A + 227: - 223E _fat_lfs_loop_compare_match equ 0x223E + 228: - 2212 _fat_lfs_loop_compare_next_sector equ 0x2212 + 229: - 229C _fat_math_add32 equ 0x229C + 230: - 22CD _fat_math_mul32 equ 0x22CD + 231: - 22D4 _fat_math_mul32_l equ 0x22D4 + 232: - 22E1 _fat_math_mul32_noadd equ 0x22E1 + 233: - 2274 _fat_math_sector_add_16 equ 0x2274 + 234: - 23F0 _fat_print_directory_dir equ 0x23F0 + 235: - 2383 _fat_print_directory_loop equ 0x2383 + 236: - 244D _fat_print_directory_loop_break equ 0x244D + 237: - 239F _fat_print_directory_loop_file equ 0x239F + 238: - 241B _fat_print_directory_loop_next equ 0x241B + 239: - 2426 _fat_print_directory_loop_next_sector equ 0x2426 + 240: - 2319 _format_filename_fat16_clean equ 0x2319 + 241: - 2320 _format_filename_fat16_loop equ 0x2320 + 242: - 2333 _format_filename_fat16_loop_copy equ 0x2333 + 243: - 232A _format_filename_fat16_loop_skip_8 equ 0x232A + 244: - 15AB _ideif_drv_sel_fail equ 0x15AB + 245: - 1668 _ideif_drv_sel_fstr0 equ 0x1668 + 246: - 165F _ideif_drv_sel_pstr equ 0x165F + 247: - 1676 _ideif_drv_sel_sstr0 equ 0x1676 + 248: - 1683 _ideif_drv_sel_syn equ 0x1683 + 249: - 146E _ideif_init_drive_found equ 0x146E + 250: - 1456 _ideif_init_drive_loop equ 0x1456 + 251: - 1469 _ideif_init_drive_nodrv equ 0x1469 + 252: - 14D9 _ideif_init_drive_prt_fnd equ 0x14D9 + 253: - 14C7 _ideif_init_drive_prt_l1 equ 0x14C7 + 254: - 14D1 _ideif_init_drive_prt_ln equ 0x14D1 + 255: - 15EB _ideif_prnt_devtable_hdr equ 0x15EB + 256: - 1366 _ideif_prnt_devtable_l1 equ 0x1366 + 257: - 142C _ideif_prnt_devtable_l1_e2 equ 0x142C + 258: - 13AB _ideif_prnt_devtable_l1_es equ 0x13AB + 259: - 1429 _ideif_prnt_devtable_l1_ms equ 0x1429 + 260: - 1373 _ideif_prnt_devtable_l1_nxt equ 0x1373 + 261: - 1399 _ideif_prnt_devtable_l1_s00 equ 0x1399 + 262: - 139E _ideif_prnt_devtable_l1_s01 equ 0x139E + 263: - 13A3 _ideif_prnt_devtable_l1_s02 equ 0x13A3 + 264: - 13A8 _ideif_prnt_devtable_l1_sFF equ 0x13A8 + 265: - 1371 _ideif_prnt_devtable_l1_sel equ 0x1371 + 266: - 164F _ideif_prnt_devtable_master equ 0x164F + 267: - 1623 _ideif_prnt_devtable_s00 equ 0x1623 + 268: - 162E _ideif_prnt_devtable_s01 equ 0x162E + 269: - 1639 _ideif_prnt_devtable_s02 equ 0x1639 + 270: - 1644 _ideif_prnt_devtable_sFF equ 0x1644 + 271: - 1657 _ideif_prnt_devtable_slave equ 0x1657 + 272: - 014E _read_bcd_invalid equ 0x14E + 273: - 1DC5 _shift4 equ 0x1DC5 + 274: - 0DA9 beep equ 0xDA9 + 275: - 0DAB beep_loop equ 0xDAB + 276: - 0DC1 beep_pause equ 0xDC1 + 277: - 22FE compare_filename equ 0x22FE + 278: - 09AE dasm_00 equ 0x9AE + 279: - 0C9A dasm_01 equ 0xC9A + 280: - 0A34 dasm_02 equ 0xA34 + 281: - 0C6C dasm_03 equ 0xC6C + 282: - 0AB1 dasm_08 equ 0xAB1 + 283: - 0C3F dasm_09 equ 0xC3F + 284: - 0A16 dasm_0A equ 0xA16 + 285: - 0C83 dasm_0B equ 0xC83 + 286: - 09F6 dasm_10 equ 0x9F6 + 287: - 0A3F dasm_12 equ 0xA3F + 288: - 09B9 dasm_18 equ 0x9B9 + 289: - 0A20 dasm_1A equ 0xA20 + 290: - 09D3 dasm_20 equ 0x9D3 + 291: - 0CE0 dasm_22 equ 0xCE0 + 292: - 0A79 dasm_27 equ 0xA79 + 293: - 09CC dasm_28 equ 0x9CC + 294: - 0CB1 dasm_2A equ 0xCB1 + 295: - 0A7D dasm_2F equ 0xA7D + 296: - 09C4 dasm_30 equ 0x9C4 + 297: - 0A4A dasm_32 equ 0xA4A + 298: - 0A89 dasm_37 equ 0xA89 + 299: - 09BD dasm_38 equ 0x9BD + 300: - 0A2A dasm_3A equ 0xA2A + 301: - 0A85 dasm_3F equ 0xA85 + 302: - 0A8D dasm_76 equ 0xA8D + 303: - 0B0A dasm_80C6 equ 0xB0A + 304: - 0AA7 dasm_BE equ 0xAA7 + 305: - 09B2 dasm_C3 equ 0x9B2 + 306: - 0B30 dasm_C88E equ 0xB30 + 307: - 0A02 dasm_C9 equ 0xA02 + 308: - 09FC dasm_CD equ 0x9FC + 309: - 0ABE dasm_D9 equ 0xABE + 310: - 09E4 dasm_DD equ 0x9E4 + 311: - 0CA1 dasm_DD_01 equ 0xCA1 + 312: - 0C5A dasm_DD_09 equ 0xC5A + 313: - 0CF6 dasm_DD_22 equ 0xCF6 + 314: - 0C71 dasm_DD_23 equ 0xC71 + 315: - 0CC8 dasm_DD_2A equ 0xCC8 + 316: - 0C88 dasm_DD_2B equ 0xC88 + 317: - 0C0A dasm_DD_34 equ 0xC0A + 318: - 0C27 dasm_DD_35 equ 0xC27 + 319: - 0B12 dasm_DD_86 equ 0xB12 + 320: - 0B38 dasm_DD_8E equ 0xB38 + 321: - 0B5B dasm_DD_96 equ 0xB5B + 322: - 0B7B dasm_DD_9E equ 0xB7B + 323: - 0B9C dasm_DD_A6 equ 0xB9C + 324: - 0BD3 dasm_DD_AE equ 0xBD3 + 325: - 0BB8 dasm_DD_B6 equ 0xBB8 + 326: - 0BEF dasm_DD_BE equ 0xBEF + 327: - 0D48 dasm_DD_E1 equ 0xD48 + 328: - 0ACE dasm_DD_E3 equ 0xACE + 329: - 0D32 dasm_DD_E5 equ 0xD32 + 330: - 0D18 dasm_DD_F9 equ 0xD18 + 331: - 0D42 dasm_E1 equ 0xD42 + 332: - 0AC2 dasm_E3 equ 0xAC2 + 333: - 0D2C dasm_E5 equ 0xD2C + 334: - 09DB dasm_E9 equ 0x9DB + 335: - 0C51 dasm_ED_42 equ 0xC51 + 336: - 0CEC dasm_ED_43 equ 0xCEC + 337: - 0A81 dasm_ED_44 equ 0xA81 + 338: - 0A0C dasm_ED_45 equ 0xA0C + 339: - 0A98 dasm_ED_46 equ 0xA98 + 340: - 0C48 dasm_ED_4A equ 0xC48 + 341: - 0CBD dasm_ED_4B equ 0xCBD + 342: - 0A07 dasm_ED_4D equ 0xA07 + 343: - 0A9D dasm_ED_56 equ 0xA9D + 344: - 0AA2 dasm_ED_5E equ 0xAA2 + 345: - 0AE6 dasm_ED_A0 equ 0xAE6 + 346: - 0AF8 dasm_ED_A1 equ 0xAF8 + 347: - 0AEF dasm_ED_A8 equ 0xAEF + 348: - 0B01 dasm_ED_A9 equ 0xB01 + 349: - 0AEA dasm_ED_B0 equ 0xAEA + 350: - 0AFC dasm_ED_B1 equ 0xAFC + 351: - 0AF3 dasm_ED_B8 equ 0xAF3 + 352: - 0B05 dasm_ED_B9 equ 0xB05 + 353: - 0A92 dasm_F3 equ 0xA92 + 354: - 0D0E dasm_F9 equ 0xD0E + 355: - 0A95 dasm_FB equ 0xA95 + 356: - 09ED dasm_FD equ 0x9ED + 357: - 0CA9 dasm_FD_01 equ 0xCA9 + 358: - 0C63 dasm_FD_09 equ 0xC63 + 359: - 0D02 dasm_FD_22 equ 0xD02 + 360: - 0C7A dasm_FD_23 equ 0xC7A + 361: - 0CD4 dasm_FD_2A equ 0xCD4 + 362: - 0C91 dasm_FD_2B equ 0xC91 + 363: - 0C16 dasm_FD_34 equ 0xC16 + 364: - 0C33 dasm_FD_35 equ 0xC33 + 365: - 0B21 dasm_FD_86 equ 0xB21 + 366: - 0B47 dasm_FD_8E equ 0xB47 + 367: - 0B67 dasm_FD_96 equ 0xB67 + 368: - 0B89 dasm_FD_9E equ 0xB89 + 369: - 0BA8 dasm_FD_A6 equ 0xBA8 + 370: - 0BDF dasm_FD_AE equ 0xBDF + 371: - 0BC3 dasm_FD_B6 equ 0xBC3 + 372: - 0BFA dasm_FD_BE equ 0xBFA + 373: - 0D50 dasm_FD_E1 equ 0xD50 + 374: - 0ADA dasm_FD_E3 equ 0xADA + 375: - 0D3A dasm_FD_E5 equ 0xD3A + 376: - 0D22 dasm_FD_F9 equ 0xD22 + 377: - 0A11 dasm_FF equ 0xA11 + 378: - 0D58 dasm_UU equ 0xD58 + 379: - 0D5C dasm_UW equ 0xD5C + 380: - 0B97 dasm__AND equ 0xB97 + 381: - 0BEB dasm__CP equ 0xBEB + 382: - 0C22 dasm__DEC equ 0xC22 + 383: - 0A69 dasm__ED_47 equ 0xA69 + 384: - 0A71 dasm__ED_4F equ 0xA71 + 385: - 0A59 dasm__ED_57 equ 0xA59 + 386: - 0A61 dasm__ED_5F equ 0xA61 + 387: - 0C05 dasm__INC equ 0xC05 + 388: - 0A55 dasm__LD equ 0xA55 + 389: - 0BB4 dasm__OR equ 0xBB4 + 390: - 0B73 dasm__SBC equ 0xB73 + 391: - 0B56 dasm__SUB equ 0xB56 + 392: - 0BCE dasm__XOR equ 0xBCE + 393: - 0556 dasm_opcode_table equ 0x556 + 394: - 0383 dasm_print16hex_addr equ 0x383 + 395: - 039B dasm_print8hex equ 0x39B + 396: - 0D61 dasm_printFlags_table equ 0xD61 + 397: - 0D71 dasm_printRegister8_table equ 0xD71 + 398: - 0D91 dasm_printRegister8_table_HL equ 0xD91 + 399: - 0D79 dasm_printRegisterIX_table equ 0xD79 + 400: - 0D81 dasm_printRegisterIY_table equ 0xD81 + 401: - 0D89 dasm_printRegisterSP_table equ 0xD89 + 402: - 0247 disassemble equ 0x247 + 403: - 032D disassemble_continue equ 0x32D + 404: - 031D disassemble_err equ 0x31D + 405: - 024B disassemble_next equ 0x24B + 406: - 031A disassemble_print_opcode_params_end equ 0x31A + 407: - 02C6 disassemble_print_opcode_params_loop equ 0x2C6 + 408: - 0288 disassemble_print_opcode_raw equ 0x288 + 409: - 029C disassemble_print_opcode_raw_fill equ 0x29C + 410: - 035F disassemble_table_first_match equ 0x35F + 411: - 0379 disassemble_table_found equ 0x379 + 412: - 037D disassemble_table_notfound equ 0x37D + 413: - 033B disassemble_table_seek equ 0x33B + 414: - 033F disassemble_table_seek_loop equ 0x33F + 415: - 17E1 dump_pretty equ 0x17E1 + 416: - 180B dump_pretty_ascii equ 0x180B + 417: - 1829 dump_pretty_ascii_cont equ 0x1829 + 418: - 1813 dump_pretty_ascii_loop equ 0x1813 + 419: - 1824 dump_pretty_ascii_none equ 0x1824 + 420: - 17FE dump_pretty_col equ 0x17FE + 421: - 183B dump_pretty_end equ 0x183B + 422: - 182F dump_pretty_nextrow equ 0x182F + 423: - 17E9 dump_pretty_row equ 0x17E9 + 424: - 019F endPrint equ 0x19F + 425: - 244F fat_cd_single equ 0x244F + 426: - 22F5 fat_copy_lba_pointer equ 0x22F5 + 427: - 202D fat_get_root_table equ 0x202D + 428: - 2122 fat_getfatsec equ 0x2122 + 429: - 21D3 fat_openfile equ 0x21D3 + 430: - 21DB fat_openfile_noprepare equ 0x21DB + 431: - 233A fat_print_directory equ 0x233A + 432: - 21A8 fat_readfilesec equ 0x21A8 + 433: - 22E6 fat_reset_pointer equ 0x22E6 + 434: - 2314 format_filename_fat16 equ 0x2314 + 435: - 0E89 ide_printerror equ 0xE89 + 436: - 0E15 ide_readsector_256 equ 0xE15 + 437: - 0E17 ide_readsector_256_waitloop equ 0xE17 + 438: - 0E3E ide_readsector_512_inv equ 0xE3E + 439: - 0E43 ide_readsector_512_inv_waitloop equ 0xE43 + 440: - 0E73 ide_readsector_timeout equ 0xE73 + 441: - 0DF7 ide_regread_8 equ 0xDF7 + 442: - 0DDB ide_regwrite_8 equ 0xDDB + 443: - 0DCE ide_reset equ 0xDCE + 444: - 0E88 ide_writesector_256 equ 0xE88 + 445: - 1573 ideif_drv_sel equ 0x1573 + 446: - 151C ideif_get_drv_pointer equ 0x151C + 447: - 1530 ideif_init_all equ 0x1530 + 448: - 133A ideif_init_devtable equ 0x133A + 449: - 144D ideif_init_drive equ 0x144D + 450: - 1358 ideif_prnt_devtable equ 0x1358 + 451: - 16F5 iic_init equ 0x16F5 + 452: - 1734 iic_read_ack equ 0x1734 + 453: - 16C6 iic_receive_buffer equ 0x16C6 + 454: - 16E9 iic_receive_buffer_done equ 0x16E9 + 455: - 16EF iic_receive_buffer_err equ 0x16EF + 456: - 16D7 iic_receive_buffer_loop equ 0x16D7 + 457: - 17BA iic_receive_byte equ 0x17BA + 458: - 17C7 iic_receive_byte_loop equ 0x17C7 + 459: - 175A iic_send_ack equ 0x175A + 460: - 169C iic_send_buffer equ 0x169C + 461: - 16BA iic_send_buffer_done equ 0x16BA + 462: - 16C0 iic_send_buffer_err equ 0x16C0 + 463: - 16AC iic_send_buffer_loop equ 0x16AC + 464: - 1794 iic_send_byte equ 0x1794 + 465: - 17A0 iic_send_byte_loop equ 0x17A0 + 466: - 1713 iic_send_ebit equ 0x1713 + 467: - 1777 iic_send_nack equ 0x1777 + 468: - 16FE iic_send_sbit equ 0x16FE + 469: - 0044 mon_var_template equ 0x44 + 470: - 040F mon_var_template_end equ 0x40F + 471: - 0194 nxtILC equ 0x194 + 472: - 03A9 param_01 equ 0x3A9 + 473: - 03D0 param_02 equ 0x3D0 + 474: - 03ED param_03 equ 0x3ED + 475: - 0425 param_03_done equ 0x425 + 476: - 040E param_03_neg equ 0x40E + 477: - 0429 param_04 equ 0x429 + 478: - 0439 param_04_i equ 0x439 + 479: - 043F param_05 equ 0x43F + 480: - 044C param_06 equ 0x44C + 481: - 0466 param_07 equ 0x466 + 482: - 0473 param_08 equ 0x473 + 483: - 0488 param_09 equ 0x488 + 484: - 048E param_09_0A equ 0x48E + 485: - 047F param_0A equ 0x47F + 486: - 049D param_10 equ 0x49D + 487: - 04AD param_11 equ 0x4AD + 488: - 04BC param_11_12 equ 0x4BC + 489: - 04DC param_11_12_all equ 0x4DC + 490: - 04CF param_11_12_def equ 0x4CF + 491: - 04D4 param_11_12_ix equ 0x4D4 + 492: - 04D9 param_11_12_iy equ 0x4D9 + 493: - 04B5 param_12 equ 0x4B5 + 494: - 04ED param_13 equ 0x4ED + 495: - 050C param_80 equ 0x50C + 496: - 0513 param_80_seek equ 0x513 + 497: - 0503 param_81 equ 0x503 + 498: - 0547 param_comma equ 0x547 + 499: - 0522 param_printRegister equ 0x522 + 500: - 0540 param_printRegisterA equ 0x540 + 501: - 0538 param_printRegisterHL equ 0x538 + 502: - 016A print_16_hex equ 0x16A + 503: - 0151 print_32_hex equ 0x151 + 504: - 010E print_a_hex equ 0x10E + 505: - 0120 print_bcd equ 0x120 + 506: - 00DE print_char equ 0xDE + 507: - 00F1 print_clear equ 0xF1 + 508: - 00F8 print_newLine equ 0xF8 + 509: - 01A4 print_reg equ 0x1A4 + 510: - 00E6 print_str equ 0xE6 + 511: - 00F0 print_str_end equ 0xF0 + 512: - 187B print_str_fixed equ 0x187B + 513: - 0103 print_wait_out equ 0x103 + 514: - 0138 read_bcd equ 0x138 + 515: - 0126 read_char equ 0x126 + 516: - 1543 read_lba_sector equ 0x1543 + 517: - 15E3 str_dev_done equ 0x15E3 + 518: - 15CB str_dev_waitready equ 0x15CB + 519: - 0EBC str_error_start equ 0xEBC + 520: - 0ED9 str_error_start1 equ 0xED9 + 521: - 0EE2 str_error_start2 equ 0xEE2 + 522: - 0EEB str_error_time equ 0xEEB + 523: - 1F2D str_post_apu equ 0x1F2D + 524: - 1EDC str_post_ide_30 equ 0x1EDC + 525: - 1EF7 str_post_ide_40 equ 0x1EF7 + 526: - 1F63 str_post_nd equ 0x1F63 + 527: - 1F9B str_post_ok equ 0x1F9B + 528: - 1F12 str_post_pio equ 0x1F12 + 529: - 1F48 str_post_rtc equ 0x1F48 + 530: - 1F71 str_post_rtc_iv equ 0x1F71 + 531: - 400A var_apu_present equ 0x400A + 532: - 4000 var_buffer_len equ 0x4000 + 533: - 411A var_bytes_count equ 0x411A + 534: - 4006 var_curserchar equ 0x4006 + 535: - 4007 var_curserlastaddr equ 0x4007 + 536: - 4005 var_curseron equ 0x4005 + 537: - 4004 var_curserstate equ 0x4004 + 538: - 4002 var_curserx equ 0x4002 + 539: - 4003 var_cursery equ 0x4003 + 540: - 402B var_dir equ 0x402B + 541: - 40CB var_idebuffer equ 0x40CB + 542: - 407B var_input equ 0x407B + 543: - 4001 var_last_char equ 0x4001 + 544: - 4114 var_opcode equ 0x4114 + 545: - 4116 var_opcode_length equ 0x4116 + 546: - 4119 var_opcode_pcount equ 0x4119 + 547: - 4110 var_opcode_start equ 0x4110 + 548: - 4117 var_opcode_string equ 0x4117 + 549: - 4112 var_opcode_table equ 0x4112 + 550: - 4115 var_opcode_x equ 0x4115 + 551: - 4009 var_pio_present equ 0x4009 + 552: - 401B var_ps2mem equ 0x401B + 553: - 400B var_scratch equ 0x400B **** test.asm **** - 2: - 8000 org 0x8000 + 2: - 6000 org 0x6000 3: - 4: - 8000 sel_dsk: - 5: 0+17 8000 CD5A82 call ideif_drv_sel - 6: 17+17 8003 CD3A80 call fat_print_dbg - 7: 34+10 8006 C9 ret - 8: - 9: - 8010 org 0x8010 - 10: 44+17 8010 CD3A80 call fat_print_dbg - 11: 61+10 8013 C9 ret - 12: - 13: - 8020 org 0x8020 - 14: 71+17 8020 CD8583 call fat_print_directory - 15: 88+10 8023 C9 ret - 16: - 17: - 8030 org 0x8030 - 18: 98+10 8030 210600 ld hl,0x0006 - 19: 108+16 8033 223543 ld (MEM_FAT_OF0_CCLUST),hl - 20: 124+17 8036 CDBB85 call fat_getfatsec - 21: 141+10 8039 C9 ret - 22: - 23: - 803A fat_print_dbg: - 24: 151+17 803A CD0C86 call PRINTINLINE - 25: - 803D 0A0D5054 db 10,13,"PTR.MEM_IDE_POINTER: 0x",0 - 522E4D45 - 4D5F4944 - 455F504F - 494E5445 - 523A2020 - 20203078 - 00 - 26: 168+14 805A DD213240 ld ix,MEM_IDE_POINTER - 27: 182+17 805E CD3482 call print_32_hex - 28: 199+17 8061 CD0C86 call PRINTINLINE - 29: - 8064 20207C20 db " | PTR.MEM_IDE_PARTITION: 0x",0 - 20505452 - 2E4D454D - 5F494445 - 5F504152 - 54495449 - 4F4E3A20 - 20203078 - 00 - 30: 216+14 8085 DD212E40 ld ix,MEM_IDE_PARTITION - 31: 230+17 8089 CD3482 call print_32_hex - 32: - 33: 247+17 808C CD0C86 call PRINTINLINE - 34: - 808F 0A0D5054 db 10,13,"PTR.MEM_FAT_TMPPOINTER: 0x",0 - 522E4D45 - 4D5F4641 - 545F544D - 50504F49 - 4E544552 - 3A203078 - 00 - 35: 264+14 80AC DD211D43 ld ix,MEM_FAT_TMPPOINTER - 36: 278+17 80B0 CD3482 call print_32_hex - 37: 295+17 80B3 CD0C86 call PRINTINLINE - 38: - 80B6 20207C20 db " | PTR.MEM_FAT_TMPPOINTER1: 0x",0 - 20505452 - 2E4D454D - 5F464154 - 5F544D50 - 504F494E - 54455231 - 3A203078 - 00 - 39: 312+14 80D7 DD212143 ld ix,MEM_FAT_TMPPOINTER1 - 40: 326+17 80DB CD3482 call print_32_hex - 41: - 42: 343+17 80DE CD0C86 call PRINTINLINE - 43: - 80E1 0A0D5641 db 10,13,"VAL.MEM_FAT_RESERVED: 0x",0 - 4C2E4D45 - 4D5F4641 - 545F5245 - 53455256 - 45443A20 - 20203078 - 00 - 44: 360+14 80FE DD211743 ld ix,MEM_FAT_RESERVED - 45: 374+17 8102 CD4D82 call print_16_hex - 46: 391+17 8105 CD0C86 call PRINTINLINE - 47: - 8108 20202020 db " | VAL.MEM_FAT_AMOUNT: 0x",0 - 20207C20 - 2056414C - 2E4D454D - 5F464154 - 5F414D4F - 554E543A - 20202020 - 20203078 - 00 - 48: 408+13 812D 3A1943 ld a,(MEM_FAT_AMOUNT) - 49: 421+17 8130 CD0701 call print_a_hex - 50: - 51: 438+17 8133 CD0C86 call PRINTINLINE - 52: - 8136 0A0D5641 db 10,13,"VAL.MEM_FAT_SECTORS: 0x",0 - 4C2E4D45 - 4D5F4641 - 545F5345 - 43544F52 - 533A2020 - 20203078 - 00 - 53: 455+14 8153 DD211A43 ld ix,MEM_FAT_SECTORS - 54: 469+17 8157 CD4D82 call print_16_hex - 55: 486+17 815A CD0C86 call PRINTINLINE - 56: - 815D 20202020 db " | VAL.MEM_FAT_COUNT1: 0x",0 - 20207C20 - 2056414C - 2E4D454D - 5F464154 - 5F434F55 - 4E54313A - 20202020 - 20203078 - 00 - 57: 503+13 8182 3A1C43 ld a,(MEM_FAT_COUNT1) - 58: 516+17 8185 CD0701 call print_a_hex - 59: - 60: 533+17 8188 CD0C86 call PRINTINLINE - 61: - 818B 0A0D5641 db 10,13,"VAL.MEM_FAT_OF0_CCLUST: 0x",0 - 4C2E4D45 - 4D5F4641 - 545F4F46 - 305F4343 - 4C555354 - 3A203078 - 00 - 62: 550+14 81A8 DD213543 ld ix,MEM_FAT_OF0_CCLUST - 63: 564+17 81AC CD4D82 call print_16_hex - 64: 581+17 81AF CD0C86 call PRINTINLINE - 65: - 81B2 20202020 db " | PTR.MEM_FAT_OF0_FATSEC: 0x",0 - 20207C20 - 20505452 - 2E4D454D - 5F464154 - 5F4F4630 - 5F464154 - 5345433A - 20203078 - 00 - 66: 598+14 81D7 DD213743 ld ix,MEM_FAT_OF0_FATSEC - 67: 612+17 81DB CD3482 call print_32_hex - 68: - 69: 629+17 81DE CD0C86 call PRINTINLINE - 70: - 81E1 0A0D5641 db 10,13,"VAL.MEM_FAT_OF0_DATSEC: 0x",0 - 4C2E4D45 - 4D5F4641 - 545F4F46 - 305F4441 - 54534543 - 3A203078 - 00 - 71: 646+14 81FE DD213B43 ld ix,MEM_FAT_OF0_DATSEC - 72: 660+17 8202 CD3482 call print_32_hex - 73: 677+17 8205 CD0C86 call PRINTINLINE - 74: - 8208 20207C20 db " | PTR.MEM_FAT_OF0_DATREM: 0x",0 - 20505452 - 2E4D454D - 5F464154 - 5F4F4630 - 5F444154 - 52454D3A - 20203078 - 00 - 75: 694+14 8229 DD213F43 ld ix,MEM_FAT_OF0_DATREM - 76: 708+17 822D CD4D82 call print_16_hex - 77: - 78: 725+17 8230 CDF100 call print_newLine - 79: 742+10 8233 C9 ret - 80: - 81: - 8234 print_32_hex: - 82: 752+19 8234 DD7E03 ld a,(ix+3) - 83: 771+17 8237 CD0701 call print_a_hex - 84: 788+19 823A DD7E02 ld a,(ix+2) - 85: 807+17 823D CD0701 call print_a_hex - 86: 824+19 8240 DD7E01 ld a,(ix+1) - 87: 843+17 8243 CD0701 call print_a_hex - 88: 860+19 8246 DD7E00 ld a,(ix+0) - 89: 879+17 8249 CD0701 call print_a_hex - 90: 896+10 824C C9 ret - 91: - 92: - 824D print_16_hex: - 93: 906+19 824D DD7E01 ld a,(ix+1) - 94: 925+17 8250 CD0701 call print_a_hex - 95: 942+19 8253 DD7E00 ld a,(ix+0) - 96: 961+17 8256 CD0701 call print_a_hex - 97: 978+10 8259 C9 ret - 98: - 99: ; a contains drive to select - 100: ; populate fs vars as well - 101: - 825A ideif_drv_sel: - 102: 988+13 825A 327640 ld (MEM_IDE_SELECTED),a - 103: 1001+11 825D F5 push af - 104: 1012+17 825E CD9714 call ideif_get_drv_pointer ;test if drive is marked as available - 105: 1029+19 8261 DD7E00 ld a,(ix+0) - 106: 1048+4 8264 B7 or a - 107: 1052+10 8265 C28882 jp nz, _ideif_drv_sel_fail ;if not-> fail - 108: - 109: 1062+17 8268 CD0B83 call fat_get_root_table ;else get root table - 110: ;backup tmp pointer - 111: 1079+16 826B 2A3240 ld hl,(MEM_IDE_POINTER) - 112: 1095+20 826E ED5B2E40 ld de,(MEM_IDE_PARTITION) ;use MEM_IDE_PARTITION to backup the pointer - 113: 1115+17 8272 CD5485 call fat_copy_lba_pointer - 114: 1132+10 8275 21A482 ld hl,[_ideif_drv_sel_pstr] ;print success message - 115: 1142+17 8278 CDDF00 call print_str - 116: 1159+10 827B F1 pop af - 117: 1169+7 827C C645 add 69 - 118: 1176+17 827E CDD700 call print_char - 119: 1193+10 8281 21BB82 ld hl,[_ideif_drv_sel_sstr0] - 120: 1203+17 8284 CDDF00 call print_str - 121: 1220+10 8287 C9 ret - 122: - 8288 _ideif_drv_sel_fail: - 123: 1230+10 8288 21A482 ld hl,[_ideif_drv_sel_pstr] - 124: 1240+17 828B CDDF00 call print_str - 125: 1257+10 828E F1 pop af - 126: 1267+7 828F C645 add 69 - 127: 1274+17 8291 CDD700 call print_char - 128: 1291+10 8294 21AD82 ld hl,[_ideif_drv_sel_fstr0] - 129: 1301+17 8297 CDDF00 call print_str - 130: 1318+10 829A 112000 LD DE,0x20 - 131: 1328+10 829D 017000 LD BC,0x70 - 132: 1338+17 82A0 CD170D CALL beep - 133: 1355+10 82A3 C9 ret - 134: - 135: - 82A4 _ideif_drv_sel_pstr: - 136: - 82A4 0A0D4472 db 10,13,"Drive ",0 - 69766520 - 00 - 137: - 82AD _ideif_drv_sel_fstr0: - 138: - 82AD 3A206E6F db ": not ready",10,13,0 - 74207265 - 6164790A - 0D00 - 139: - 82BB _ideif_drv_sel_sstr0: - 140: - 82BB 3A207365 db ": selected",10,13,0 - 6C656374 - 65640A0D - 00 - 141: - 82C8 _ideif_drv_sel_syn: - 142: - 82C8 0A0D496E db 10,13,"Invalid drive letter",10,13,0 - 76616C69 - 64206472 - 69766520 - 6C657474 - 65720A0D - 00 - 143: .include "fat16.s" ;include monitor symbols. -**** include/fat16.s **** - 1: ; VARS - 2: - 3: - 4317 phase MEM_IDE_FSBUFFER - 4: - 4317 MEM_FAT_RESERVED: ; Reserved sectors (2byte) - 5: - 4317 ..4318 00 defs 2 - 6: - 4319 MEM_FAT_AMOUNT: ; Amount of FATs (1byte) - 7: - 4319 ..4319 00 defs 1 - 8: - 431A MEM_FAT_SECTORS: ; Length of FAT (2byte) - 9: - 431A ..431B 00 defs 2 - 10: - 431C MEM_FAT_COUNT1: ; Counter Var for reading FAT (2byte) - 11: - 431C ..431C 00 defs 1 - 12: - 431D MEM_FAT_TMPPOINTER: ; Temporary working pointer - 13: - 431D ..4320 00 defs 4 - 14: - 4321 MEM_FAT_TMPPOINTER1: ; Temporary working pointer - 15: - 4321 ..4324 00 defs 4 - 16: - 4325 MEM_FAT_TMPFNAME: ; Temporary filename - 17: - 4325 ..4334 00 defs 16 + 4: - 4015 MEM_FAT_EXEC_CURR .equ var_scratch+10 + 5: - 4017 MEM_FAT_EXEC_COUNT .equ var_scratch+12 + 6: - 4019 MEM_FAT_EXEC_START .equ var_scratch+14 + 7: - 6000 fat_exec: + 8: 0+10 6000 118140 ld de,[var_input+6] ;prepare input like to mimic rom behaviour + 9: 10+11 6003 D5 push de + 10: ;DE has pointer to arguments + 11: 21+17 6004 CDD321 call fat_openfile + 12: 38+4 6007 B7 or a + 13: 42+10 6008 C29A60 jp nz, _fat_exec_notfound ;if not found, abort + 14: ;call fat_print_dbg + 15: ;load header + 16: 52+10 600B 11B641 ld de, MEM_IDE_BUFFER + 17: 62+17 600E CDA821 call fat_readfilesec 18: - 19: - 4335 MEM_FAT_OF0_CCLUST: ;Current cluster of file - 20: - 4335 0000 defw 0 - 21: - 4337 MEM_FAT_OF0_FATSEC: ;Current sector in FAT - 22: - 4337 ..433A 00 defs 4 - 23: - 433B MEM_FAT_OF0_DATSEC: ;Current sector in Data - 24: - 433B ..433E 00 defs 4 - 25: - 433F MEM_FAT_OF0_DATREM: ;Remaining sector in Data - 26: - 433F ..4340 00 defs 2 + 19: + 20: ;ld hl, MEM_IDE_BUFFER ;print sector + 21: ;ld b,0x20 + 22: ;call dump_pretty + 23: + 24: 79+13 6011 3AB641 ld a,(MEM_IDE_BUFFER) + 25: 92+7 6014 FEC3 cp 0xC3 + 26: 99+10 6016 C2B260 jp nz, _fat_exec_notexec 27: - 28: - 29: - 830B dephase - 30: - 31: ;------------------------------------- - 32: ; Get FAT Root-Table position - 33: ;------------------------------------- - 34: - 830B fat_get_root_table: - 35: 1365+17 830B CD4585 call fat_reset_pointer ;reset fat pointer - 36: - 37: ;call fat_print_dbg - 38: ; Load first sector on active partition - 39: 1382+10 830E 213240 LD HL, MEM_IDE_POINTER ; pointer to LBA address - 40: 1392+7 8311 3E01 LD A,1 ;read 1 sector - 41: 1399+17 8313 CDBE14 call read_lba_sector - 42: - 43: ; check for valid Boot sector - 44: 1416+13 8316 3A1741 ld a,(MEM_IDE_BUFFER) - 45: 1429+7 8319 FEEB cp 0xEB ;first byte should be 0xEB - 46: 1436+10 831B C25D83 jp nz, _fat_get_root_table_invalid - 47: - 48: ;debug sector - 49: ;ld hl, MEM_IDE_BUFFER - 50: ;ld b,20 - 51: ;call dump_pretty - 52: - 53: ; Read and store FS Properties - 54: 1446+14 831E DD211741 LD IX,MEM_IDE_BUFFER - 55: 1460+19 8322 DD7E0E LD A,(IX+0x0E) - 56: 1479+13 8325 321743 LD (MEM_FAT_RESERVED),A - 57: 1492+19 8328 DD7E0F LD A,(IX+0x0F) - 58: 1511+13 832B 321843 LD (MEM_FAT_RESERVED+1),A - 59: 1524+19 832E DD7E10 LD A,(IX+0x10) - 60: 1543+13 8331 321943 LD (MEM_FAT_AMOUNT),A - 61: 1556+19 8334 DD7E16 LD A,(IX+0x16) - 62: 1575+13 8337 321A43 LD (MEM_FAT_SECTORS),A - 63: 1588+19 833A DD7E17 LD A,(IX+0x17) - 64: 1607+13 833D 321B43 LD (MEM_FAT_SECTORS+1),A + 28: 109+17 6019 CD9101 call PRINTINLINE + 29: - 601C 0A0D4C6F db 10,13,"Loading ",0 + 6164696E + 672000 + 30: 126+10 6027 218140 ld hl,[var_input+6] + 31: 136+17 602A CDE600 call print_str + 32: 153+17 602D CD9101 call PRINTINLINE + 33: - 6030 20746F20 db " to 0x",0 + 307800 + 34: ;get start address + 35: 170+20 6037 ED4BC041 ld bc,(MEM_IDE_BUFFER + 10) + 36: 190+4 603B 78 ld a,b + 37: 194+17 603C CD0E01 call print_a_hex + 38: 211+4 603F 79 ld a,c + 39: 215+17 6040 CD0E01 call print_a_hex + 40: 232+17 6043 CD9101 call PRINTINLINE + 41: - 6046 202E2E2E db " ... ",0 + 2000 + 42: ;bc has start addr + 43: 249+20 604C ED431540 ld (MEM_FAT_EXEC_CURR),bc + 44: 269+20 6050 ED431940 ld (MEM_FAT_EXEC_START),bc + 45: + 46: ;get amount of sectors to load + 47: 289+16 6054 2AC441 ld hl,(MEM_IDE_BUFFER + 14) + 48: 305+4 6057 6C ld l,h + 49: 309+8 6058 CB3D srl l + 50: 317+7 605A 2600 ld h,0 ;divide by 512 + 51: 324+6 605C 23 inc hl ;increment because first sector is always loaded + 52: ; hl contains sector count + 53: 330+16 605D 221740 ld (MEM_FAT_EXEC_COUNT), hl + 54: + 55: 346+10 6060 D1 pop de ; restore filename + 56: 356+17 6061 CDD321 call fat_openfile ;reset file information + 57: ;start reading + 58: - 6064 _fat_exec_readloop1: + 59: 373+20 6064 ED5B1540 ld de,(MEM_FAT_EXEC_CURR) + 60: 393+17 6068 CDA821 call fat_readfilesec + 61: 410+16 606B 2A1540 ld hl,(MEM_FAT_EXEC_CURR) + 62: 426+10 606E 110002 ld de,512 + 63: 436+11 6071 19 add hl,de + 64: 447+16 6072 221540 ld (MEM_FAT_EXEC_CURR),hl 65: - 66: ;Get Root FAT - 67: 1620+13 8340 3A1B43 LD A, (MEM_FAT_SECTORS+1) ; load FAT Sector size to DE - 68: 1633+4 8343 57 LD D,A - 69: 1637+13 8344 3A1A43 LD A, (MEM_FAT_SECTORS) - 70: 1650+4 8347 5F LD E,A - 71: 1654+4 8348 AF XOR A ; clear HL - 72: 1658+4 8349 67 LD H,A - 73: 1662+4 834A 6F LD L,A - 74: 1666+13 834B 3A1943 LD A,(MEM_FAT_AMOUNT) ; Load counter for multiplication - 75: 1679+4 834E 47 LD B,A - 76: - 834F _fat_get_root_table_loop: ; multiply - 77: 1683+11 834F 19 ADD HL,DE - 78: 1694+8+5 8350 10FD DJNZ _fat_get_root_table_loop + 66: 463+16 6075 2A1740 ld hl,(MEM_FAT_EXEC_COUNT) + 67: 479+6 6078 2B dec hl + 68: 485+16 6079 221740 ld (MEM_FAT_EXEC_COUNT),hl + 69: 501+4 607C 7C ld a,h + 70: 505+4 607D B5 or l + 71: 509+7+5 607E 2802 jr z, _fat_exec_read_done + 72: 516+12 6080 18E2 jr _fat_exec_readloop1 + 73: - 6082 _fat_exec_read_done: + 74: 528+17 6082 CD9101 call PRINTINLINE + 75: - 6085 4C6F6164 db "Load complete!",10,13,0 + 20636F6D + 706C6574 + 65210A0D + 00 + 76: 545+16 6096 2A1940 ld hl,(MEM_FAT_EXEC_START) + 77: 561+4 6099 E9 jp (hl) + 78: 79: - 80: ; add reserved sectors - 81: 1702+7 8352 1600 LD D,0 - 82: 1709+13 8354 3A1743 LD A,(MEM_FAT_RESERVED) - 83: 1722+4 8357 5F LD E,A - 84: 1726+11 8358 19 ADD HL,DE - 85: - 86: ; add - 87: 1737+17 8359 CD0085 call _fat_math_sector_add_16 - 88: 1754+10 835C C9 ret - 89: - 90: - 835D _fat_get_root_table_invalid: - 91: 1764+17 835D CD0C86 call PRINTINLINE - 92: - 8360 0A0D4361 db 10,13,"Cannot find boot sector.",10,13,0 - 6E6E6F74 - 2066696E - 6420626F - 6F742073 - 6563746F - 722E0A0D - 00 - 93: 1781+17 837D CD9714 call ideif_get_drv_pointer - 94: 1798+19 8380 DD360002 ld (ix+0),0x02 - 95: 1817+10 8384 C9 ret - 96: - 97: ;------------------------------------- - 98: ; Print current fat directory of MEM_IDE_POINTER - 99: ;------------------------------------- - 100: - 8385 fat_print_directory: - 101: - 102: 1827+20 8385 ED5B1A43 LD DE,(MEM_FAT_SECTORS) - 103: 1847+20 8389 ED531C43 LD (MEM_FAT_COUNT1),DE - 104: 1867+10 838D 213240 LD HL,MEM_IDE_POINTER ;read first sector - 105: 1877+7 8390 0601 LD B,1 - 106: 1884+17 8392 CDBE14 call read_lba_sector - 107: - 108: 1901+17 8395 CD0C86 call PRINTINLINE - 109: - 8398 0A0D2020 db 10,13," Filename Cluster Size",10,13,0 - 46696C65 - 6E616D65 - 20202020 - 20436C75 - 73746572 - 2053697A - 650A0D00 - 110: - 111: 1918+10 83B8 211741 LD HL, MEM_IDE_BUFFER ;set buffer start - 112: 1928+7 83BB 0E10 LD C,16 ;set entries counter - 113: - 114: - 83BD _fat_print_directory_loop: ;loop over each entry (32byte) - 115: 1935+7 83BD 7E LD A,(HL) ; check first byte - 116: 1942+11 83BE E5 PUSH HL ;backup start of entry - 117: 1953+14 83BF DDE1 POP IX - 118: 1967+11 83C1 E5 PUSH HL - 119: ;ignore unwanted entries - 120: 1978+7 83C2 FE41 CP 0x41 ;skip invisible - 121: 1985+10 83C4 CA6384 JP Z, _fat_print_directory_loop_next - 122: 1995+7 83C7 FEE5 CP 0xE5 ;skip deleted - 123: 2002+10 83C9 CA6384 JP Z, _fat_print_directory_loop_next - 124: 2012+7 83CC FE00 CP 0x00 ;reached end - 125: 2019+10 83CE CA9484 JP Z, _fat_print_directory_loop_break - 126: - 127: ;check file attribute - 128: 2029+19 83D1 DD7E0B ld a,(IX+0x0B) - 129: 2048+7 83D4 FE10 cp 0x10 ;if subdirectors - 130: 2055+10 83D6 CA3184 jp z, _fat_print_directory_dir ;print dir - 131: ;else print file - 132: - 83D9 _fat_print_directory_loop_file - 133: ;print filename - 134: 2065+7 83D9 3E20 ld a,' ' - 135: 2072+17 83DB CDD700 call print_char - 136: 2089+7 83DE 3E20 ld a,' ' - 137: 2096+17 83E0 CDD700 call print_char - 138: 2113+7 83E3 0608 LD B,8 - 139: 2120+17 83E5 CD6317 call print_str_fixed - 140: 2137+7 83E8 3E2E ld A,'.' - 141: 2144+17 83EA CDD700 call print_char - 142: 2161+7 83ED 0603 LD B,3 - 143: 2168+17 83EF CD6317 call print_str_fixed - 144: - 145: 2185+17 83F2 CD0C86 call PRINTINLINE - 146: - 83F5 20307800 db " 0x",0 - 147: ;first cluster number - 148: 2202+19 83F9 DD7E1B ld a,(ix+0x1B) - 149: 2221+17 83FC CD0701 call print_a_hex - 150: 2238+19 83FF DD7E1A ld a,(ix+0x1A) - 151: 2257+17 8402 CD0701 call print_a_hex - 152: 2274+17 8405 CD0C86 call PRINTINLINE - 153: - 8408 20203078 db " 0x",0 - 00 - 154: 2291+19 840D DD7E1F ld a,(ix+0x1F) - 155: 2310+17 8410 CD0701 call print_a_hex - 156: 2327+19 8413 DD7E1E ld a,(ix+0x1E) - 157: 2346+17 8416 CD0701 call print_a_hex - 158: 2363+19 8419 DD7E1D ld a,(ix+0x1D) - 159: 2382+17 841C CD0701 call print_a_hex - 160: 2399+19 841F DD7E1C ld a,(ix+0x1C) - 161: 2418+17 8422 CD0701 call print_a_hex - 162: - 163: 2435+7 8425 3E0A LD A,10 ;New line - 164: 2442+17 8427 CDD700 CALL print_char - 165: 2459+7 842A 3E0D LD A,13 - 166: 2466+17 842C CDD700 CALL print_char - 167: 2483+12 842F 1832 jr _fat_print_directory_loop_next - 168: - 8431 _fat_print_directory_dir - 169: 2495+7 8431 3E44 ld a,'D' - 170: 2502+17 8433 CDD700 call print_char - 171: 2519+7 8436 3E20 ld a,' ' - 172: 2526+17 8438 CDD700 call print_char - 173: 2543+7 843B 0608 LD B,8 - 174: 2550+17 843D CD6317 call print_str_fixed - 175: 2567+17 8440 CD0C86 call PRINTINLINE - 176: - 8443 20202020 db " 0x",0 - 20307800 - 177: ;first cluster number - 178: 2584+19 844B DD7E1B ld a,(ix+0x1B) - 179: 2603+17 844E CD0701 call print_a_hex - 180: 2620+19 8451 DD7E1A ld a,(ix+0x1A) - 181: 2639+17 8454 CD0701 call print_a_hex - 182: - 183: 2656+7 8457 3E0A LD A,10 ;New line - 184: 2663+17 8459 CDD700 CALL print_char - 185: 2680+7 845C 3E0D LD A,13 - 186: 2687+17 845E CDD700 CALL print_char - 187: 2704+12 8461 1800 jr _fat_print_directory_loop_next - 188: - 189: - 8463 _fat_print_directory_loop_next: ; read next entry - 190: 2716+4 8463 0D DEC C ;next sector after 32 entries - 191: 2720+7+5 8464 2808 JR Z,_fat_print_directory_loop_next_sector - 192: 2727+10 8466 E1 POP HL ;restore start - 193: 2737+10 8467 112000 LD DE, 32 ;length of entry - 194: 2747+11 846A 19 ADD HL,DE ;increment - 195: 2758+10 846B C3BD83 JP _fat_print_directory_loop - 196: - 197: - 846E _fat_print_directory_loop_next_sector: ; end fo sector. read next sector from disk - 198: 2768+10 846E E1 POP HL ;clear stack from old hl - 199: 2778+7 846F 2600 LD H,0 - 200: 2785+7 8471 2E01 LD L,1 - 201: 2792+17 8473 CD0085 call _fat_math_sector_add_16 ;increment sector - 202: - 203: 2809+20 8476 ED5B1C43 LD DE,(MEM_FAT_COUNT1) ; decrement sector count (max FAT length) - 204: 2829+6 847A 1B DEC DE - 205: 2835+20 847B ED531C43 LD (MEM_FAT_COUNT1),DE - 206: 2855+4 847F 7A LD A,D - 207: 2859+4 8480 B3 OR E - 208: 2863+10 8481 CA9584 JP Z, _fat_print_directory_loop_break_dirty ; if DE is 0, mmax is reached. End here - 209: - 210: 2873+10 8484 213240 LD HL,MEM_IDE_POINTER ;read next sector - 211: 2883+7 8487 0601 LD B,1 - 212: 2890+17 8489 CDBE14 call read_lba_sector - 213: - 214: 2907+10 848C 211741 LD HL, MEM_IDE_BUFFER ;set buffer start - 215: 2917+7 848F 0E10 LD C,16 ;set entries counter - 216: 2924+10 8491 C3BD83 JP _fat_print_directory_loop - 217: - 218: - 8494 _fat_print_directory_loop_break - 219: 2934+10 8494 E1 POP HL - 220: - 8495 _fat_print_directory_loop_break_dirty - 221: ; ld hl, [str_sum] - 222: ; call print_str ;print - 223: ; ld a,c - 224: ; call print_a_hex - 225: ; ld hl, [str_files] - 226: ; call print_str ;print - 227: 2944+10 8495 C9 ret - 228: - 229: ;------------------------------------- - 230: ; FAT locate file startcluster - 231: ; - 232: ; DE pointer to file name - 233: ;------------------------------------- - 234: - 8496 fat_lfs: - 235: 2954+11 8496 D5 PUSH DE - 236: 2965+10 8497 212543 LD HL,[MEM_FAT_TMPFNAME] ; prepare filename - 237: 2975+17 849A CD7385 CALL format_filename_fat16 - 238: - 239: 2992+7 849D 3E10 LD A,16 ;init counter for FAT sectors - 240: 2999+13 849F 321C43 LD (MEM_FAT_COUNT1),A - 241: - 242: 3012+10 84A2 213240 LD HL,MEM_IDE_POINTER ;read first sector - 243: 3022+7 84A5 0601 LD B,1 - 244: 3029+17 84A7 CDBE14 call read_lba_sector - 245: - 246: 3046+10 84AA 211741 LD HL, MEM_IDE_BUFFER ;set buffer start - 247: 3056+7 84AD 0E10 LD C,16 ;set entries counter - 248: - 249: - 84AF _fat_lfs_loop: - 250: 3063+10 84AF D1 POP DE - 251: 3073+11 84B0 D5 PUSH DE - 252: 3084+17 84B1 CD5D85 CALL compare_filename - 253: 3101+7+5 84B4 3833 JR C, _fat_lfs_loop_compare_match ;on match - 254: - 255: ; prepare next entry - 256: 3108+4 84B6 0D DEC C ;next sector after 16 entries - 257: 3112+7+5 84B7 2807 JR Z,_fat_lfs_loop_compare_next_sector - 258: 3119+10 84B9 112000 LD DE, 32 ;length of entry - 259: 3129+11 84BC 19 ADD HL,DE ;increment - 260: 3140+10 84BD C3AF84 JP _fat_lfs_loop - 261: - 262: - 84C0 _fat_lfs_loop_compare_next_sector: - 263: 3150+7 84C0 2600 LD H,0 - 264: 3157+7 84C2 2E01 LD L,1 - 265: 3164+17 84C4 CD0085 call _fat_math_sector_add_16 ;increment sector - 266: 3181+13 84C7 3A1C43 LD A,(MEM_FAT_COUNT1) ; decrement sector count (max FAT length) - 267: 3194+4 84CA 3D DEC A - 268: 3198+13 84CB 321C43 LD (MEM_FAT_COUNT1),A - 269: 3211+10 84CE CAE184 JP Z, _fat_lfs_loop_compare_end ; if DE is 0, mmax is reached. End here - 270: ;call print_a_hex - 271: - 272: 3221+10 84D1 213240 LD HL,MEM_IDE_POINTER ;read next sector - 273: 3231+7 84D4 0601 LD B,1 - 274: 3238+17 84D6 CDBE14 call read_lba_sector - 275: - 276: 3255+10 84D9 211741 LD HL, MEM_IDE_BUFFER ;set buffer start - 277: 3265+7 84DC 0E10 LD C,16 ;set entries counter - 278: 3272+10 84DE C3AF84 JP _fat_lfs_loop - 279: - 280: - 84E1 _fat_lfs_loop_compare_end: - 281: 3282+10 84E1 D1 POP DE - 282: 3292+10 84E2 219885 LD HL, [str_file_notfound] - 283: 3302+17 84E5 CDDF00 CALL print_str ;print - 284: 3319+10 84E8 C9 RET - 285: - 286: - 84E9 _fat_lfs_loop_compare_match: - 287: ; get entry - 288: 3329+10 84E9 D1 POP DE - 289: 3339+7 84EA 0608 LD B,8 - 290: 3346+17 84EC CD6317 call print_str_fixed - 291: 3363+7 84EF 3E2E ld A,'.' - 292: 3370+17 84F1 CDD700 call print_char - 293: 3387+7 84F4 0603 LD B,3 - 294: 3394+17 84F6 CD6317 call print_str_fixed - 295: - 296: 3411+10 84F9 21AA85 LD HL, [str_file_found] - 297: 3421+17 84FC CDDF00 CALL print_str ;print - 298: - 299: 3438+10 84FF C9 RET - 300: - 301: - 302: - 303: ;=================== UTIL Functions =========================== - 304: ; 32 Bit addition to pointer - 305: ; HL has value - 306: - 8500 _fat_math_sector_add_16: - 307: 3448+16 8500 221D43 ld (MEM_FAT_TMPPOINTER), hl - 308: 3464+4 8503 AF xor a - 309: 3468+13 8504 321F43 ld (MEM_FAT_TMPPOINTER+2),a - 310: 3481+13 8507 322043 ld (MEM_FAT_TMPPOINTER+3),a - 311: - 312: 3494+10 850A 111D43 ld de,[MEM_FAT_TMPPOINTER] - 313: 3504+10 850D 013240 ld bc,[MEM_IDE_POINTER] - 314: 3514+17 8510 CD1485 call _fat_math_add32 - 315: 3531+10 8513 C9 ret - 316: - 317: ;bc contains pointer to a (also result) - 318: ;de contains pointer to b - 319: - 8514 _fat_math_add32 - 320: 3541+11 8514 E5 push hl - 321: 3552+11 8515 C5 push bc - 322: 3563+11 8516 D5 push de - 323: 3574+7 8517 1A ld a,(de) ; load lower 16bit for B int from (DE) to HL - 324: 3581+4 8518 6F ld l,a - 325: 3585+6 8519 13 inc de - 326: 3591+7 851A 1A ld a,(de) - 327: 3598+4 851B 67 ld h,a - 328: 3602+6 851C 13 inc de - 329: ; HL, DE dirty - 330: 3608+7 851D 0A ld a,(bc) ; load lower 16bit for A int from (BC) to DE - 331: 3615+4 851E 5F ld e,a - 332: 3619+6 851F 03 inc bc - 333: 3625+7 8520 0A ld a,(bc) - 334: 3632+4 8521 57 ld d,a - 335: ; HL now contains A, DE now contains D - 336: 3636+11 8522 19 add hl,de ;add lower bytes, store carry - 337: 3647+10 8523 D1 pop de ;restore pointers - 338: 3657+10 8524 C1 pop bc ;both now cointain first byte of long-value - 339: 3667+4 8525 7D ld a,l ;store lower result in (bc) - 340: 3671+7 8526 02 ld (bc),a - 341: 3678+6 8527 03 inc bc - 342: 3684+4 8528 7C ld a,h - 343: 3688+7 8529 02 ld (bc),a - 344: 3695+6 852A 03 inc bc - 345: 3701+6 852B 13 inc de ;also increment de to next byte - 346: 3707+6 852C 13 inc de - 347: ; DE and HL now start at the upper byte - 348: 3713+11 852D C5 push bc - 349: 3724+11 852E D5 push de - 350: 3735+7 852F 1A ld a,(de) ; load upper 16bit for B - 351: 3742+4 8530 6F ld l,a - 352: 3746+6 8531 13 inc de - 353: 3752+7 8532 1A ld a,(de) - 354: 3759+4 8533 67 ld h,a - 355: 3763+6 8534 13 inc de - 356: 3769+7 8535 0A ld a,(bc) ; load upper 16bit for A - 357: 3776+4 8536 5F ld e,a - 358: 3780+6 8537 03 inc bc - 359: 3786+7 8538 0A ld a,(bc) - 360: 3793+4 8539 57 ld d,a - 361: 3797+15 853A ED5A adc hl,de ;add upper bytes, store carry - 362: 3812+10 853C D1 pop de - 363: 3822+10 853D C1 pop bc - 364: 3832+4 853E 7D ld a,l ;store lower result in (bc) - 365: 3836+7 853F 02 ld(bc),a - 366: 3843+6 8540 03 inc bc - 367: 3849+4 8541 7C ld a,h - 368: 3853+7 8542 02 ld(bc),a - 369: 3860+10 8543 E1 pop hl - 370: 3870+10 8544 C9 ret - 371: - 372: ; reset LBA pointer to first sector in selected partition - 373: - 8545 fat_reset_pointer: - 374: 3880+17 8545 CD9714 call ideif_get_drv_pointer - 375: 3897+10 8548 DD23 inc ix - 376: 3907+10 854A DD23 inc ix - 377: 3917+15 854C DDE5 push ix - 378: 3932+10 854E E1 pop hl ;copy poiter to hl - 379: 3942+10 854F 113240 ld de, MEM_IDE_POINTER - 380: 3952+12 8552 1800 jr fat_copy_lba_pointer - 381: - 382: ; resets LBA pointer (4-byte) to partition start - 383: ; HL = from here - 384: ; DE = to this destimation - 385: - 8554 fat_copy_lba_pointer: - 386: 3964+11 8554 C5 PUSH BC - 387: 3975+7 8555 0600 LD B,0 - 388: 3982+7 8557 0E04 LD C,4 - 389: 3989+16+5 8559 EDB0 LDIR - 390: 4005+10 855B C1 POP BC - 391: 4015+10 855C C9 ret - 392: - 393: ; compares filenames - 394: ; HL points to name1 - 395: ; DE points to name2 - 396: ; Carry is set if match - 397: ; Destroys DE, AF - 398: - 855D compare_filename: - 399: 4025+11 855D E5 PUSH HL - 400: 4036+11 855E C5 PUSH BC - 401: 4047+7 855F 060B LD B, 11 ;Counter - 402: - 8561 _compare_filename_loop: - 403: 4054+7 8561 1A LD A,(DE) - 404: 4061+4 8562 4F LD C,A - 405: 4065+7 8563 7E LD A,(HL) - 406: 4072+4 8564 A9 XOR C ;check if identical (should return 0) - 407: 4076+7+5 8565 2007 JR NZ, _compare_filename_nomatch - 408: 4083+4 8567 05 DEC B ;decrement counter - 409: 4087+7+5 8568 20F7 JR NZ, _compare_filename_loop ;if not last, continue - 410: 4094+10 856A C1 POP BC ;if last, it matches - 411: 4104+10 856B E1 POP HL - 412: 4114+4 856C 37 SCF - 413: 4118+10 856D C9 RET - 414: - 856E _compare_filename_nomatch: - 415: 4128+10 856E C1 POP BC - 416: 4138+10 856F E1 POP HL - 417: 4148+4 8570 37 SCF - 418: 4152+4 8571 3F CCF - 419: 4156+10 8572 C9 RET - 420: - 421: ; formats filename to 8+3 format - 422: ; DE points to source filename to string - 423: ; HL points to destination - 424: - 8573 format_filename_fat16: - 425: 4166+7 8573 060B LD B, 11 ;counter - 426: 4173+11 8575 E5 PUSH HL - 427: 4184+4 8576 AF XOR A - 428: - 8577 _format_filename_fat16_clean: - 429: 4188+7 8577 77 LD (HL),A - 430: 4195+6 8578 23 INC HL - 431: 4201+8+5 8579 10FC DJNZ _format_filename_fat16_clean - 432: 4209+10 857B E1 POP HL ; continue with copy - 433: 4219+7 857C 060D LD B, 13 - 434: - 857E _format_filename_fat16_loop: - 435: 4226+7 857E 1A LD A, (DE) ; load byte - 436: 4233+4 857F B7 OR A - 437: 4237+5+6 8580 C8 RET Z ;exit on 0byte - 438: 4242+4 8581 05 DEC B ;reduce counter - 439: 4246+5+6 8582 C8 RET Z ;exit after 12 bytes 8+.+3 - 440: 4251+7 8583 FE2E CP '.' ; check if dot - 441: 4258+7+5 8585 200A JR NZ, _format_filename_fat16_loop_copy ; if not continue as usual - 442: 4265+6 8587 13 INC DE ;else skip char - 443: - 8588 _format_filename_fat16_loop_skip_8: - 444: 4271+4 8588 78 LD A,B - 445: 4275+7 8589 FE05 CP 5 - 446: 4282+7+5 858B 38F1 JR C, _format_filename_fat16_loop - 447: 4289+6 858D 23 INC HL - 448: 4295+4 858E 05 DEC B - 449: 4299+12 858F 18F7 JR _format_filename_fat16_loop_skip_8 - 450: - 451: - 8591 _format_filename_fat16_loop_copy: - 452: 4311+7 8591 1A LD A, (DE) ; load byte - 453: 4318+7 8592 77 LD (HL), A ; copy byte - 454: 4325+6 8593 23 INC HL - 455: 4331+6 8594 13 INC DE - 456: 4337+10 8595 C37E85 JP _format_filename_fat16_loop - 457: - 458: - 8598 str_file_notfound: - 459: - 8598 46696C65 db "File not found!",13,10,0 - 206E6F74 - 20666F75 - 6E64210D - 0A00 - 460: - 461: - 85AA str_file_found: -**** test.asm **** - 144: - 85AA 2046696C db " File located!",13,10,0 - 65206C6F - 63617465 - 64210D0A - 00 - 145: .include "fat16_file.s" ;include monitor symbols. -**** include/fat16_file.s **** - 1: - 2: - 3: ;1. find sector for given cluster - 4: ;2. read sector - 5: ;3. store first data sector to MEM_FAT_OF0_DATSEC - 6: ;4. set MEM_FAT_OF0_DATREM to amount uf sectors per cluster - 7: ;5. find next cluster in FAt and update MEM_FAT_OF0_CCLUST - 8: - 9: - 10: ; gets sector in FAT table for the cluster stored in MEM_FAT_OF0_CCLUST - 11: ; store result in MEM_FAT_OF0_FATSEC - 12: - 85BB fat_getfatsec: - 13: 4347+16 85BB 2A3543 ld HL,(MEM_FAT_OF0_CCLUST) ;load cluster - 14: ;each sector contains 256 clusters - 15: ;first 8bits are not needed (/256) - 16: - 17: 4363+4 85BE 7C ld a,h ;divide by 256 - 18: 4367+4 85BF 6F ld l,a - 19: 4371+4 85C0 AF xor a - 20: 4375+4 85C1 67 ld h,a - 21: - 22: 4379+20 85C2 ED4B1743 ld bc,(MEM_FAT_RESERVED) ;add reserved sectors - 23: 4399+11 85C6 09 add hl,bc - 24: 4410+16 85C7 223743 ld(MEM_FAT_OF0_FATSEC+0),hl;store sector to MEM_FAT_TMPPOINTER1 - 25: 4426+4 85CA AF xor a - 26: 4430+13 85CB 323943 ld(MEM_FAT_OF0_FATSEC+2),a - 27: 4443+13 85CE 323A43 ld(MEM_FAT_OF0_FATSEC+3),a - 28: - 29: 4456+17 85D1 CD9714 call ideif_get_drv_pointer - 30: 4473+10 85D4 DD23 inc ix - 31: 4483+10 85D6 DD23 inc ix - 32: 4493+15 85D8 DDE5 push ix - 33: 4508+10 85DA D1 pop de ;copy poiter to hl - 34: 4518+10 85DB 013743 ld bc,[MEM_FAT_OF0_FATSEC] - 35: 4528+17 85DE CD1485 call _fat_math_add32 ;MEM_FAT_OF0_FATSEC now contains the correct sector - 36: ;in the FAT - 37: - 38: 4545+17 85E1 CD3A80 call fat_print_dbg - 39: - 40: ;read FAT sector - 41: 4562+10 85E4 213743 ld hl,MEM_FAT_OF0_FATSEC ;read next sector - 42: 4572+7 85E7 0601 ld b,1 - 43: 4579+17 85E9 CDBE14 call read_lba_sector - 44: - 45: 4596+10 85EC 211741 ld hl, MEM_IDE_BUFFER - 46: 4606+7 85EF 0614 ld b,20 - 47: 4613+17 85F1 CDC916 call dump_pretty - 48: - 49: ;calculate offset address - 50: 4630+13 85F4 3A3543 ld a,(MEM_FAT_OF0_CCLUST) - 51: 4643+4 85F7 17 RLA ;shift to left (x2) - 52: 4647+4 85F8 6F ld l, a - 53: 4651+7 85F9 3E00 ld a,0 - 54: 4658+4 85FB 17 RLA ;shift in carry flag - 55: 4662+4 85FC 67 ld h,a - 56: 4666+10 85FD 111741 ld de,MEM_IDE_BUFFER - 57: 4676+11 8600 19 add hl,de - 58: ;copy pointer - 59: 4687+10 8601 113543 ld de,MEM_FAT_OF0_CCLUST - 60: 4697+16 8604 EDA0 ldi ;copy byte for next cluster from FAT - 61: 4713+16 8606 EDA0 ldi - 62: - 63: - 64: 4729+17 8608 CD3A80 call fat_print_dbg - 65: - 66: 4746+10 860B C9 ret - 67: ;store data - 68: -**** test.asm **** - 146: - 147: ;------------------------------------------------------------------------------ - 148: ; PRINTINLINE - 149: ; - 150: ; String output function - 151: ; - 152: ; Prints in-line data (bytes immediately following the PRINTINLINE call) - 153: ; until a string terminator is encountered (0 - null char). - 154: ;------------------------------------------------------------------------------ - 155: - 860C PRINTINLINE: - 156: 4756+19 860C E3 EX (SP),HL ; PUSH HL and put RET ADDress into HL - 157: 4775+11 860D F5 PUSH AF - 158: 4786+11 860E C5 PUSH BC - 159: - 860F nxtILC: - 160: 4797+7 860F 7E LD A,(HL) - 161: 4804+7 8610 FE00 CP 0 - 162: 4811+7+5 8612 2806 JR Z,endPrint - 163: 4818+17 8614 CDD700 CALL print_char - 164: 4835+6 8617 23 INC HL - 165: 4841+12 8618 18F5 JR nxtILC - 166: - 861A endPrint: - 167: 4853+6 861A 23 INC HL ; Get past "null" terminator - 168: 4859+10 861B C1 POP BC - 169: 4869+10 861C F1 POP AF - 170: 4879+19 861D E3 EX (SP),HL ; PUSH new RET ADDress on stack and restore HL -**** test.asm **** - 171: 4898+10 861E C9 RET + 80: - 609A _fat_exec_notfound: + 81: 565+17 609A CD9101 call PRINTINLINE + 82: - 609D 0A0D4669 db 10,13,"File not found!",10,13,0 + 6C65206E + 6F742066 + 6F756E64 + 210A0D00 + 83: 582+10 60B1 C9 ret + 84: + 85: - 60B2 _fat_exec_notexec: + 86: 592+17 60B2 CD9101 call PRINTINLINE + 87: - 60B5 0A0D4669 db 10,13,"File is not an executable!",10,13,0 + 6C652069 + 73206E6F + 7420616E + 20657865 + 63757461 + 626C6521 + 0A0D00 + 88: 609+10 60D4 C9 ret + 89: + 90: + 91: + 92: - 60D5 _test_loop: + 93: 619+17 60D5 CDA821 call fat_readfilesec + 94: 636+11 60D8 F5 push af + 95: 647+10 60D9 21B641 ld hl, MEM_IDE_BUFFER ;print sector + 96: 657+7 60DC 0620 ld b,0x20 + 97: 664+17 60DE CDE117 call dump_pretty + 98: ;call PRINTINLINE + 99: ;db 10,13,"SECREAD",10,13,0 + 100: 681+10 60E1 F1 pop af + 101: 691+4 60E2 B7 or a + 102: 695+10 60E3 CAD560 jp z, _test_loop + 103: + 104: ;check if end of file + 105: + 106: + 107: 705+10 60E6 C9 ret @@ -1316,35 +686,35 @@ Statistics: 4 passes 0 jr promotions - 525 symbols - 1534 bytes + 559 symbols + 231 bytes Symbol Table: ADDR_RTC =D0 208 -A_RTS_OFF = 152 338 -A_RTS_ON = 15B 347 +A_RTS_OFF = 17F 383 +A_RTS_ON = 188 392 BOOT_PHASE0 =50 80 BOOT_PHASE1 =6E 110 BOOT_PHASE1_LOOP=77 119 -BOOT_PHASE2 =82 130 -COMMAND =17EB 6123 -COMMAND_BACKSPACE=1826 6182 -COMMAND_LUT =176B 5995 -COMMAND_PROCESS=184C 6220 -COMMAND_PROCESS_FOUND=1887 6279 -COMMAND_PROCESS_LOOP=184F 6223 -COMMAND_PROCESS_LOOP_STR1=1858 6232 -COMMAND_PROCESS_LOOP_STR2=186E 6254 -COMMAND_PROCESS_NEXT_ENTRY=1873 6259 -COMMAND_PROCESS_NEXT_ENTRYI=1872 6258 -COMMAND_PROCESS_NOT_FOUND=187E 6270 -COMMAND_READ =17F7 6135 -CONSOLE_INIT =9E 158 -CONSOLE_INIT_CTC=9E 158 -CONSOLE_INIT_SIO=A6 166 +BOOT_PHASE2 =89 137 +COMMAND =190E 6414 +COMMAND_BACKSPACE=194F 6479 +COMMAND_LUT =1883 6275 +COMMAND_PROCESS=1975 6517 +COMMAND_PROCESS_FOUND=19B0 6576 +COMMAND_PROCESS_LOOP=1978 6520 +COMMAND_PROCESS_LOOP_STR1=1981 6529 +COMMAND_PROCESS_LOOP_STR2=1997 6551 +COMMAND_PROCESS_NEXT_ENTRY=199C 6556 +COMMAND_PROCESS_NEXT_ENTRYI=199B 6555 +COMMAND_PROCESS_NOT_FOUND=19A7 6567 +COMMAND_READ =1920 6432 +CONSOLE_INIT =A5 165 +CONSOLE_INIT_CTC=A5 165 +CONSOLE_INIT_SIO=AD 173 CS_APU_CTRL =F9 249 CS_APU_DATA =F8 248 CS_BANK =00 0 @@ -1365,18 +735,18 @@ CS_SIO_A_C =09 9 CS_SIO_A_D =08 8 CS_SIO_B_C =0B 11 CS_SIO_B_D =0A 10 -DHEX_TO_BYTE = 164 356 -DHEX_TO_BYTE_FAILED= 180 384 -ERR_SYNTAX =189D 6301 -EXEC_RST_08 = D04 3332 -EXEC_RST_10 = D08 3336 -EXEC_RST_18 = D14 3348 -HEX_TO_BIN = 184 388 -HEX_TO_BIN_2 = 192 402 -HEX_TO_INVALID_2= 199 409 +DHEX_TO_BYTE = 1F6 502 +DHEX_TO_BYTE_FAILED= 212 530 +ERR_SYNTAX =19C6 6598 +EXEC_RST_08 = D96 3478 +EXEC_RST_10 = D9A 3482 +EXEC_RST_18 = DA6 3494 +HEX_TO_BIN = 216 534 +HEX_TO_BIN_2 = 224 548 +HEX_TO_INVALID_2= 22B 555 IDE_CMD_IDENT =EC 236 IDE_CMD_READSEC=20 32 -IDE_DEV_TABLE =1275 4725 +IDE_DEV_TABLE =12FA 4858 IDE_RD =40 64 IDE_REG_ALTSTS =16 22 IDE_REG_CMDSTS =0F 15 @@ -1397,7 +767,6 @@ IDE_WR =20 32 IIC_CLK =01 1 IIC_DATA =02 2 INT_VEC =1B 27 -IN_BUFFER =402B 16427 IO_AY0_ADDR =40 64 IO_AY0_DATA =41 65 IO_AY1_ADDR =42 66 @@ -1419,54 +788,66 @@ IO_RTC_SEC1 =21 33 IO_RTC_WEEK =2C 44 IO_RTC_YEAR1 =2B 43 IO_RTC_YERR0 =2A 42 -MEM_FAT_AMOUNT 4319 17177 -MEM_FAT_COUNT1 431C 17180 -MEM_FAT_OF0_CCLUST 4335 17205 -MEM_FAT_OF0_DATREM 433F 17215 -MEM_FAT_OF0_DATSEC 433B 17211 -MEM_FAT_OF0_FATSEC 4337 17207 -MEM_FAT_RESERVED 4317 17175 -MEM_FAT_SECTORS 431A 17178 -MEM_FAT_TMPFNAME 4325 17189 -MEM_FAT_TMPPOINTER 431D 17181 -MEM_FAT_TMPPOINTER1 4321 17185 -MEM_IDE_BUFFER =4117 16663 -MEM_IDE_DEVICE =402C 16428 -MEM_IDE_DEV_TABLE=4036 16438 -MEM_IDE_FSBUFFER=4317 17175 -MEM_IDE_PARTITION=402E 16430 -MEM_IDE_POINTER=4032 16434 -MEM_IDE_SELECTED=4076 16502 -MEM_IDE_STATUS =402D 16429 -MEM_IDE_STRING_0=4077 16503 -MEM_IDE_STRING_1=409F 16543 -MEM_IDE_STRING_2=40C7 16583 -MEM_IDE_STRING_3=40EF 16623 -MSG_CLEAR = 14A 330 -NOT_IMPLEMENTED=1896 6294 -OP_CALL =18F8 6392 -OP_CLR =1A8C 6796 -OP_DASM =1979 6521 -OP_DUMP =1918 6424 -OP_EXEC =18DF 6367 -OP_IIC_IN =1A40 6720 -OP_IIC_OUT =19E0 6624 -OP_IO_IN =19A9 6569 -OP_IO_OUT =19BF 6591 -OP_LSDSK =1CA1 7329 -OP_RTIME =1A90 6800 -OP_SELDSK =1CA5 7333 -OP_SET =1948 6472 -OP_STIME =1C28 7208 -POST_CHECK_APU =1D12 7442 -POST_CHECK_IDE_30=1D3D 7485 -POST_CHECK_IDE_40=1D50 7504 -POST_CHECK_PIO =1CED 7405 -POST_START =1CDD 7389 -POST_TEST_RTC =1D6A 7530 +MEM_FAT_AMOUNT =43B8 17336 +MEM_FAT_CLUSTERLEN=43BB 17339 +MEM_FAT_COUNT1 =43BC 17340 +MEM_FAT_CURDIR =43DF 17375 +MEM_FAT_CURRDIR=443F 17471 +MEM_FAT_DATASTART=43C1 17345 +MEM_FAT_DIRSEC =43CD 17357 +MEM_FAT_EXEC_COUNT=4017 16407 +MEM_FAT_EXEC_CURR=4015 16405 +MEM_FAT_EXEC_START=4019 16409 +MEM_FAT_FILEREMAIN=43C9 17353 +MEM_FAT_OF0_ATTRIBUTE=442F 17455 +MEM_FAT_OF0_CCLUST=4431 17457 +MEM_FAT_OF0_DATREM=443B 17467 +MEM_FAT_OF0_DATSEC=4437 17463 +MEM_FAT_OF0_FATSEC=4433 17459 +MEM_FAT_RESERVED=43B6 17334 +MEM_FAT_ROOTSTART=43C5 17349 +MEM_FAT_SECTORS=43B9 17337 +MEM_FAT_TMPFNAME=43CF 17359 +MEM_FAT_TMPPOINTER=43BD 17341 +MEM_IDE_BUFFER =41B6 16822 +MEM_IDE_DEVICE =40CB 16587 +MEM_IDE_DEV_TABLE=40D5 16597 +MEM_IDE_FSBUFFER=43B6 17334 +MEM_IDE_PARTITION=40CD 16589 +MEM_IDE_POINTER=40D1 16593 +MEM_IDE_SELECTED=4115 16661 +MEM_IDE_STATUS =40CC 16588 +MEM_IDE_STRING_0=4116 16662 +MEM_IDE_STRING_1=413E 16702 +MEM_IDE_STRING_2=4166 16742 +MEM_IDE_STRING_3=418E 16782 +MSG_CLEAR = 177 375 +NOT_IMPLEMENTED=19BF 6591 +OP_CALL =1A21 6689 +OP_CD =1DF1 7665 +OP_CLR =1BB5 7093 +OP_DASM =1AA2 6818 +OP_DIR =1DED 7661 +OP_DUMP =1A41 6721 +OP_EXEC =1A08 6664 +OP_IIC_IN =1B69 7017 +OP_IIC_OUT =1B09 6921 +OP_IO_IN =1AD2 6866 +OP_IO_OUT =1AE8 6888 +OP_LSDSK =1DCA 7626 +OP_RTIME =1BB9 7097 +OP_SELDSK =1DCE 7630 +OP_SET =1A71 6769 +OP_STIME =1D51 7505 +POST_CHECK_APU =1E43 7747 +POST_CHECK_IDE_30=1E6E 7790 +POST_CHECK_IDE_40=1E81 7809 +POST_CHECK_PIO =1E1E 7710 +POST_START =1E0E 7694 +POST_TEST_RTC =1E9B 7835 PRG_RAM_START =4110 16656 PRG_RAM_TOP =FF00 65280 -PRINTINLINE 860C 34316 +PRINTINLINE = 191 401 PROG_MEM_START =4000 16384 PROG_ROM_START = 100 256 RST_00 =00 0 @@ -1475,359 +856,380 @@ RST_10 =10 16 RST_18 =18 24 STACK_RAM_TOP =FFFF 65535 START_ROM =00 0 -STRCONV_BYTES_TO_HEX= 19B 411 -STRCONV_BYTES_TO_HEX_1= 1AA 426 -STRCONV_BYTES_TO_HEX_2= 1B4 436 -STR_Banner_Start=1E6F 7791 -STR_PD_HEADER =1724 5924 +STRCONV_BYTES_TO_HEX= 22D 557 +STRCONV_BYTES_TO_HEX_1= 23C 572 +STRCONV_BYTES_TO_HEX_2= 246 582 +STR_Banner_Start=256A 9578 +STR_PD_HEADER =183C 6204 SYS_BUF_START =4010 16400 SYS_RAM_START =4000 16384 VAR_CONSOLE_BAUD=18 24 VAR_CONSOLE_CONF=0F 15 VDP_MEM =80 128 VDP_REG =81 129 -_COMMAND_PROCESS_FOUND=1895 6293 -_OP_CALL =1917 6423 -_OP_IIC_ACK_ERR=1A25 6693 -_OP_IIC_ACK_ERR_str=1A2C 6700 -_OP_IIC_IN_LOOP=1A72 6770 -_OP_IIC_IN_LOOP_TEXT=1A7F 6783 -_OP_IIC_OUT_LOOP=19F6 6646 -_OP_IIC_OUT_SEND=1A12 6674 -_OP_RTIME_NN =1A93 6803 -_OP_RTIME_RD_CMD=1B4B 6987 -_OP_SELDSK_INVALID=1CB4 7348 -_OP_SELDSK_INVALID_STR=1CC4 7364 -_OP_SET_LOOP =1960 6496 -_OP_STIME_INVALID=1BEE 7150 -_OP_STIME_PROMPT=1C05 7173 -_OP_STIME_PROMPT_ERR=1C1D 7197 -_OP_STIME_STR_DAY=1B4C 6988 -_OP_STIME_STR_HOUR=1B9D 7069 -_OP_STIME_STR_MIN=1BB8 7096 -_OP_STIME_STR_MON=1B67 7015 -_OP_STIME_STR_SEC=1BD3 7123 -_OP_STIME_STR_YEAR=1B82 7042 -_POST_CHECK_APU_FAILED=1D31 7473 -_POST_CHECK_IDE_FAILED=1D63 7523 -_POST_CHECK_PIO_FAILED=1D06 7430 -_POST_TEST_RTC_INVALID=1DA4 7588 -_POST_TEST_RTC_NOTFOUND=1D9D 7581 -_STR_NOT_FOUND =18B8 6328 -_STR_NOT_IMPLEMENTED=18A4 6308 -_STR_SYNTAX =18CC 6348 -_beep_pause_l1 = D30 3376 -_compare_filename_loop 8561 34145 -_compare_filename_nomatch 856E 34158 -_fat_get_root_table_invalid 835D 33629 -_fat_get_root_table_loop 834F 33615 -_fat_lfs_loop 84AF 33967 -_fat_lfs_loop_compare_end 84E1 34017 -_fat_lfs_loop_compare_match 84E9 34025 -_fat_lfs_loop_compare_next_sector 84C0 33984 -_fat_math_add32 8514 34068 -_fat_math_sector_add_16 8500 34048 -_fat_print_directory_dir 8431 33841 -_fat_print_directory_loop 83BD 33725 -_fat_print_directory_loop_break 8494 33940 -_fat_print_directory_loop_break_dirty 8495 33941 -_fat_print_directory_loop_file 83D9 33753 -_fat_print_directory_loop_next 8463 33891 -_fat_print_directory_loop_next_sector 846E 33902 -_format_filename_fat16_clean 8577 34167 -_format_filename_fat16_loop 857E 34174 -_format_filename_fat16_loop_copy 8591 34193 -_format_filename_fat16_loop_skip_8 8588 34184 -_ideif_drv_sel_fail 8288 33416 -_ideif_drv_sel_fstr0 82AD 33453 -_ideif_drv_sel_pstr 82A4 33444 -_ideif_drv_sel_sstr0 82BB 33467 -_ideif_drv_sel_syn 82C8 33480 -_ideif_init_drive_found=13E9 5097 -_ideif_init_drive_loop=13D1 5073 -_ideif_init_drive_nodrv=13E4 5092 -_ideif_init_drive_prt_fnd=1454 5204 -_ideif_init_drive_prt_l1=1442 5186 -_ideif_init_drive_prt_ln=144C 5196 -_ideif_prnt_devtable_hdr=1510 5392 -_ideif_prnt_devtable_l1=12E1 4833 -_ideif_prnt_devtable_l1_e2=13A7 5031 -_ideif_prnt_devtable_l1_es=1326 4902 -_ideif_prnt_devtable_l1_ms=13A4 5028 -_ideif_prnt_devtable_l1_nxt=12EE 4846 -_ideif_prnt_devtable_l1_s00=1314 4884 -_ideif_prnt_devtable_l1_s01=1319 4889 -_ideif_prnt_devtable_l1_s02=131E 4894 -_ideif_prnt_devtable_l1_sFF=1323 4899 -_ideif_prnt_devtable_l1_sel=12EC 4844 -_ideif_prnt_devtable_master=1574 5492 -_ideif_prnt_devtable_s00=1548 5448 -_ideif_prnt_devtable_s01=1553 5459 -_ideif_prnt_devtable_s02=155E 5470 -_ideif_prnt_devtable_sFF=1569 5481 -_ideif_prnt_devtable_slave=157C 5500 -_read_bcd_invalid= 147 327 -_shift4 =1C9C 7324 -beep = D17 3351 -beep_loop = D19 3353 -beep_pause = D2F 3375 -compare_filename 855D 34141 -dasm_00 = 91C 2332 -dasm_01 = C08 3080 -dasm_02 = 9A2 2466 -dasm_03 = BDA 3034 -dasm_08 = A1F 2591 -dasm_09 = BAD 2989 -dasm_0A = 984 2436 -dasm_0B = BF1 3057 -dasm_10 = 964 2404 -dasm_12 = 9AD 2477 -dasm_18 = 927 2343 -dasm_1A = 98E 2446 -dasm_20 = 941 2369 -dasm_22 = C4E 3150 -dasm_27 = 9E7 2535 -dasm_28 = 93A 2362 -dasm_2A = C1F 3103 -dasm_2F = 9EB 2539 -dasm_30 = 932 2354 -dasm_32 = 9B8 2488 -dasm_37 = 9F7 2551 -dasm_38 = 92B 2347 -dasm_3A = 998 2456 -dasm_3F = 9F3 2547 -dasm_76 = 9FB 2555 -dasm_80C6 = A78 2680 -dasm_BE = A15 2581 -dasm_C3 = 920 2336 -dasm_C88E = A9E 2718 -dasm_C9 = 970 2416 -dasm_CD = 96A 2410 -dasm_D9 = A2C 2604 -dasm_DD = 952 2386 -dasm_DD_01 = C0F 3087 -dasm_DD_09 = BC8 3016 -dasm_DD_22 = C64 3172 -dasm_DD_23 = BDF 3039 -dasm_DD_2A = C36 3126 -dasm_DD_2B = BF6 3062 -dasm_DD_34 = B78 2936 -dasm_DD_35 = B95 2965 -dasm_DD_86 = A80 2688 -dasm_DD_8E = AA6 2726 -dasm_DD_96 = AC9 2761 -dasm_DD_9E = AE9 2793 -dasm_DD_A6 = B0A 2826 -dasm_DD_AE = B41 2881 -dasm_DD_B6 = B26 2854 -dasm_DD_BE = B5D 2909 -dasm_DD_E1 = CB6 3254 -dasm_DD_E3 = A3C 2620 -dasm_DD_E5 = CA0 3232 -dasm_DD_F9 = C86 3206 -dasm_E1 = CB0 3248 -dasm_E3 = A30 2608 -dasm_E5 = C9A 3226 -dasm_E9 = 949 2377 -dasm_ED_42 = BBF 3007 -dasm_ED_43 = C5A 3162 -dasm_ED_44 = 9EF 2543 -dasm_ED_45 = 97A 2426 -dasm_ED_46 = A06 2566 -dasm_ED_4A = BB6 2998 -dasm_ED_4B = C2B 3115 -dasm_ED_4D = 975 2421 -dasm_ED_56 = A0B 2571 -dasm_ED_5E = A10 2576 -dasm_ED_A0 = A54 2644 -dasm_ED_A1 = A66 2662 -dasm_ED_A8 = A5D 2653 -dasm_ED_A9 = A6F 2671 -dasm_ED_B0 = A58 2648 -dasm_ED_B1 = A6A 2666 -dasm_ED_B8 = A61 2657 -dasm_ED_B9 = A73 2675 -dasm_F3 = A00 2560 -dasm_F9 = C7C 3196 -dasm_FB = A03 2563 -dasm_FD = 95B 2395 -dasm_FD_01 = C17 3095 -dasm_FD_09 = BD1 3025 -dasm_FD_22 = C70 3184 -dasm_FD_23 = BE8 3048 -dasm_FD_2A = C42 3138 -dasm_FD_2B = BFF 3071 -dasm_FD_34 = B84 2948 -dasm_FD_35 = BA1 2977 -dasm_FD_86 = A8F 2703 -dasm_FD_8E = AB5 2741 -dasm_FD_96 = AD5 2773 -dasm_FD_9E = AF7 2807 -dasm_FD_A6 = B16 2838 -dasm_FD_AE = B4D 2893 -dasm_FD_B6 = B31 2865 -dasm_FD_BE = B68 2920 -dasm_FD_E1 = CBE 3262 -dasm_FD_E3 = A48 2632 -dasm_FD_E5 = CA8 3240 -dasm_FD_F9 = C90 3216 -dasm_FF = 97F 2431 -dasm_UU = CC6 3270 -dasm_UW = CCA 3274 -dasm__AND = B05 2821 -dasm__CP = B59 2905 -dasm__DEC = B90 2960 -dasm__ED_47 = 9D7 2519 -dasm__ED_4F = 9DF 2527 -dasm__ED_57 = 9C7 2503 -dasm__ED_5F = 9CF 2511 -dasm__INC = B73 2931 -dasm__LD = 9C3 2499 -dasm__OR = B22 2850 -dasm__SBC = AE1 2785 -dasm__SUB = AC4 2756 -dasm__XOR = B3C 2876 -dasm_opcode_table= 4C4 1220 -dasm_print16hex_addr= 2F1 753 -dasm_print8hex = 309 777 -dasm_printFlags_table= CCF 3279 -dasm_printRegister8_table= CDF 3295 -dasm_printRegister8_table_HL= CFF 3327 -dasm_printRegisterIX_table= CE7 3303 -dasm_printRegisterIY_table= CEF 3311 -dasm_printRegisterSP_table= CF7 3319 -disassemble = 1B5 437 -disassemble_continue= 29B 667 -disassemble_err= 28B 651 -disassemble_next= 1B9 441 -disassemble_print_opcode_params_end= 288 648 -disassemble_print_opcode_params_loop= 234 564 -disassemble_print_opcode_raw= 1F6 502 -disassemble_print_opcode_raw_fill= 20A 522 -disassemble_table_first_match= 2CD 717 -disassemble_table_found= 2E7 743 -disassemble_table_notfound= 2EB 747 -disassemble_table_seek= 2A9 681 -disassemble_table_seek_loop= 2AD 685 -dump_pretty =16C9 5833 -dump_pretty_ascii=16F3 5875 -dump_pretty_ascii_cont=1711 5905 -dump_pretty_ascii_loop=16FB 5883 -dump_pretty_ascii_none=170C 5900 -dump_pretty_col=16E6 5862 -dump_pretty_end=1723 5923 -dump_pretty_nextrow=1717 5911 -dump_pretty_row=16D1 5841 -endPrint 861A 34330 -fat_copy_lba_pointer 8554 34132 -fat_get_root_table 830B 33547 -fat_getfatsec 85BB 34235 -fat_lfs 8496 33942 -fat_print_dbg 803A 32826 -fat_print_directory 8385 33669 -fat_reset_pointer 8545 34117 -format_filename_fat16 8573 34163 -ide_printerror = E04 3588 -ide_readsector_256= D83 3459 -ide_readsector_256_done= DB2 3506 -ide_readsector_256_waitloop= D85 3461 -ide_readsector_512_inv= DB3 3507 -ide_readsector_512_inv_waitloop= DB8 3512 -ide_readsector_timeout= DEE 3566 -ide_regread_8 = D65 3429 -ide_regwrite_8 = D49 3401 -ide_reset = D3C 3388 -ide_writesector_256= E03 3587 -ideif_drv_sel 825A 33370 -ideif_get_drv_pointer=1497 5271 -ideif_init_all =14AB 5291 -ideif_init_devtable=12B5 4789 -ideif_init_drive=13C8 5064 -ideif_prnt_devtable=12D3 4819 -iic_init =15DD 5597 -iic_read_ack =161C 5660 -iic_receive_buffer=15AE 5550 -iic_receive_buffer_done=15D1 5585 -iic_receive_buffer_err=15D7 5591 -iic_receive_buffer_loop=15BF 5567 -iic_receive_byte=16A2 5794 -iic_receive_byte_loop=16AF 5807 -iic_send_ack =1642 5698 -iic_send_buffer=1584 5508 -iic_send_buffer_done=15A2 5538 -iic_send_buffer_err=15A8 5544 -iic_send_buffer_loop=1594 5524 -iic_send_byte =167C 5756 -iic_send_byte_loop=1688 5768 -iic_send_ebit =15FB 5627 -iic_send_nack =165F 5727 -iic_send_sbit =15E6 5606 +_COMMAND_PROCESS_FOUND=19BE 6590 +_OP_CALL =1A40 6720 +_OP_IIC_ACK_ERR=1B4E 6990 +_OP_IIC_ACK_ERR_str=1B55 6997 +_OP_IIC_IN_LOOP=1B9B 7067 +_OP_IIC_IN_LOOP_TEXT=1BA8 7080 +_OP_IIC_OUT_LOOP=1B1F 6943 +_OP_IIC_OUT_SEND=1B3B 6971 +_OP_RTIME_NN =1BBC 7100 +_OP_RTIME_RD_CMD=1C74 7284 +_OP_SELDSK_INVALID=1DDD 7645 +_OP_SELDSK_INVALID_STR=1DF5 7669 +_OP_SET_LOOP =1A89 6793 +_OP_STIME_INVALID=1D17 7447 +_OP_STIME_PROMPT=1D2E 7470 +_OP_STIME_PROMPT_ERR=1D46 7494 +_OP_STIME_STR_DAY=1C75 7285 +_OP_STIME_STR_HOUR=1CC6 7366 +_OP_STIME_STR_MIN=1CE1 7393 +_OP_STIME_STR_MON=1C90 7312 +_OP_STIME_STR_SEC=1CFC 7420 +_OP_STIME_STR_YEAR=1CAB 7339 +_POST_CHECK_APU_FAILED=1E62 7778 +_POST_CHECK_IDE_FAILED=1E94 7828 +_POST_CHECK_PIO_FAILED=1E37 7735 +_POST_TEST_RTC_INVALID=1ED5 7893 +_POST_TEST_RTC_NOTFOUND=1ECE 7886 +_STR_NOT_FOUND =19E1 6625 +_STR_NOT_IMPLEMENTED=19CD 6605 +_STR_SYNTAX =19F5 6645 +_beep_pause_l1 = DC2 3522 +_compare_filename_loop=2302 8962 +_compare_filename_nomatch=2310 8976 +_fat_cd_navigate=24B3 9395 +_fat_cd_navigate_end=24F9 9465 +_fat_cd_navigate_errfile=2521 9505 +_fat_cd_navigate_errfile_str=2553 9555 +_fat_cd_navigate_error=250B 9483 +_fat_cd_navigate_error_str=2529 9513 +_fat_cd_navigate_findsec=24B8 9400 +_fat_cd_navigate_findsec_skipslash=24E4 9444 +_fat_cd_navigate_goback_fl=246F 9327 +_fat_cd_navigate_inerror=2519 9497 +_fat_cd_navigate_inerrorS=2513 9491 +_fat_cd_navigate_inerrore=251A 9498 +_fat_cd_navigate_inputerr_str=2540 9536 +_fat_cd_navigate_l2=24EA 9450 +_fat_exec_notexec 60B2 24754 +_fat_exec_notfound 609A 24730 +_fat_exec_read_done 6082 24706 +_fat_exec_readloop1 6064 24676 +_fat_get_root_table_invalid=20FA 8442 +_fat_getfatsec_notroot=2139 8505 +_fat_increment_32=2288 8840 +_fat_lfs_loop =2200 8704 +_fat_lfs_loop_compare_end=223A 8762 +_fat_lfs_loop_compare_match=223E 8766 +_fat_lfs_loop_compare_next_sector=2212 8722 +_fat_math_add32=229C 8860 +_fat_math_mul32=22CD 8909 +_fat_math_mul32_l=22D4 8916 +_fat_math_mul32_noadd=22E1 8929 +_fat_math_sector_add_16=2274 8820 +_fat_print_directory_dir=23F0 9200 +_fat_print_directory_loop=2383 9091 +_fat_print_directory_loop_break=244D 9293 +_fat_print_directory_loop_file=239F 9119 +_fat_print_directory_loop_next=241B 9243 +_fat_print_directory_loop_next_sector=2426 9254 +_format_filename_fat16_clean=2319 8985 +_format_filename_fat16_loop=2320 8992 +_format_filename_fat16_loop_copy=2333 9011 +_format_filename_fat16_loop_skip_8=232A 9002 +_ideif_drv_sel_fail=15AB 5547 +_ideif_drv_sel_fstr0=1668 5736 +_ideif_drv_sel_pstr=165F 5727 +_ideif_drv_sel_sstr0=1676 5750 +_ideif_drv_sel_syn=1683 5763 +_ideif_init_drive_found=146E 5230 +_ideif_init_drive_loop=1456 5206 +_ideif_init_drive_nodrv=1469 5225 +_ideif_init_drive_prt_fnd=14D9 5337 +_ideif_init_drive_prt_l1=14C7 5319 +_ideif_init_drive_prt_ln=14D1 5329 +_ideif_prnt_devtable_hdr=15EB 5611 +_ideif_prnt_devtable_l1=1366 4966 +_ideif_prnt_devtable_l1_e2=142C 5164 +_ideif_prnt_devtable_l1_es=13AB 5035 +_ideif_prnt_devtable_l1_ms=1429 5161 +_ideif_prnt_devtable_l1_nxt=1373 4979 +_ideif_prnt_devtable_l1_s00=1399 5017 +_ideif_prnt_devtable_l1_s01=139E 5022 +_ideif_prnt_devtable_l1_s02=13A3 5027 +_ideif_prnt_devtable_l1_sFF=13A8 5032 +_ideif_prnt_devtable_l1_sel=1371 4977 +_ideif_prnt_devtable_master=164F 5711 +_ideif_prnt_devtable_s00=1623 5667 +_ideif_prnt_devtable_s01=162E 5678 +_ideif_prnt_devtable_s02=1639 5689 +_ideif_prnt_devtable_sFF=1644 5700 +_ideif_prnt_devtable_slave=1657 5719 +_read_bcd_invalid= 14E 334 +_shift4 =1DC5 7621 +_test_loop 60D5 24789 +beep = DA9 3497 +beep_loop = DAB 3499 +beep_pause = DC1 3521 +compare_filename=22FE 8958 +dasm_00 = 9AE 2478 +dasm_01 = C9A 3226 +dasm_02 = A34 2612 +dasm_03 = C6C 3180 +dasm_08 = AB1 2737 +dasm_09 = C3F 3135 +dasm_0A = A16 2582 +dasm_0B = C83 3203 +dasm_10 = 9F6 2550 +dasm_12 = A3F 2623 +dasm_18 = 9B9 2489 +dasm_1A = A20 2592 +dasm_20 = 9D3 2515 +dasm_22 = CE0 3296 +dasm_27 = A79 2681 +dasm_28 = 9CC 2508 +dasm_2A = CB1 3249 +dasm_2F = A7D 2685 +dasm_30 = 9C4 2500 +dasm_32 = A4A 2634 +dasm_37 = A89 2697 +dasm_38 = 9BD 2493 +dasm_3A = A2A 2602 +dasm_3F = A85 2693 +dasm_76 = A8D 2701 +dasm_80C6 = B0A 2826 +dasm_BE = AA7 2727 +dasm_C3 = 9B2 2482 +dasm_C88E = B30 2864 +dasm_C9 = A02 2562 +dasm_CD = 9FC 2556 +dasm_D9 = ABE 2750 +dasm_DD = 9E4 2532 +dasm_DD_01 = CA1 3233 +dasm_DD_09 = C5A 3162 +dasm_DD_22 = CF6 3318 +dasm_DD_23 = C71 3185 +dasm_DD_2A = CC8 3272 +dasm_DD_2B = C88 3208 +dasm_DD_34 = C0A 3082 +dasm_DD_35 = C27 3111 +dasm_DD_86 = B12 2834 +dasm_DD_8E = B38 2872 +dasm_DD_96 = B5B 2907 +dasm_DD_9E = B7B 2939 +dasm_DD_A6 = B9C 2972 +dasm_DD_AE = BD3 3027 +dasm_DD_B6 = BB8 3000 +dasm_DD_BE = BEF 3055 +dasm_DD_E1 = D48 3400 +dasm_DD_E3 = ACE 2766 +dasm_DD_E5 = D32 3378 +dasm_DD_F9 = D18 3352 +dasm_E1 = D42 3394 +dasm_E3 = AC2 2754 +dasm_E5 = D2C 3372 +dasm_E9 = 9DB 2523 +dasm_ED_42 = C51 3153 +dasm_ED_43 = CEC 3308 +dasm_ED_44 = A81 2689 +dasm_ED_45 = A0C 2572 +dasm_ED_46 = A98 2712 +dasm_ED_4A = C48 3144 +dasm_ED_4B = CBD 3261 +dasm_ED_4D = A07 2567 +dasm_ED_56 = A9D 2717 +dasm_ED_5E = AA2 2722 +dasm_ED_A0 = AE6 2790 +dasm_ED_A1 = AF8 2808 +dasm_ED_A8 = AEF 2799 +dasm_ED_A9 = B01 2817 +dasm_ED_B0 = AEA 2794 +dasm_ED_B1 = AFC 2812 +dasm_ED_B8 = AF3 2803 +dasm_ED_B9 = B05 2821 +dasm_F3 = A92 2706 +dasm_F9 = D0E 3342 +dasm_FB = A95 2709 +dasm_FD = 9ED 2541 +dasm_FD_01 = CA9 3241 +dasm_FD_09 = C63 3171 +dasm_FD_22 = D02 3330 +dasm_FD_23 = C7A 3194 +dasm_FD_2A = CD4 3284 +dasm_FD_2B = C91 3217 +dasm_FD_34 = C16 3094 +dasm_FD_35 = C33 3123 +dasm_FD_86 = B21 2849 +dasm_FD_8E = B47 2887 +dasm_FD_96 = B67 2919 +dasm_FD_9E = B89 2953 +dasm_FD_A6 = BA8 2984 +dasm_FD_AE = BDF 3039 +dasm_FD_B6 = BC3 3011 +dasm_FD_BE = BFA 3066 +dasm_FD_E1 = D50 3408 +dasm_FD_E3 = ADA 2778 +dasm_FD_E5 = D3A 3386 +dasm_FD_F9 = D22 3362 +dasm_FF = A11 2577 +dasm_UU = D58 3416 +dasm_UW = D5C 3420 +dasm__AND = B97 2967 +dasm__CP = BEB 3051 +dasm__DEC = C22 3106 +dasm__ED_47 = A69 2665 +dasm__ED_4F = A71 2673 +dasm__ED_57 = A59 2649 +dasm__ED_5F = A61 2657 +dasm__INC = C05 3077 +dasm__LD = A55 2645 +dasm__OR = BB4 2996 +dasm__SBC = B73 2931 +dasm__SUB = B56 2902 +dasm__XOR = BCE 3022 +dasm_opcode_table= 556 1366 +dasm_print16hex_addr= 383 899 +dasm_print8hex = 39B 923 +dasm_printFlags_table= D61 3425 +dasm_printRegister8_table= D71 3441 +dasm_printRegister8_table_HL= D91 3473 +dasm_printRegisterIX_table= D79 3449 +dasm_printRegisterIY_table= D81 3457 +dasm_printRegisterSP_table= D89 3465 +disassemble = 247 583 +disassemble_continue= 32D 813 +disassemble_err= 31D 797 +disassemble_next= 24B 587 +disassemble_print_opcode_params_end= 31A 794 +disassemble_print_opcode_params_loop= 2C6 710 +disassemble_print_opcode_raw= 288 648 +disassemble_print_opcode_raw_fill= 29C 668 +disassemble_table_first_match= 35F 863 +disassemble_table_found= 379 889 +disassemble_table_notfound= 37D 893 +disassemble_table_seek= 33B 827 +disassemble_table_seek_loop= 33F 831 +dump_pretty =17E1 6113 +dump_pretty_ascii=180B 6155 +dump_pretty_ascii_cont=1829 6185 +dump_pretty_ascii_loop=1813 6163 +dump_pretty_ascii_none=1824 6180 +dump_pretty_col=17FE 6142 +dump_pretty_end=183B 6203 +dump_pretty_nextrow=182F 6191 +dump_pretty_row=17E9 6121 +endPrint = 19F 415 +fat_cd_single =244F 9295 +fat_copy_lba_pointer=22F5 8949 +fat_exec 6000 24576 +fat_get_root_table=202D 8237 +fat_getfatsec =2122 8482 +fat_openfile =21D3 8659 +fat_openfile_noprepare=21DB 8667 +fat_print_directory=233A 9018 +fat_readfilesec=21A8 8616 +fat_reset_pointer=22E6 8934 +format_filename_fat16=2314 8980 +ide_printerror = E89 3721 +ide_readsector_256= E15 3605 +ide_readsector_256_waitloop= E17 3607 +ide_readsector_512_inv= E3E 3646 +ide_readsector_512_inv_waitloop= E43 3651 +ide_readsector_timeout= E73 3699 +ide_regread_8 = DF7 3575 +ide_regwrite_8 = DDB 3547 +ide_reset = DCE 3534 +ide_writesector_256= E88 3720 +ideif_drv_sel =1573 5491 +ideif_get_drv_pointer=151C 5404 +ideif_init_all =1530 5424 +ideif_init_devtable=133A 4922 +ideif_init_drive=144D 5197 +ideif_prnt_devtable=1358 4952 +iic_init =16F5 5877 +iic_read_ack =1734 5940 +iic_receive_buffer=16C6 5830 +iic_receive_buffer_done=16E9 5865 +iic_receive_buffer_err=16EF 5871 +iic_receive_buffer_loop=16D7 5847 +iic_receive_byte=17BA 6074 +iic_receive_byte_loop=17C7 6087 +iic_send_ack =175A 5978 +iic_send_buffer=169C 5788 +iic_send_buffer_done=16BA 5818 +iic_send_buffer_err=16C0 5824 +iic_send_buffer_loop=16AC 5804 +iic_send_byte =1794 6036 +iic_send_byte_loop=17A0 6048 +iic_send_ebit =1713 5907 +iic_send_nack =1777 6007 +iic_send_sbit =16FE 5886 mon_var_template=44 68 -mon_var_template_end= 370 880 -nxtILC 860F 34319 -param_01 = 317 791 -param_02 = 33E 830 -param_03 = 35B 859 -param_03_done = 393 915 -param_03_neg = 37C 892 -param_04 = 397 919 -param_04_i = 3A7 935 -param_05 = 3AD 941 -param_06 = 3BA 954 -param_07 = 3D4 980 -param_08 = 3E1 993 -param_09 = 3F6 1014 -param_09_0A = 3FC 1020 -param_0A = 3ED 1005 -param_10 = 40B 1035 -param_11 = 41B 1051 -param_11_12 = 42A 1066 -param_11_12_all= 44A 1098 -param_11_12_def= 43D 1085 -param_11_12_ix = 442 1090 -param_11_12_iy = 447 1095 -param_12 = 423 1059 -param_13 = 45B 1115 -param_80 = 47A 1146 -param_80_seek = 481 1153 -param_81 = 471 1137 -param_comma = 4B5 1205 -param_printRegister= 490 1168 -param_printRegisterA= 4AE 1198 -param_printRegisterHL= 4A6 1190 -print_16_hex 824D 33357 -print_32_hex 8234 33332 -print_a_hex = 107 263 -print_bcd = 119 281 -print_char =D7 215 -print_clear =EA 234 -print_newLine =F1 241 -print_str =DF 223 -print_str_end =E9 233 -print_str_fixed=1763 5987 -print_wait_out =FC 252 -read_bcd = 131 305 -read_char = 11F 287 -read_lba_sector=14BE 5310 -sel_dsk 8000 32768 -str_dev_done =1508 5384 -str_dev_waitready=14F0 5360 -str_error_start= E37 3639 -str_error_start1= E54 3668 -str_error_start2= E5D 3677 -str_error_time = E66 3686 -str_file_found 85AA 34218 -str_file_notfound 8598 34200 -str_post_apu =1DFC 7676 -str_post_ide_30=1DAB 7595 -str_post_ide_40=1DC6 7622 -str_post_nd =1E32 7730 -str_post_ok =1E6A 7786 -str_post_pio =1DE1 7649 -str_post_rtc =1E17 7703 -str_post_rtc_iv=1E40 7744 +mon_var_template_end= 40F 1039 +nxtILC = 194 404 +param_01 = 3A9 937 +param_02 = 3D0 976 +param_03 = 3ED 1005 +param_03_done = 425 1061 +param_03_neg = 40E 1038 +param_04 = 429 1065 +param_04_i = 439 1081 +param_05 = 43F 1087 +param_06 = 44C 1100 +param_07 = 466 1126 +param_08 = 473 1139 +param_09 = 488 1160 +param_09_0A = 48E 1166 +param_0A = 47F 1151 +param_10 = 49D 1181 +param_11 = 4AD 1197 +param_11_12 = 4BC 1212 +param_11_12_all= 4DC 1244 +param_11_12_def= 4CF 1231 +param_11_12_ix = 4D4 1236 +param_11_12_iy = 4D9 1241 +param_12 = 4B5 1205 +param_13 = 4ED 1261 +param_80 = 50C 1292 +param_80_seek = 513 1299 +param_81 = 503 1283 +param_comma = 547 1351 +param_printRegister= 522 1314 +param_printRegisterA= 540 1344 +param_printRegisterHL= 538 1336 +print_16_hex = 16A 362 +print_32_hex = 151 337 +print_a_hex = 10E 270 +print_bcd = 120 288 +print_char =DE 222 +print_clear =F1 241 +print_newLine =F8 248 +print_reg = 1A4 420 +print_str =E6 230 +print_str_end =F0 240 +print_str_fixed=187B 6267 +print_wait_out = 103 259 +read_bcd = 138 312 +read_char = 126 294 +read_lba_sector=1543 5443 +str_dev_done =15E3 5603 +str_dev_waitready=15CB 5579 +str_error_start= EBC 3772 +str_error_start1= ED9 3801 +str_error_start2= EE2 3810 +str_error_time = EEB 3819 +str_post_apu =1F2D 7981 +str_post_ide_30=1EDC 7900 +str_post_ide_40=1EF7 7927 +str_post_nd =1F63 8035 +str_post_ok =1F9B 8091 +str_post_pio =1F12 7954 +str_post_rtc =1F48 8008 +str_post_rtc_iv=1F71 8049 var_apu_present=400A 16394 -var_buffer =402B 16427 var_buffer_len =4000 16384 var_bytes_count=411A 16666 var_curserchar =4006 16390 @@ -1836,7 +1238,9 @@ var_curseron =4005 16389 var_curserstate=4004 16388 var_curserx =4002 16386 var_cursery =4003 16387 -var_idebuffer =402C 16428 +var_dir =402B 16427 +var_idebuffer =40CB 16587 +var_input =407B 16507 var_last_char =4001 16385 var_opcode =4114 16660 var_opcode_length=4116 16662 diff --git a/OperatingSystem/software/zout/test.mon b/OperatingSystem/software/zout/test.mon index fa59ec6..110a315 100644 --- a/OperatingSystem/software/zout/test.mon +++ b/OperatingSystem/software/zout/test.mon @@ -1,98 +1,15 @@ -!8000 CD 5A 82 CD 3A 80 C9 -!8010 CD 3A 80 C9 -!8020 CD 85 83 C9 -!8030 21 06 00 22 35 43 CD BB 85 C9 CD 0C 86 0A 0D 50 -!8040 54 52 2E 4D 45 4D 5F 49 44 45 5F 50 4F 49 4E 54 -!8050 45 52 3A 20 20 20 20 30 78 00 DD 21 32 40 CD 34 -!8060 82 CD 0C 86 20 20 7C 20 20 50 54 52 2E 4D 45 4D -!8070 5F 49 44 45 5F 50 41 52 54 49 54 49 4F 4E 3A 20 -!8080 20 20 30 78 00 DD 21 2E 40 CD 34 82 CD 0C 86 0A -!8090 0D 50 54 52 2E 4D 45 4D 5F 46 41 54 5F 54 4D 50 -!80A0 50 4F 49 4E 54 45 52 3A 20 30 78 00 DD 21 1D 43 -!80B0 CD 34 82 CD 0C 86 20 20 7C 20 20 50 54 52 2E 4D -!80C0 45 4D 5F 46 41 54 5F 54 4D 50 50 4F 49 4E 54 45 -!80D0 52 31 3A 20 30 78 00 DD 21 21 43 CD 34 82 CD 0C -!80E0 86 0A 0D 56 41 4C 2E 4D 45 4D 5F 46 41 54 5F 52 -!80F0 45 53 45 52 56 45 44 3A 20 20 20 30 78 00 DD 21 -!8100 17 43 CD 4D 82 CD 0C 86 20 20 20 20 20 20 7C 20 -!8110 20 56 41 4C 2E 4D 45 4D 5F 46 41 54 5F 41 4D 4F -!8120 55 4E 54 3A 20 20 20 20 20 20 30 78 00 3A 19 43 -!8130 CD 07 01 CD 0C 86 0A 0D 56 41 4C 2E 4D 45 4D 5F -!8140 46 41 54 5F 53 45 43 54 4F 52 53 3A 20 20 20 20 -!8150 30 78 00 DD 21 1A 43 CD 4D 82 CD 0C 86 20 20 20 -!8160 20 20 20 7C 20 20 56 41 4C 2E 4D 45 4D 5F 46 41 -!8170 54 5F 43 4F 55 4E 54 31 3A 20 20 20 20 20 20 30 -!8180 78 00 3A 1C 43 CD 07 01 CD 0C 86 0A 0D 56 41 4C -!8190 2E 4D 45 4D 5F 46 41 54 5F 4F 46 30 5F 43 43 4C -!81A0 55 53 54 3A 20 30 78 00 DD 21 35 43 CD 4D 82 CD -!81B0 0C 86 20 20 20 20 20 20 7C 20 20 50 54 52 2E 4D -!81C0 45 4D 5F 46 41 54 5F 4F 46 30 5F 46 41 54 53 45 -!81D0 43 3A 20 20 30 78 00 DD 21 37 43 CD 34 82 CD 0C -!81E0 86 0A 0D 56 41 4C 2E 4D 45 4D 5F 46 41 54 5F 4F -!81F0 46 30 5F 44 41 54 53 45 43 3A 20 30 78 00 DD 21 -!8200 3B 43 CD 34 82 CD 0C 86 20 20 7C 20 20 50 54 52 -!8210 2E 4D 45 4D 5F 46 41 54 5F 4F 46 30 5F 44 41 54 -!8220 52 45 4D 3A 20 20 30 78 00 DD 21 3F 43 CD 4D 82 -!8230 CD F1 00 C9 DD 7E 03 CD 07 01 DD 7E 02 CD 07 01 -!8240 DD 7E 01 CD 07 01 DD 7E 00 CD 07 01 C9 DD 7E 01 -!8250 CD 07 01 DD 7E 00 CD 07 01 C9 32 76 40 F5 CD 97 -!8260 14 DD 7E 00 B7 C2 88 82 CD 0B 83 2A 32 40 ED 5B -!8270 2E 40 CD 54 85 21 A4 82 CD DF 00 F1 C6 45 CD D7 -!8280 00 21 BB 82 CD DF 00 C9 21 A4 82 CD DF 00 F1 C6 -!8290 45 CD D7 00 21 AD 82 CD DF 00 11 20 00 01 70 00 -!82A0 CD 17 0D C9 0A 0D 44 72 69 76 65 20 00 3A 20 6E -!82B0 6F 74 20 72 65 61 64 79 0A 0D 00 3A 20 73 65 6C -!82C0 65 63 74 65 64 0A 0D 00 0A 0D 49 6E 76 61 6C 69 -!82D0 64 20 64 72 69 76 65 20 6C 65 74 74 65 72 0A 0D -!82E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -!82F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -!8300 00 00 00 00 00 00 00 00 00 00 00 CD 45 85 21 32 -!8310 40 3E 01 CD BE 14 3A 17 41 FE EB C2 5D 83 DD 21 -!8320 17 41 DD 7E 0E 32 17 43 DD 7E 0F 32 18 43 DD 7E -!8330 10 32 19 43 DD 7E 16 32 1A 43 DD 7E 17 32 1B 43 -!8340 3A 1B 43 57 3A 1A 43 5F AF 67 6F 3A 19 43 47 19 -!8350 10 FD 16 00 3A 17 43 5F 19 CD 00 85 C9 CD 0C 86 -!8360 0A 0D 43 61 6E 6E 6F 74 20 66 69 6E 64 20 62 6F -!8370 6F 74 20 73 65 63 74 6F 72 2E 0A 0D 00 CD 97 14 -!8380 DD 36 00 02 C9 ED 5B 1A 43 ED 53 1C 43 21 32 40 -!8390 06 01 CD BE 14 CD 0C 86 0A 0D 20 20 46 69 6C 65 -!83A0 6E 61 6D 65 20 20 20 20 20 43 6C 75 73 74 65 72 -!83B0 20 53 69 7A 65 0A 0D 00 21 17 41 0E 10 7E E5 DD -!83C0 E1 E5 FE 41 CA 63 84 FE E5 CA 63 84 FE 00 CA 94 -!83D0 84 DD 7E 0B FE 10 CA 31 84 3E 20 CD D7 00 3E 20 -!83E0 CD D7 00 06 08 CD 63 17 3E 2E CD D7 00 06 03 CD -!83F0 63 17 CD 0C 86 20 30 78 00 DD 7E 1B CD 07 01 DD -!8400 7E 1A CD 07 01 CD 0C 86 20 20 30 78 00 DD 7E 1F -!8410 CD 07 01 DD 7E 1E CD 07 01 DD 7E 1D CD 07 01 DD -!8420 7E 1C CD 07 01 3E 0A CD D7 00 3E 0D CD D7 00 18 -!8430 32 3E 44 CD D7 00 3E 20 CD D7 00 06 08 CD 63 17 -!8440 CD 0C 86 20 20 20 20 20 30 78 00 DD 7E 1B CD 07 -!8450 01 DD 7E 1A CD 07 01 3E 0A CD D7 00 3E 0D CD D7 -!8460 00 18 00 0D 28 08 E1 11 20 00 19 C3 BD 83 E1 26 -!8470 00 2E 01 CD 00 85 ED 5B 1C 43 1B ED 53 1C 43 7A -!8480 B3 CA 95 84 21 32 40 06 01 CD BE 14 21 17 41 0E -!8490 10 C3 BD 83 E1 C9 D5 21 25 43 CD 73 85 3E 10 32 -!84A0 1C 43 21 32 40 06 01 CD BE 14 21 17 41 0E 10 D1 -!84B0 D5 CD 5D 85 38 33 0D 28 07 11 20 00 19 C3 AF 84 -!84C0 26 00 2E 01 CD 00 85 3A 1C 43 3D 32 1C 43 CA E1 -!84D0 84 21 32 40 06 01 CD BE 14 21 17 41 0E 10 C3 AF -!84E0 84 D1 21 98 85 CD DF 00 C9 D1 06 08 CD 63 17 3E -!84F0 2E CD D7 00 06 03 CD 63 17 21 AA 85 CD DF 00 C9 -!8500 22 1D 43 AF 32 1F 43 32 20 43 11 1D 43 01 32 40 -!8510 CD 14 85 C9 E5 C5 D5 1A 6F 13 1A 67 13 0A 5F 03 -!8520 0A 57 19 D1 C1 7D 02 03 7C 02 03 13 13 C5 D5 1A -!8530 6F 13 1A 67 13 0A 5F 03 0A 57 ED 5A D1 C1 7D 02 -!8540 03 7C 02 E1 C9 CD 97 14 DD 23 DD 23 DD E5 E1 11 -!8550 32 40 18 00 C5 06 00 0E 04 ED B0 C1 C9 E5 C5 06 -!8560 0B 1A 4F 7E A9 20 07 05 20 F7 C1 E1 37 C9 C1 E1 -!8570 37 3F C9 06 0B E5 AF 77 23 10 FC E1 06 0D 1A B7 -!8580 C8 05 C8 FE 2E 20 0A 13 78 FE 05 38 F1 23 05 18 -!8590 F7 1A 77 23 13 C3 7E 85 46 69 6C 65 20 6E 6F 74 -!85A0 20 66 6F 75 6E 64 21 0D 0A 00 20 46 69 6C 65 20 -!85B0 6C 6F 63 61 74 65 64 21 0D 0A 00 2A 35 43 7C 6F -!85C0 AF 67 ED 4B 17 43 09 22 37 43 AF 32 39 43 32 3A -!85D0 43 CD 97 14 DD 23 DD 23 DD E5 D1 01 37 43 CD 14 -!85E0 85 CD 3A 80 21 37 43 06 01 CD BE 14 21 17 41 06 -!85F0 14 CD C9 16 3A 35 43 17 6F 3E 00 17 67 11 17 41 -!8600 19 11 35 43 ED A0 ED A0 CD 3A 80 C9 E3 F5 C5 7E -!8610 FE 00 28 06 CD D7 00 23 18 F5 23 C1 F1 E3 C9 +!6000 11 81 40 D5 CD D3 21 B7 C2 9A 60 11 B6 41 CD A8 +!6010 21 3A B6 41 FE C3 C2 B2 60 CD 91 01 0A 0D 4C 6F +!6020 61 64 69 6E 67 20 00 21 81 40 CD E6 00 CD 91 01 +!6030 20 74 6F 20 30 78 00 ED 4B C0 41 78 CD 0E 01 79 +!6040 CD 0E 01 CD 91 01 20 2E 2E 2E 20 00 ED 43 15 40 +!6050 ED 43 19 40 2A C4 41 6C CB 3D 26 00 23 22 17 40 +!6060 D1 CD D3 21 ED 5B 15 40 CD A8 21 2A 15 40 11 00 +!6070 02 19 22 15 40 2A 17 40 2B 22 17 40 7C B5 28 02 +!6080 18 E2 CD 91 01 4C 6F 61 64 20 63 6F 6D 70 6C 65 +!6090 74 65 21 0A 0D 00 2A 19 40 E9 CD 91 01 0A 0D 46 +!60A0 69 6C 65 20 6E 6F 74 20 66 6F 75 6E 64 21 0A 0D +!60B0 00 C9 CD 91 01 0A 0D 46 69 6C 65 20 69 73 20 6E +!60C0 6F 74 20 61 6E 20 65 78 65 63 75 74 61 62 6C 65 +!60D0 21 0A 0D 00 C9 CD A8 21 F5 21 B6 41 06 20 CD E1 +!60E0 17 F1 B7 CA D5 60 C9 diff --git a/OperatingSystem/software2/include/extern_symbols.s b/OperatingSystem/software2/include/extern_symbols.s new file mode 120000 index 0000000..93116e9 --- /dev/null +++ b/OperatingSystem/software2/include/extern_symbols.s @@ -0,0 +1 @@ +../../monitor_v2/zout/symbols.s \ No newline at end of file diff --git a/OperatingSystem/software2/properties.env b/OperatingSystem/software2/properties.env new file mode 100644 index 0000000..11748b8 --- /dev/null +++ b/OperatingSystem/software2/properties.env @@ -0,0 +1,5 @@ +export OPT_GEN_SYMBOLTABLE=0 +export OPT_GEN_MONFILE=1 +export OPT_GEN_OBJFILE=1 +export OPT_WRITEROM=0 +export FILENAME=test \ No newline at end of file diff --git a/OperatingSystem/software2/test.asm b/OperatingSystem/software2/test.asm new file mode 100644 index 0000000..fa01487 --- /dev/null +++ b/OperatingSystem/software2/test.asm @@ -0,0 +1,37 @@ +.include "extern_symbols.s" ;include monitor symbols. + START_ADDR .EQU 0x8000 + + + org START_ADDR +com_header: + jp com_prg + db 0x00 + dw 0x00, 0x00, 0x00 ;always 0 + dw [START_ADDR] ;start addr + dw [_eof] ;end of file + dw [_eof - START_ADDR] ;length + dc 48,0x00 + +com_prg: + + + ld hl,[_str] +_l1: + ld a, (hl) + or a + ret z + out (CS_SIO_A_D),a +_wait: + ld a,1 + out (CS_SIO_A_C),A + in A,(CS_SIO_A_C) ;read RRx + bit 0,A + jr z,_wait + inc hl + jr _l1 + +_str: + db 10,13,"Hello World",10,13,0 + + +_eof: \ No newline at end of file diff --git a/OperatingSystem/software2/zout/HELLORD.COM b/OperatingSystem/software2/zout/HELLORD.COM new file mode 100644 index 0000000..86934c9 Binary files /dev/null and b/OperatingSystem/software2/zout/HELLORD.COM differ diff --git a/OperatingSystem/software2/zout/test.bin b/OperatingSystem/software2/zout/test.bin new file mode 100644 index 0000000..1eaabb8 Binary files /dev/null and b/OperatingSystem/software2/zout/test.bin differ diff --git a/OperatingSystem/software2/zout/test.hex b/OperatingSystem/software2/zout/test.hex new file mode 100644 index 0000000..7d65641 --- /dev/null +++ b/OperatingSystem/software2/zout/test.hex @@ -0,0 +1,8 @@ +:10800000C340800000000000000000806580650023 +:108010000000000000000000000000000000000060 +:108020000000000000000000000000000000000050 +:108030000000000000000000000000000000000040 +:108040002155807EB7C8D3083E01D309DB09CB4751 +:1080500028F62318EE0A0D48656C6C6F20576F7276 +:058060006C640A0D0034 +:00000001FF diff --git a/OperatingSystem/software2/zout/test.lst b/OperatingSystem/software2/zout/test.lst new file mode 100644 index 0000000..fa70839 --- /dev/null +++ b/OperatingSystem/software2/zout/test.lst @@ -0,0 +1,1168 @@ + 1: .include "extern_symbols.s" ;include monitor symbols. +**** include/extern_symbols.s **** + 1: ;This file is generated by the build script. + 2: ;Do not make any changes here! + 3: + 4: - 00D0 ADDR_RTC equ 0xD0 + 5: - 017F A_RTS_OFF equ 0x17F + 6: - 0188 A_RTS_ON equ 0x188 + 7: - 0050 BOOT_PHASE0 equ 0x50 + 8: - 006E BOOT_PHASE1 equ 0x6E + 9: - 0077 BOOT_PHASE1_LOOP equ 0x77 + 10: - 0089 BOOT_PHASE2 equ 0x89 + 11: - 190E COMMAND equ 0x190E + 12: - 194F COMMAND_BACKSPACE equ 0x194F + 13: - 1883 COMMAND_LUT equ 0x1883 + 14: - 1975 COMMAND_PROCESS equ 0x1975 + 15: - 19B0 COMMAND_PROCESS_FOUND equ 0x19B0 + 16: - 1978 COMMAND_PROCESS_LOOP equ 0x1978 + 17: - 1981 COMMAND_PROCESS_LOOP_STR1 equ 0x1981 + 18: - 1997 COMMAND_PROCESS_LOOP_STR2 equ 0x1997 + 19: - 199C COMMAND_PROCESS_NEXT_ENTRY equ 0x199C + 20: - 199B COMMAND_PROCESS_NEXT_ENTRYI equ 0x199B + 21: - 19A7 COMMAND_PROCESS_NOT_FOUND equ 0x19A7 + 22: - 1920 COMMAND_READ equ 0x1920 + 23: - 00A5 CONSOLE_INIT equ 0xA5 + 24: - 00A5 CONSOLE_INIT_CTC equ 0xA5 + 25: - 00AD CONSOLE_INIT_SIO equ 0xAD + 26: - 00F9 CS_APU_CTRL equ 0xF9 + 27: - 00F8 CS_APU_DATA equ 0xF8 + 28: - 0000 CS_BANK equ 0x00 + 29: - 0004 CS_CTC_0 equ 0x04 + 30: - 0005 CS_CTC_1 equ 0x05 + 31: - 0006 CS_CTC_2 equ 0x06 + 32: - 0007 CS_CTC_3 equ 0x07 + 33: - 0001 CS_DIP equ 0x01 + 34: - 0033 CS_PIA_CR equ 0x33 + 35: - 0030 CS_PIA_PA equ 0x30 + 36: - 0031 CS_PIA_PB equ 0x31 + 37: - 0032 CS_PIA_PC equ 0x32 + 38: - 00F6 CS_PIO_AC equ 0xF6 + 39: - 00F4 CS_PIO_AD equ 0xF4 + 40: - 00F7 CS_PIO_BC equ 0xF7 + 41: - 00F5 CS_PIO_BD equ 0xF5 + 42: - 0009 CS_SIO_A_C equ 0x09 + 43: - 0008 CS_SIO_A_D equ 0x08 + 44: - 000B CS_SIO_B_C equ 0x0B + 45: - 000A CS_SIO_B_D equ 0x0A + 46: - 01F6 DHEX_TO_BYTE equ 0x1F6 + 47: - 0212 DHEX_TO_BYTE_FAILED equ 0x212 + 48: - 19C6 ERR_SYNTAX equ 0x19C6 + 49: - 0D96 EXEC_RST_08 equ 0xD96 + 50: - 0D9A EXEC_RST_10 equ 0xD9A + 51: - 0DA6 EXEC_RST_18 equ 0xDA6 + 52: - 0216 HEX_TO_BIN equ 0x216 + 53: - 0224 HEX_TO_BIN_2 equ 0x224 + 54: - 022B HEX_TO_INVALID_2 equ 0x22B + 55: - 00EC IDE_CMD_IDENT equ 0xEC + 56: - 0020 IDE_CMD_READSEC equ 0x20 + 57: - 12FA IDE_DEV_TABLE equ 0x12FA + 58: - 0040 IDE_RD equ 0x40 + 59: - 0016 IDE_REG_ALTSTS equ 0x16 + 60: - 000F IDE_REG_CMDSTS equ 0x0F + 61: - 0008 IDE_REG_DATA equ 0x08 + 62: - 0017 IDE_REG_DRVADDR equ 0x17 + 63: - 0009 IDE_REG_ERROR equ 0x09 + 64: - 000D IDE_REG_HCYL equ 0x0D + 65: - 000E IDE_REG_HEAD equ 0x0E + 66: - 000B IDE_REG_LBA0 equ 0x0B + 67: - 000C IDE_REG_LBA1 equ 0x0C + 68: - 000D IDE_REG_LBA2 equ 0x0D + 69: - 000E IDE_REG_LBA3 equ 0x0E + 70: - 000C IDE_REG_LCYL equ 0x0C + 71: - 000A IDE_REG_SECTOR equ 0x0A + 72: - 000B IDE_REG_SSECTOR equ 0x0B + 73: - 0080 IDE_RST equ 0x80 + 74: - 0020 IDE_WR equ 0x20 + 75: - 0001 IIC_CLK equ 0x01 + 76: - 0002 IIC_DATA equ 0x02 + 77: - 001B INT_VEC equ 0x1B + 78: - 0040 IO_AY0_ADDR equ 0x40 + 79: - 0041 IO_AY0_DATA equ 0x41 + 80: - 0042 IO_AY1_ADDR equ 0x42 + 81: - 0043 IO_AY1_DATA equ 0x43 + 82: - 0020 IO_REG0 equ 0x20 + 83: - 0025 IO_RTC_AMPM equ 0x25 + 84: - 002D IO_RTC_CTR_D equ 0x2D + 85: - 002E IO_RTC_CTR_E equ 0x2E + 86: - 002F IO_RTC_CTR_F equ 0x2F + 87: - 0026 IO_RTC_DAY0 equ 0x26 + 88: - 0027 IO_RTC_DAY1 equ 0x27 + 89: - 0024 IO_RTC_HOUR equ 0x24 + 90: - 0022 IO_RTC_MIN0 equ 0x22 + 91: - 0023 IO_RTC_MIN1 equ 0x23 + 92: - 0028 IO_RTC_MON0 equ 0x28 + 93: - 0029 IO_RTC_MON1 equ 0x29 + 94: - 0020 IO_RTC_SEC0 equ 0x20 + 95: - 0021 IO_RTC_SEC1 equ 0x21 + 96: - 002C IO_RTC_WEEK equ 0x2C + 97: - 002B IO_RTC_YEAR1 equ 0x2B + 98: - 002A IO_RTC_YERR0 equ 0x2A + 99: - 43B8 MEM_FAT_AMOUNT equ 0x43B8 + 100: - 43BB MEM_FAT_CLUSTERLEN equ 0x43BB + 101: - 43BC MEM_FAT_COUNT1 equ 0x43BC + 102: - 43DF MEM_FAT_CURDIR equ 0x43DF + 103: - 443F MEM_FAT_CURRDIR equ 0x443F + 104: - 43C1 MEM_FAT_DATASTART equ 0x43C1 + 105: - 43CD MEM_FAT_DIRSEC equ 0x43CD + 106: - 43C9 MEM_FAT_FILEREMAIN equ 0x43C9 + 107: - 442F MEM_FAT_OF0_ATTRIBUTE equ 0x442F + 108: - 4431 MEM_FAT_OF0_CCLUST equ 0x4431 + 109: - 443B MEM_FAT_OF0_DATREM equ 0x443B + 110: - 4437 MEM_FAT_OF0_DATSEC equ 0x4437 + 111: - 4433 MEM_FAT_OF0_FATSEC equ 0x4433 + 112: - 43B6 MEM_FAT_RESERVED equ 0x43B6 + 113: - 43C5 MEM_FAT_ROOTSTART equ 0x43C5 + 114: - 43B9 MEM_FAT_SECTORS equ 0x43B9 + 115: - 43CF MEM_FAT_TMPFNAME equ 0x43CF + 116: - 43BD MEM_FAT_TMPPOINTER equ 0x43BD + 117: - 41B6 MEM_IDE_BUFFER equ 0x41B6 + 118: - 40CB MEM_IDE_DEVICE equ 0x40CB + 119: - 40D5 MEM_IDE_DEV_TABLE equ 0x40D5 + 120: - 43B6 MEM_IDE_FSBUFFER equ 0x43B6 + 121: - 40CD MEM_IDE_PARTITION equ 0x40CD + 122: - 40D1 MEM_IDE_POINTER equ 0x40D1 + 123: - 4115 MEM_IDE_SELECTED equ 0x4115 + 124: - 40CC MEM_IDE_STATUS equ 0x40CC + 125: - 4116 MEM_IDE_STRING_0 equ 0x4116 + 126: - 413E MEM_IDE_STRING_1 equ 0x413E + 127: - 4166 MEM_IDE_STRING_2 equ 0x4166 + 128: - 418E MEM_IDE_STRING_3 equ 0x418E + 129: - 0177 MSG_CLEAR equ 0x177 + 130: - 19BF NOT_IMPLEMENTED equ 0x19BF + 131: - 1A21 OP_CALL equ 0x1A21 + 132: - 1DF1 OP_CD equ 0x1DF1 + 133: - 1BB5 OP_CLR equ 0x1BB5 + 134: - 1AA2 OP_DASM equ 0x1AA2 + 135: - 1DED OP_DIR equ 0x1DED + 136: - 1A41 OP_DUMP equ 0x1A41 + 137: - 1A08 OP_EXEC equ 0x1A08 + 138: - 1B69 OP_IIC_IN equ 0x1B69 + 139: - 1B09 OP_IIC_OUT equ 0x1B09 + 140: - 1AD2 OP_IO_IN equ 0x1AD2 + 141: - 1AE8 OP_IO_OUT equ 0x1AE8 + 142: - 1DCA OP_LSDSK equ 0x1DCA + 143: - 1BB9 OP_RTIME equ 0x1BB9 + 144: - 1DCE OP_SELDSK equ 0x1DCE + 145: - 1A71 OP_SET equ 0x1A71 + 146: - 1D51 OP_STIME equ 0x1D51 + 147: - 1E43 POST_CHECK_APU equ 0x1E43 + 148: - 1E6E POST_CHECK_IDE_30 equ 0x1E6E + 149: - 1E81 POST_CHECK_IDE_40 equ 0x1E81 + 150: - 1E1E POST_CHECK_PIO equ 0x1E1E + 151: - 1E0E POST_START equ 0x1E0E + 152: - 1E9B POST_TEST_RTC equ 0x1E9B + 153: - 4110 PRG_RAM_START equ 0x4110 + 154: - FF00 PRG_RAM_TOP equ 0xFF00 + 155: - 0191 PRINTINLINE equ 0x191 + 156: - 4000 PROG_MEM_START equ 0x4000 + 157: - 0100 PROG_ROM_START equ 0x100 + 158: - 0000 RST_00 equ 0x00 + 159: - 0008 RST_08 equ 0x08 + 160: - 0010 RST_10 equ 0x10 + 161: - 0018 RST_18 equ 0x18 + 162: - FFFF STACK_RAM_TOP equ 0xFFFF + 163: - 0000 START_ROM equ 0x00 + 164: - 022D STRCONV_BYTES_TO_HEX equ 0x22D + 165: - 023C STRCONV_BYTES_TO_HEX_1 equ 0x23C + 166: - 0246 STRCONV_BYTES_TO_HEX_2 equ 0x246 + 167: - 256A STR_Banner_Start equ 0x256A + 168: - 183C STR_PD_HEADER equ 0x183C + 169: - 4010 SYS_BUF_START equ 0x4010 + 170: - 4000 SYS_RAM_START equ 0x4000 + 171: - 0018 VAR_CONSOLE_BAUD equ 0x18 + 172: - 000F VAR_CONSOLE_CONF equ 0x0F + 173: - 0080 VDP_MEM equ 0x80 + 174: - 0081 VDP_REG equ 0x81 + 175: - 19BE _COMMAND_PROCESS_FOUND equ 0x19BE + 176: - 1A40 _OP_CALL equ 0x1A40 + 177: - 1B4E _OP_IIC_ACK_ERR equ 0x1B4E + 178: - 1B55 _OP_IIC_ACK_ERR_str equ 0x1B55 + 179: - 1B9B _OP_IIC_IN_LOOP equ 0x1B9B + 180: - 1BA8 _OP_IIC_IN_LOOP_TEXT equ 0x1BA8 + 181: - 1B1F _OP_IIC_OUT_LOOP equ 0x1B1F + 182: - 1B3B _OP_IIC_OUT_SEND equ 0x1B3B + 183: - 1BBC _OP_RTIME_NN equ 0x1BBC + 184: - 1C74 _OP_RTIME_RD_CMD equ 0x1C74 + 185: - 1DDD _OP_SELDSK_INVALID equ 0x1DDD + 186: - 1DF5 _OP_SELDSK_INVALID_STR equ 0x1DF5 + 187: - 1A89 _OP_SET_LOOP equ 0x1A89 + 188: - 1D17 _OP_STIME_INVALID equ 0x1D17 + 189: - 1D2E _OP_STIME_PROMPT equ 0x1D2E + 190: - 1D46 _OP_STIME_PROMPT_ERR equ 0x1D46 + 191: - 1C75 _OP_STIME_STR_DAY equ 0x1C75 + 192: - 1CC6 _OP_STIME_STR_HOUR equ 0x1CC6 + 193: - 1CE1 _OP_STIME_STR_MIN equ 0x1CE1 + 194: - 1C90 _OP_STIME_STR_MON equ 0x1C90 + 195: - 1CFC _OP_STIME_STR_SEC equ 0x1CFC + 196: - 1CAB _OP_STIME_STR_YEAR equ 0x1CAB + 197: - 1E62 _POST_CHECK_APU_FAILED equ 0x1E62 + 198: - 1E94 _POST_CHECK_IDE_FAILED equ 0x1E94 + 199: - 1E37 _POST_CHECK_PIO_FAILED equ 0x1E37 + 200: - 1ED5 _POST_TEST_RTC_INVALID equ 0x1ED5 + 201: - 1ECE _POST_TEST_RTC_NOTFOUND equ 0x1ECE + 202: - 19E1 _STR_NOT_FOUND equ 0x19E1 + 203: - 19CD _STR_NOT_IMPLEMENTED equ 0x19CD + 204: - 19F5 _STR_SYNTAX equ 0x19F5 + 205: - 0DC2 _beep_pause_l1 equ 0xDC2 + 206: - 2302 _compare_filename_loop equ 0x2302 + 207: - 2310 _compare_filename_nomatch equ 0x2310 + 208: - 24B3 _fat_cd_navigate equ 0x24B3 + 209: - 24F9 _fat_cd_navigate_end equ 0x24F9 + 210: - 2521 _fat_cd_navigate_errfile equ 0x2521 + 211: - 2553 _fat_cd_navigate_errfile_str equ 0x2553 + 212: - 250B _fat_cd_navigate_error equ 0x250B + 213: - 2529 _fat_cd_navigate_error_str equ 0x2529 + 214: - 24B8 _fat_cd_navigate_findsec equ 0x24B8 + 215: - 24E4 _fat_cd_navigate_findsec_skipslash equ 0x24E4 + 216: - 246F _fat_cd_navigate_goback_fl equ 0x246F + 217: - 2519 _fat_cd_navigate_inerror equ 0x2519 + 218: - 2513 _fat_cd_navigate_inerrorS equ 0x2513 + 219: - 251A _fat_cd_navigate_inerrore equ 0x251A + 220: - 2540 _fat_cd_navigate_inputerr_str equ 0x2540 + 221: - 24EA _fat_cd_navigate_l2 equ 0x24EA + 222: - 20FA _fat_get_root_table_invalid equ 0x20FA + 223: - 2139 _fat_getfatsec_notroot equ 0x2139 + 224: - 2288 _fat_increment_32 equ 0x2288 + 225: - 2200 _fat_lfs_loop equ 0x2200 + 226: - 223A _fat_lfs_loop_compare_end equ 0x223A + 227: - 223E _fat_lfs_loop_compare_match equ 0x223E + 228: - 2212 _fat_lfs_loop_compare_next_sector equ 0x2212 + 229: - 229C _fat_math_add32 equ 0x229C + 230: - 22CD _fat_math_mul32 equ 0x22CD + 231: - 22D4 _fat_math_mul32_l equ 0x22D4 + 232: - 22E1 _fat_math_mul32_noadd equ 0x22E1 + 233: - 2274 _fat_math_sector_add_16 equ 0x2274 + 234: - 23F0 _fat_print_directory_dir equ 0x23F0 + 235: - 2383 _fat_print_directory_loop equ 0x2383 + 236: - 244D _fat_print_directory_loop_break equ 0x244D + 237: - 239F _fat_print_directory_loop_file equ 0x239F + 238: - 241B _fat_print_directory_loop_next equ 0x241B + 239: - 2426 _fat_print_directory_loop_next_sector equ 0x2426 + 240: - 2319 _format_filename_fat16_clean equ 0x2319 + 241: - 2320 _format_filename_fat16_loop equ 0x2320 + 242: - 2333 _format_filename_fat16_loop_copy equ 0x2333 + 243: - 232A _format_filename_fat16_loop_skip_8 equ 0x232A + 244: - 15AB _ideif_drv_sel_fail equ 0x15AB + 245: - 1668 _ideif_drv_sel_fstr0 equ 0x1668 + 246: - 165F _ideif_drv_sel_pstr equ 0x165F + 247: - 1676 _ideif_drv_sel_sstr0 equ 0x1676 + 248: - 1683 _ideif_drv_sel_syn equ 0x1683 + 249: - 146E _ideif_init_drive_found equ 0x146E + 250: - 1456 _ideif_init_drive_loop equ 0x1456 + 251: - 1469 _ideif_init_drive_nodrv equ 0x1469 + 252: - 14D9 _ideif_init_drive_prt_fnd equ 0x14D9 + 253: - 14C7 _ideif_init_drive_prt_l1 equ 0x14C7 + 254: - 14D1 _ideif_init_drive_prt_ln equ 0x14D1 + 255: - 15EB _ideif_prnt_devtable_hdr equ 0x15EB + 256: - 1366 _ideif_prnt_devtable_l1 equ 0x1366 + 257: - 142C _ideif_prnt_devtable_l1_e2 equ 0x142C + 258: - 13AB _ideif_prnt_devtable_l1_es equ 0x13AB + 259: - 1429 _ideif_prnt_devtable_l1_ms equ 0x1429 + 260: - 1373 _ideif_prnt_devtable_l1_nxt equ 0x1373 + 261: - 1399 _ideif_prnt_devtable_l1_s00 equ 0x1399 + 262: - 139E _ideif_prnt_devtable_l1_s01 equ 0x139E + 263: - 13A3 _ideif_prnt_devtable_l1_s02 equ 0x13A3 + 264: - 13A8 _ideif_prnt_devtable_l1_sFF equ 0x13A8 + 265: - 1371 _ideif_prnt_devtable_l1_sel equ 0x1371 + 266: - 164F _ideif_prnt_devtable_master equ 0x164F + 267: - 1623 _ideif_prnt_devtable_s00 equ 0x1623 + 268: - 162E _ideif_prnt_devtable_s01 equ 0x162E + 269: - 1639 _ideif_prnt_devtable_s02 equ 0x1639 + 270: - 1644 _ideif_prnt_devtable_sFF equ 0x1644 + 271: - 1657 _ideif_prnt_devtable_slave equ 0x1657 + 272: - 014E _read_bcd_invalid equ 0x14E + 273: - 1DC5 _shift4 equ 0x1DC5 + 274: - 0DA9 beep equ 0xDA9 + 275: - 0DAB beep_loop equ 0xDAB + 276: - 0DC1 beep_pause equ 0xDC1 + 277: - 22FE compare_filename equ 0x22FE + 278: - 09AE dasm_00 equ 0x9AE + 279: - 0C9A dasm_01 equ 0xC9A + 280: - 0A34 dasm_02 equ 0xA34 + 281: - 0C6C dasm_03 equ 0xC6C + 282: - 0AB1 dasm_08 equ 0xAB1 + 283: - 0C3F dasm_09 equ 0xC3F + 284: - 0A16 dasm_0A equ 0xA16 + 285: - 0C83 dasm_0B equ 0xC83 + 286: - 09F6 dasm_10 equ 0x9F6 + 287: - 0A3F dasm_12 equ 0xA3F + 288: - 09B9 dasm_18 equ 0x9B9 + 289: - 0A20 dasm_1A equ 0xA20 + 290: - 09D3 dasm_20 equ 0x9D3 + 291: - 0CE0 dasm_22 equ 0xCE0 + 292: - 0A79 dasm_27 equ 0xA79 + 293: - 09CC dasm_28 equ 0x9CC + 294: - 0CB1 dasm_2A equ 0xCB1 + 295: - 0A7D dasm_2F equ 0xA7D + 296: - 09C4 dasm_30 equ 0x9C4 + 297: - 0A4A dasm_32 equ 0xA4A + 298: - 0A89 dasm_37 equ 0xA89 + 299: - 09BD dasm_38 equ 0x9BD + 300: - 0A2A dasm_3A equ 0xA2A + 301: - 0A85 dasm_3F equ 0xA85 + 302: - 0A8D dasm_76 equ 0xA8D + 303: - 0B0A dasm_80C6 equ 0xB0A + 304: - 0AA7 dasm_BE equ 0xAA7 + 305: - 09B2 dasm_C3 equ 0x9B2 + 306: - 0B30 dasm_C88E equ 0xB30 + 307: - 0A02 dasm_C9 equ 0xA02 + 308: - 09FC dasm_CD equ 0x9FC + 309: - 0ABE dasm_D9 equ 0xABE + 310: - 09E4 dasm_DD equ 0x9E4 + 311: - 0CA1 dasm_DD_01 equ 0xCA1 + 312: - 0C5A dasm_DD_09 equ 0xC5A + 313: - 0CF6 dasm_DD_22 equ 0xCF6 + 314: - 0C71 dasm_DD_23 equ 0xC71 + 315: - 0CC8 dasm_DD_2A equ 0xCC8 + 316: - 0C88 dasm_DD_2B equ 0xC88 + 317: - 0C0A dasm_DD_34 equ 0xC0A + 318: - 0C27 dasm_DD_35 equ 0xC27 + 319: - 0B12 dasm_DD_86 equ 0xB12 + 320: - 0B38 dasm_DD_8E equ 0xB38 + 321: - 0B5B dasm_DD_96 equ 0xB5B + 322: - 0B7B dasm_DD_9E equ 0xB7B + 323: - 0B9C dasm_DD_A6 equ 0xB9C + 324: - 0BD3 dasm_DD_AE equ 0xBD3 + 325: - 0BB8 dasm_DD_B6 equ 0xBB8 + 326: - 0BEF dasm_DD_BE equ 0xBEF + 327: - 0D48 dasm_DD_E1 equ 0xD48 + 328: - 0ACE dasm_DD_E3 equ 0xACE + 329: - 0D32 dasm_DD_E5 equ 0xD32 + 330: - 0D18 dasm_DD_F9 equ 0xD18 + 331: - 0D42 dasm_E1 equ 0xD42 + 332: - 0AC2 dasm_E3 equ 0xAC2 + 333: - 0D2C dasm_E5 equ 0xD2C + 334: - 09DB dasm_E9 equ 0x9DB + 335: - 0C51 dasm_ED_42 equ 0xC51 + 336: - 0CEC dasm_ED_43 equ 0xCEC + 337: - 0A81 dasm_ED_44 equ 0xA81 + 338: - 0A0C dasm_ED_45 equ 0xA0C + 339: - 0A98 dasm_ED_46 equ 0xA98 + 340: - 0C48 dasm_ED_4A equ 0xC48 + 341: - 0CBD dasm_ED_4B equ 0xCBD + 342: - 0A07 dasm_ED_4D equ 0xA07 + 343: - 0A9D dasm_ED_56 equ 0xA9D + 344: - 0AA2 dasm_ED_5E equ 0xAA2 + 345: - 0AE6 dasm_ED_A0 equ 0xAE6 + 346: - 0AF8 dasm_ED_A1 equ 0xAF8 + 347: - 0AEF dasm_ED_A8 equ 0xAEF + 348: - 0B01 dasm_ED_A9 equ 0xB01 + 349: - 0AEA dasm_ED_B0 equ 0xAEA + 350: - 0AFC dasm_ED_B1 equ 0xAFC + 351: - 0AF3 dasm_ED_B8 equ 0xAF3 + 352: - 0B05 dasm_ED_B9 equ 0xB05 + 353: - 0A92 dasm_F3 equ 0xA92 + 354: - 0D0E dasm_F9 equ 0xD0E + 355: - 0A95 dasm_FB equ 0xA95 + 356: - 09ED dasm_FD equ 0x9ED + 357: - 0CA9 dasm_FD_01 equ 0xCA9 + 358: - 0C63 dasm_FD_09 equ 0xC63 + 359: - 0D02 dasm_FD_22 equ 0xD02 + 360: - 0C7A dasm_FD_23 equ 0xC7A + 361: - 0CD4 dasm_FD_2A equ 0xCD4 + 362: - 0C91 dasm_FD_2B equ 0xC91 + 363: - 0C16 dasm_FD_34 equ 0xC16 + 364: - 0C33 dasm_FD_35 equ 0xC33 + 365: - 0B21 dasm_FD_86 equ 0xB21 + 366: - 0B47 dasm_FD_8E equ 0xB47 + 367: - 0B67 dasm_FD_96 equ 0xB67 + 368: - 0B89 dasm_FD_9E equ 0xB89 + 369: - 0BA8 dasm_FD_A6 equ 0xBA8 + 370: - 0BDF dasm_FD_AE equ 0xBDF + 371: - 0BC3 dasm_FD_B6 equ 0xBC3 + 372: - 0BFA dasm_FD_BE equ 0xBFA + 373: - 0D50 dasm_FD_E1 equ 0xD50 + 374: - 0ADA dasm_FD_E3 equ 0xADA + 375: - 0D3A dasm_FD_E5 equ 0xD3A + 376: - 0D22 dasm_FD_F9 equ 0xD22 + 377: - 0A11 dasm_FF equ 0xA11 + 378: - 0D58 dasm_UU equ 0xD58 + 379: - 0D5C dasm_UW equ 0xD5C + 380: - 0B97 dasm__AND equ 0xB97 + 381: - 0BEB dasm__CP equ 0xBEB + 382: - 0C22 dasm__DEC equ 0xC22 + 383: - 0A69 dasm__ED_47 equ 0xA69 + 384: - 0A71 dasm__ED_4F equ 0xA71 + 385: - 0A59 dasm__ED_57 equ 0xA59 + 386: - 0A61 dasm__ED_5F equ 0xA61 + 387: - 0C05 dasm__INC equ 0xC05 + 388: - 0A55 dasm__LD equ 0xA55 + 389: - 0BB4 dasm__OR equ 0xBB4 + 390: - 0B73 dasm__SBC equ 0xB73 + 391: - 0B56 dasm__SUB equ 0xB56 + 392: - 0BCE dasm__XOR equ 0xBCE + 393: - 0556 dasm_opcode_table equ 0x556 + 394: - 0383 dasm_print16hex_addr equ 0x383 + 395: - 039B dasm_print8hex equ 0x39B + 396: - 0D61 dasm_printFlags_table equ 0xD61 + 397: - 0D71 dasm_printRegister8_table equ 0xD71 + 398: - 0D91 dasm_printRegister8_table_HL equ 0xD91 + 399: - 0D79 dasm_printRegisterIX_table equ 0xD79 + 400: - 0D81 dasm_printRegisterIY_table equ 0xD81 + 401: - 0D89 dasm_printRegisterSP_table equ 0xD89 + 402: - 0247 disassemble equ 0x247 + 403: - 032D disassemble_continue equ 0x32D + 404: - 031D disassemble_err equ 0x31D + 405: - 024B disassemble_next equ 0x24B + 406: - 031A disassemble_print_opcode_params_end equ 0x31A + 407: - 02C6 disassemble_print_opcode_params_loop equ 0x2C6 + 408: - 0288 disassemble_print_opcode_raw equ 0x288 + 409: - 029C disassemble_print_opcode_raw_fill equ 0x29C + 410: - 035F disassemble_table_first_match equ 0x35F + 411: - 0379 disassemble_table_found equ 0x379 + 412: - 037D disassemble_table_notfound equ 0x37D + 413: - 033B disassemble_table_seek equ 0x33B + 414: - 033F disassemble_table_seek_loop equ 0x33F + 415: - 17E1 dump_pretty equ 0x17E1 + 416: - 180B dump_pretty_ascii equ 0x180B + 417: - 1829 dump_pretty_ascii_cont equ 0x1829 + 418: - 1813 dump_pretty_ascii_loop equ 0x1813 + 419: - 1824 dump_pretty_ascii_none equ 0x1824 + 420: - 17FE dump_pretty_col equ 0x17FE + 421: - 183B dump_pretty_end equ 0x183B + 422: - 182F dump_pretty_nextrow equ 0x182F + 423: - 17E9 dump_pretty_row equ 0x17E9 + 424: - 019F endPrint equ 0x19F + 425: - 244F fat_cd_single equ 0x244F + 426: - 22F5 fat_copy_lba_pointer equ 0x22F5 + 427: - 202D fat_get_root_table equ 0x202D + 428: - 2122 fat_getfatsec equ 0x2122 + 429: - 21D3 fat_openfile equ 0x21D3 + 430: - 21DB fat_openfile_noprepare equ 0x21DB + 431: - 233A fat_print_directory equ 0x233A + 432: - 21A8 fat_readfilesec equ 0x21A8 + 433: - 22E6 fat_reset_pointer equ 0x22E6 + 434: - 2314 format_filename_fat16 equ 0x2314 + 435: - 0E89 ide_printerror equ 0xE89 + 436: - 0E15 ide_readsector_256 equ 0xE15 + 437: - 0E17 ide_readsector_256_waitloop equ 0xE17 + 438: - 0E3E ide_readsector_512_inv equ 0xE3E + 439: - 0E43 ide_readsector_512_inv_waitloop equ 0xE43 + 440: - 0E73 ide_readsector_timeout equ 0xE73 + 441: - 0DF7 ide_regread_8 equ 0xDF7 + 442: - 0DDB ide_regwrite_8 equ 0xDDB + 443: - 0DCE ide_reset equ 0xDCE + 444: - 0E88 ide_writesector_256 equ 0xE88 + 445: - 1573 ideif_drv_sel equ 0x1573 + 446: - 151C ideif_get_drv_pointer equ 0x151C + 447: - 1530 ideif_init_all equ 0x1530 + 448: - 133A ideif_init_devtable equ 0x133A + 449: - 144D ideif_init_drive equ 0x144D + 450: - 1358 ideif_prnt_devtable equ 0x1358 + 451: - 16F5 iic_init equ 0x16F5 + 452: - 1734 iic_read_ack equ 0x1734 + 453: - 16C6 iic_receive_buffer equ 0x16C6 + 454: - 16E9 iic_receive_buffer_done equ 0x16E9 + 455: - 16EF iic_receive_buffer_err equ 0x16EF + 456: - 16D7 iic_receive_buffer_loop equ 0x16D7 + 457: - 17BA iic_receive_byte equ 0x17BA + 458: - 17C7 iic_receive_byte_loop equ 0x17C7 + 459: - 175A iic_send_ack equ 0x175A + 460: - 169C iic_send_buffer equ 0x169C + 461: - 16BA iic_send_buffer_done equ 0x16BA + 462: - 16C0 iic_send_buffer_err equ 0x16C0 + 463: - 16AC iic_send_buffer_loop equ 0x16AC + 464: - 1794 iic_send_byte equ 0x1794 + 465: - 17A0 iic_send_byte_loop equ 0x17A0 + 466: - 1713 iic_send_ebit equ 0x1713 + 467: - 1777 iic_send_nack equ 0x1777 + 468: - 16FE iic_send_sbit equ 0x16FE + 469: - 0044 mon_var_template equ 0x44 + 470: - 040F mon_var_template_end equ 0x40F + 471: - 0194 nxtILC equ 0x194 + 472: - 03A9 param_01 equ 0x3A9 + 473: - 03D0 param_02 equ 0x3D0 + 474: - 03ED param_03 equ 0x3ED + 475: - 0425 param_03_done equ 0x425 + 476: - 040E param_03_neg equ 0x40E + 477: - 0429 param_04 equ 0x429 + 478: - 0439 param_04_i equ 0x439 + 479: - 043F param_05 equ 0x43F + 480: - 044C param_06 equ 0x44C + 481: - 0466 param_07 equ 0x466 + 482: - 0473 param_08 equ 0x473 + 483: - 0488 param_09 equ 0x488 + 484: - 048E param_09_0A equ 0x48E + 485: - 047F param_0A equ 0x47F + 486: - 049D param_10 equ 0x49D + 487: - 04AD param_11 equ 0x4AD + 488: - 04BC param_11_12 equ 0x4BC + 489: - 04DC param_11_12_all equ 0x4DC + 490: - 04CF param_11_12_def equ 0x4CF + 491: - 04D4 param_11_12_ix equ 0x4D4 + 492: - 04D9 param_11_12_iy equ 0x4D9 + 493: - 04B5 param_12 equ 0x4B5 + 494: - 04ED param_13 equ 0x4ED + 495: - 050C param_80 equ 0x50C + 496: - 0513 param_80_seek equ 0x513 + 497: - 0503 param_81 equ 0x503 + 498: - 0547 param_comma equ 0x547 + 499: - 0522 param_printRegister equ 0x522 + 500: - 0540 param_printRegisterA equ 0x540 + 501: - 0538 param_printRegisterHL equ 0x538 + 502: - 016A print_16_hex equ 0x16A + 503: - 0151 print_32_hex equ 0x151 + 504: - 010E print_a_hex equ 0x10E + 505: - 0120 print_bcd equ 0x120 + 506: - 00DE print_char equ 0xDE + 507: - 00F1 print_clear equ 0xF1 + 508: - 00F8 print_newLine equ 0xF8 + 509: - 01A4 print_reg equ 0x1A4 + 510: - 00E6 print_str equ 0xE6 + 511: - 00F0 print_str_end equ 0xF0 + 512: - 187B print_str_fixed equ 0x187B + 513: - 0103 print_wait_out equ 0x103 + 514: - 0138 read_bcd equ 0x138 + 515: - 0126 read_char equ 0x126 + 516: - 1543 read_lba_sector equ 0x1543 + 517: - 15E3 str_dev_done equ 0x15E3 + 518: - 15CB str_dev_waitready equ 0x15CB + 519: - 0EBC str_error_start equ 0xEBC + 520: - 0ED9 str_error_start1 equ 0xED9 + 521: - 0EE2 str_error_start2 equ 0xEE2 + 522: - 0EEB str_error_time equ 0xEEB + 523: - 1F2D str_post_apu equ 0x1F2D + 524: - 1EDC str_post_ide_30 equ 0x1EDC + 525: - 1EF7 str_post_ide_40 equ 0x1EF7 + 526: - 1F63 str_post_nd equ 0x1F63 + 527: - 1F9B str_post_ok equ 0x1F9B + 528: - 1F12 str_post_pio equ 0x1F12 + 529: - 1F48 str_post_rtc equ 0x1F48 + 530: - 1F71 str_post_rtc_iv equ 0x1F71 + 531: - 400A var_apu_present equ 0x400A + 532: - 4000 var_buffer_len equ 0x4000 + 533: - 411A var_bytes_count equ 0x411A + 534: - 4006 var_curserchar equ 0x4006 + 535: - 4007 var_curserlastaddr equ 0x4007 + 536: - 4005 var_curseron equ 0x4005 + 537: - 4004 var_curserstate equ 0x4004 + 538: - 4002 var_curserx equ 0x4002 + 539: - 4003 var_cursery equ 0x4003 + 540: - 402B var_dir equ 0x402B + 541: - 40CB var_idebuffer equ 0x40CB + 542: - 407B var_input equ 0x407B + 543: - 4001 var_last_char equ 0x4001 + 544: - 4114 var_opcode equ 0x4114 + 545: - 4116 var_opcode_length equ 0x4116 + 546: - 4119 var_opcode_pcount equ 0x4119 + 547: - 4110 var_opcode_start equ 0x4110 + 548: - 4117 var_opcode_string equ 0x4117 + 549: - 4112 var_opcode_table equ 0x4112 + 550: - 4115 var_opcode_x equ 0x4115 + 551: - 4009 var_pio_present equ 0x4009 + 552: - 401B var_ps2mem equ 0x401B + 553: - 400B var_scratch equ 0x400B +**** test.asm **** + 2: - 8000 START_ADDR .EQU 0x8000 + 3: + 4: + 5: - 8000 org START_ADDR + 6: - 8000 com_header: + 7: 0+10 8000 C34080 jp com_prg + 8: - 8003 00 db 0x00 + 9: - 8004 00000000 dw 0x00, 0x00, 0x00 ;always 0 + 0000 + 10: - 800A 0080 dw [START_ADDR] ;start addr + 11: - 800C 6580 dw [_eof] ;end of file + 12: - 800E 6500 dw [_eof - START_ADDR] ;length + 13: - 8010 ..803F 00 dc 48,0x00 + 14: + 15: - 8040 com_prg: + 16: + 17: + 18: 10+10 8040 215580 ld hl,[_str] + 19: - 8043 _l1: + 20: 20+7 8043 7E ld a, (hl) + 21: 27+4 8044 B7 or a + 22: 31+5+6 8045 C8 ret z + 23: 36+11 8046 D308 out (CS_SIO_A_D),a + 24: - 8048 _wait: + 25: 47+7 8048 3E01 ld a,1 + 26: 54+11 804A D309 out (CS_SIO_A_C),A + 27: 65+11 804C DB09 in A,(CS_SIO_A_C) ;read RRx + 28: 76+8 804E CB47 bit 0,A + 29: 84+7+5 8050 28F6 jr z,_wait + 30: 91+6 8052 23 inc hl + 31: 97+12 8053 18EE jr _l1 + 32: + 33: - 8055 _str: + 34: - 8055 0A0D4865 db 10,13,"Hello World",10,13,0 + 6C6C6F20 + 576F726C + 640A0D00 + 35: + 36: +**** test.asm **** + 37: - 8065 _eof: + + + +Statistics: + + 4 passes + 0 jr promotions + 557 symbols + 101 bytes + + + +Symbol Table: + +ADDR_RTC =D0 208 +A_RTS_OFF = 17F 383 +A_RTS_ON = 188 392 +BOOT_PHASE0 =50 80 +BOOT_PHASE1 =6E 110 +BOOT_PHASE1_LOOP=77 119 +BOOT_PHASE2 =89 137 +COMMAND =190E 6414 +COMMAND_BACKSPACE=194F 6479 +COMMAND_LUT =1883 6275 +COMMAND_PROCESS=1975 6517 +COMMAND_PROCESS_FOUND=19B0 6576 +COMMAND_PROCESS_LOOP=1978 6520 +COMMAND_PROCESS_LOOP_STR1=1981 6529 +COMMAND_PROCESS_LOOP_STR2=1997 6551 +COMMAND_PROCESS_NEXT_ENTRY=199C 6556 +COMMAND_PROCESS_NEXT_ENTRYI=199B 6555 +COMMAND_PROCESS_NOT_FOUND=19A7 6567 +COMMAND_READ =1920 6432 +CONSOLE_INIT =A5 165 +CONSOLE_INIT_CTC=A5 165 +CONSOLE_INIT_SIO=AD 173 +CS_APU_CTRL =F9 249 +CS_APU_DATA =F8 248 +CS_BANK =00 0 +CS_CTC_0 =04 4 +CS_CTC_1 =05 5 +CS_CTC_2 =06 6 +CS_CTC_3 =07 7 +CS_DIP =01 1 +CS_PIA_CR =33 51 +CS_PIA_PA =30 48 +CS_PIA_PB =31 49 +CS_PIA_PC =32 50 +CS_PIO_AC =F6 246 +CS_PIO_AD =F4 244 +CS_PIO_BC =F7 247 +CS_PIO_BD =F5 245 +CS_SIO_A_C =09 9 +CS_SIO_A_D =08 8 +CS_SIO_B_C =0B 11 +CS_SIO_B_D =0A 10 +DHEX_TO_BYTE = 1F6 502 +DHEX_TO_BYTE_FAILED= 212 530 +ERR_SYNTAX =19C6 6598 +EXEC_RST_08 = D96 3478 +EXEC_RST_10 = D9A 3482 +EXEC_RST_18 = DA6 3494 +HEX_TO_BIN = 216 534 +HEX_TO_BIN_2 = 224 548 +HEX_TO_INVALID_2= 22B 555 +IDE_CMD_IDENT =EC 236 +IDE_CMD_READSEC=20 32 +IDE_DEV_TABLE =12FA 4858 +IDE_RD =40 64 +IDE_REG_ALTSTS =16 22 +IDE_REG_CMDSTS =0F 15 +IDE_REG_DATA =08 8 +IDE_REG_DRVADDR=17 23 +IDE_REG_ERROR =09 9 +IDE_REG_HCYL =0D 13 +IDE_REG_HEAD =0E 14 +IDE_REG_LBA0 =0B 11 +IDE_REG_LBA1 =0C 12 +IDE_REG_LBA2 =0D 13 +IDE_REG_LBA3 =0E 14 +IDE_REG_LCYL =0C 12 +IDE_REG_SECTOR =0A 10 +IDE_REG_SSECTOR=0B 11 +IDE_RST =80 128 +IDE_WR =20 32 +IIC_CLK =01 1 +IIC_DATA =02 2 +INT_VEC =1B 27 +IO_AY0_ADDR =40 64 +IO_AY0_DATA =41 65 +IO_AY1_ADDR =42 66 +IO_AY1_DATA =43 67 +IO_REG0 =20 32 +IO_RTC_AMPM =25 37 +IO_RTC_CTR_D =2D 45 +IO_RTC_CTR_E =2E 46 +IO_RTC_CTR_F =2F 47 +IO_RTC_DAY0 =26 38 +IO_RTC_DAY1 =27 39 +IO_RTC_HOUR =24 36 +IO_RTC_MIN0 =22 34 +IO_RTC_MIN1 =23 35 +IO_RTC_MON0 =28 40 +IO_RTC_MON1 =29 41 +IO_RTC_SEC0 =20 32 +IO_RTC_SEC1 =21 33 +IO_RTC_WEEK =2C 44 +IO_RTC_YEAR1 =2B 43 +IO_RTC_YERR0 =2A 42 +MEM_FAT_AMOUNT =43B8 17336 +MEM_FAT_CLUSTERLEN=43BB 17339 +MEM_FAT_COUNT1 =43BC 17340 +MEM_FAT_CURDIR =43DF 17375 +MEM_FAT_CURRDIR=443F 17471 +MEM_FAT_DATASTART=43C1 17345 +MEM_FAT_DIRSEC =43CD 17357 +MEM_FAT_FILEREMAIN=43C9 17353 +MEM_FAT_OF0_ATTRIBUTE=442F 17455 +MEM_FAT_OF0_CCLUST=4431 17457 +MEM_FAT_OF0_DATREM=443B 17467 +MEM_FAT_OF0_DATSEC=4437 17463 +MEM_FAT_OF0_FATSEC=4433 17459 +MEM_FAT_RESERVED=43B6 17334 +MEM_FAT_ROOTSTART=43C5 17349 +MEM_FAT_SECTORS=43B9 17337 +MEM_FAT_TMPFNAME=43CF 17359 +MEM_FAT_TMPPOINTER=43BD 17341 +MEM_IDE_BUFFER =41B6 16822 +MEM_IDE_DEVICE =40CB 16587 +MEM_IDE_DEV_TABLE=40D5 16597 +MEM_IDE_FSBUFFER=43B6 17334 +MEM_IDE_PARTITION=40CD 16589 +MEM_IDE_POINTER=40D1 16593 +MEM_IDE_SELECTED=4115 16661 +MEM_IDE_STATUS =40CC 16588 +MEM_IDE_STRING_0=4116 16662 +MEM_IDE_STRING_1=413E 16702 +MEM_IDE_STRING_2=4166 16742 +MEM_IDE_STRING_3=418E 16782 +MSG_CLEAR = 177 375 +NOT_IMPLEMENTED=19BF 6591 +OP_CALL =1A21 6689 +OP_CD =1DF1 7665 +OP_CLR =1BB5 7093 +OP_DASM =1AA2 6818 +OP_DIR =1DED 7661 +OP_DUMP =1A41 6721 +OP_EXEC =1A08 6664 +OP_IIC_IN =1B69 7017 +OP_IIC_OUT =1B09 6921 +OP_IO_IN =1AD2 6866 +OP_IO_OUT =1AE8 6888 +OP_LSDSK =1DCA 7626 +OP_RTIME =1BB9 7097 +OP_SELDSK =1DCE 7630 +OP_SET =1A71 6769 +OP_STIME =1D51 7505 +POST_CHECK_APU =1E43 7747 +POST_CHECK_IDE_30=1E6E 7790 +POST_CHECK_IDE_40=1E81 7809 +POST_CHECK_PIO =1E1E 7710 +POST_START =1E0E 7694 +POST_TEST_RTC =1E9B 7835 +PRG_RAM_START =4110 16656 +PRG_RAM_TOP =FF00 65280 +PRINTINLINE = 191 401 +PROG_MEM_START =4000 16384 +PROG_ROM_START = 100 256 +RST_00 =00 0 +RST_08 =08 8 +RST_10 =10 16 +RST_18 =18 24 +STACK_RAM_TOP =FFFF 65535 +START_ADDR =8000 32768 +START_ROM =00 0 +STRCONV_BYTES_TO_HEX= 22D 557 +STRCONV_BYTES_TO_HEX_1= 23C 572 +STRCONV_BYTES_TO_HEX_2= 246 582 +STR_Banner_Start=256A 9578 +STR_PD_HEADER =183C 6204 +SYS_BUF_START =4010 16400 +SYS_RAM_START =4000 16384 +VAR_CONSOLE_BAUD=18 24 +VAR_CONSOLE_CONF=0F 15 +VDP_MEM =80 128 +VDP_REG =81 129 +_COMMAND_PROCESS_FOUND=19BE 6590 +_OP_CALL =1A40 6720 +_OP_IIC_ACK_ERR=1B4E 6990 +_OP_IIC_ACK_ERR_str=1B55 6997 +_OP_IIC_IN_LOOP=1B9B 7067 +_OP_IIC_IN_LOOP_TEXT=1BA8 7080 +_OP_IIC_OUT_LOOP=1B1F 6943 +_OP_IIC_OUT_SEND=1B3B 6971 +_OP_RTIME_NN =1BBC 7100 +_OP_RTIME_RD_CMD=1C74 7284 +_OP_SELDSK_INVALID=1DDD 7645 +_OP_SELDSK_INVALID_STR=1DF5 7669 +_OP_SET_LOOP =1A89 6793 +_OP_STIME_INVALID=1D17 7447 +_OP_STIME_PROMPT=1D2E 7470 +_OP_STIME_PROMPT_ERR=1D46 7494 +_OP_STIME_STR_DAY=1C75 7285 +_OP_STIME_STR_HOUR=1CC6 7366 +_OP_STIME_STR_MIN=1CE1 7393 +_OP_STIME_STR_MON=1C90 7312 +_OP_STIME_STR_SEC=1CFC 7420 +_OP_STIME_STR_YEAR=1CAB 7339 +_POST_CHECK_APU_FAILED=1E62 7778 +_POST_CHECK_IDE_FAILED=1E94 7828 +_POST_CHECK_PIO_FAILED=1E37 7735 +_POST_TEST_RTC_INVALID=1ED5 7893 +_POST_TEST_RTC_NOTFOUND=1ECE 7886 +_STR_NOT_FOUND =19E1 6625 +_STR_NOT_IMPLEMENTED=19CD 6605 +_STR_SYNTAX =19F5 6645 +_beep_pause_l1 = DC2 3522 +_compare_filename_loop=2302 8962 +_compare_filename_nomatch=2310 8976 +_eof 8065 32869 +_fat_cd_navigate=24B3 9395 +_fat_cd_navigate_end=24F9 9465 +_fat_cd_navigate_errfile=2521 9505 +_fat_cd_navigate_errfile_str=2553 9555 +_fat_cd_navigate_error=250B 9483 +_fat_cd_navigate_error_str=2529 9513 +_fat_cd_navigate_findsec=24B8 9400 +_fat_cd_navigate_findsec_skipslash=24E4 9444 +_fat_cd_navigate_goback_fl=246F 9327 +_fat_cd_navigate_inerror=2519 9497 +_fat_cd_navigate_inerrorS=2513 9491 +_fat_cd_navigate_inerrore=251A 9498 +_fat_cd_navigate_inputerr_str=2540 9536 +_fat_cd_navigate_l2=24EA 9450 +_fat_get_root_table_invalid=20FA 8442 +_fat_getfatsec_notroot=2139 8505 +_fat_increment_32=2288 8840 +_fat_lfs_loop =2200 8704 +_fat_lfs_loop_compare_end=223A 8762 +_fat_lfs_loop_compare_match=223E 8766 +_fat_lfs_loop_compare_next_sector=2212 8722 +_fat_math_add32=229C 8860 +_fat_math_mul32=22CD 8909 +_fat_math_mul32_l=22D4 8916 +_fat_math_mul32_noadd=22E1 8929 +_fat_math_sector_add_16=2274 8820 +_fat_print_directory_dir=23F0 9200 +_fat_print_directory_loop=2383 9091 +_fat_print_directory_loop_break=244D 9293 +_fat_print_directory_loop_file=239F 9119 +_fat_print_directory_loop_next=241B 9243 +_fat_print_directory_loop_next_sector=2426 9254 +_format_filename_fat16_clean=2319 8985 +_format_filename_fat16_loop=2320 8992 +_format_filename_fat16_loop_copy=2333 9011 +_format_filename_fat16_loop_skip_8=232A 9002 +_ideif_drv_sel_fail=15AB 5547 +_ideif_drv_sel_fstr0=1668 5736 +_ideif_drv_sel_pstr=165F 5727 +_ideif_drv_sel_sstr0=1676 5750 +_ideif_drv_sel_syn=1683 5763 +_ideif_init_drive_found=146E 5230 +_ideif_init_drive_loop=1456 5206 +_ideif_init_drive_nodrv=1469 5225 +_ideif_init_drive_prt_fnd=14D9 5337 +_ideif_init_drive_prt_l1=14C7 5319 +_ideif_init_drive_prt_ln=14D1 5329 +_ideif_prnt_devtable_hdr=15EB 5611 +_ideif_prnt_devtable_l1=1366 4966 +_ideif_prnt_devtable_l1_e2=142C 5164 +_ideif_prnt_devtable_l1_es=13AB 5035 +_ideif_prnt_devtable_l1_ms=1429 5161 +_ideif_prnt_devtable_l1_nxt=1373 4979 +_ideif_prnt_devtable_l1_s00=1399 5017 +_ideif_prnt_devtable_l1_s01=139E 5022 +_ideif_prnt_devtable_l1_s02=13A3 5027 +_ideif_prnt_devtable_l1_sFF=13A8 5032 +_ideif_prnt_devtable_l1_sel=1371 4977 +_ideif_prnt_devtable_master=164F 5711 +_ideif_prnt_devtable_s00=1623 5667 +_ideif_prnt_devtable_s01=162E 5678 +_ideif_prnt_devtable_s02=1639 5689 +_ideif_prnt_devtable_sFF=1644 5700 +_ideif_prnt_devtable_slave=1657 5719 +_l1 8043 32835 +_read_bcd_invalid= 14E 334 +_shift4 =1DC5 7621 +_str 8055 32853 +_wait 8048 32840 +beep = DA9 3497 +beep_loop = DAB 3499 +beep_pause = DC1 3521 +com_header 8000 32768 +com_prg 8040 32832 +compare_filename=22FE 8958 +dasm_00 = 9AE 2478 +dasm_01 = C9A 3226 +dasm_02 = A34 2612 +dasm_03 = C6C 3180 +dasm_08 = AB1 2737 +dasm_09 = C3F 3135 +dasm_0A = A16 2582 +dasm_0B = C83 3203 +dasm_10 = 9F6 2550 +dasm_12 = A3F 2623 +dasm_18 = 9B9 2489 +dasm_1A = A20 2592 +dasm_20 = 9D3 2515 +dasm_22 = CE0 3296 +dasm_27 = A79 2681 +dasm_28 = 9CC 2508 +dasm_2A = CB1 3249 +dasm_2F = A7D 2685 +dasm_30 = 9C4 2500 +dasm_32 = A4A 2634 +dasm_37 = A89 2697 +dasm_38 = 9BD 2493 +dasm_3A = A2A 2602 +dasm_3F = A85 2693 +dasm_76 = A8D 2701 +dasm_80C6 = B0A 2826 +dasm_BE = AA7 2727 +dasm_C3 = 9B2 2482 +dasm_C88E = B30 2864 +dasm_C9 = A02 2562 +dasm_CD = 9FC 2556 +dasm_D9 = ABE 2750 +dasm_DD = 9E4 2532 +dasm_DD_01 = CA1 3233 +dasm_DD_09 = C5A 3162 +dasm_DD_22 = CF6 3318 +dasm_DD_23 = C71 3185 +dasm_DD_2A = CC8 3272 +dasm_DD_2B = C88 3208 +dasm_DD_34 = C0A 3082 +dasm_DD_35 = C27 3111 +dasm_DD_86 = B12 2834 +dasm_DD_8E = B38 2872 +dasm_DD_96 = B5B 2907 +dasm_DD_9E = B7B 2939 +dasm_DD_A6 = B9C 2972 +dasm_DD_AE = BD3 3027 +dasm_DD_B6 = BB8 3000 +dasm_DD_BE = BEF 3055 +dasm_DD_E1 = D48 3400 +dasm_DD_E3 = ACE 2766 +dasm_DD_E5 = D32 3378 +dasm_DD_F9 = D18 3352 +dasm_E1 = D42 3394 +dasm_E3 = AC2 2754 +dasm_E5 = D2C 3372 +dasm_E9 = 9DB 2523 +dasm_ED_42 = C51 3153 +dasm_ED_43 = CEC 3308 +dasm_ED_44 = A81 2689 +dasm_ED_45 = A0C 2572 +dasm_ED_46 = A98 2712 +dasm_ED_4A = C48 3144 +dasm_ED_4B = CBD 3261 +dasm_ED_4D = A07 2567 +dasm_ED_56 = A9D 2717 +dasm_ED_5E = AA2 2722 +dasm_ED_A0 = AE6 2790 +dasm_ED_A1 = AF8 2808 +dasm_ED_A8 = AEF 2799 +dasm_ED_A9 = B01 2817 +dasm_ED_B0 = AEA 2794 +dasm_ED_B1 = AFC 2812 +dasm_ED_B8 = AF3 2803 +dasm_ED_B9 = B05 2821 +dasm_F3 = A92 2706 +dasm_F9 = D0E 3342 +dasm_FB = A95 2709 +dasm_FD = 9ED 2541 +dasm_FD_01 = CA9 3241 +dasm_FD_09 = C63 3171 +dasm_FD_22 = D02 3330 +dasm_FD_23 = C7A 3194 +dasm_FD_2A = CD4 3284 +dasm_FD_2B = C91 3217 +dasm_FD_34 = C16 3094 +dasm_FD_35 = C33 3123 +dasm_FD_86 = B21 2849 +dasm_FD_8E = B47 2887 +dasm_FD_96 = B67 2919 +dasm_FD_9E = B89 2953 +dasm_FD_A6 = BA8 2984 +dasm_FD_AE = BDF 3039 +dasm_FD_B6 = BC3 3011 +dasm_FD_BE = BFA 3066 +dasm_FD_E1 = D50 3408 +dasm_FD_E3 = ADA 2778 +dasm_FD_E5 = D3A 3386 +dasm_FD_F9 = D22 3362 +dasm_FF = A11 2577 +dasm_UU = D58 3416 +dasm_UW = D5C 3420 +dasm__AND = B97 2967 +dasm__CP = BEB 3051 +dasm__DEC = C22 3106 +dasm__ED_47 = A69 2665 +dasm__ED_4F = A71 2673 +dasm__ED_57 = A59 2649 +dasm__ED_5F = A61 2657 +dasm__INC = C05 3077 +dasm__LD = A55 2645 +dasm__OR = BB4 2996 +dasm__SBC = B73 2931 +dasm__SUB = B56 2902 +dasm__XOR = BCE 3022 +dasm_opcode_table= 556 1366 +dasm_print16hex_addr= 383 899 +dasm_print8hex = 39B 923 +dasm_printFlags_table= D61 3425 +dasm_printRegister8_table= D71 3441 +dasm_printRegister8_table_HL= D91 3473 +dasm_printRegisterIX_table= D79 3449 +dasm_printRegisterIY_table= D81 3457 +dasm_printRegisterSP_table= D89 3465 +disassemble = 247 583 +disassemble_continue= 32D 813 +disassemble_err= 31D 797 +disassemble_next= 24B 587 +disassemble_print_opcode_params_end= 31A 794 +disassemble_print_opcode_params_loop= 2C6 710 +disassemble_print_opcode_raw= 288 648 +disassemble_print_opcode_raw_fill= 29C 668 +disassemble_table_first_match= 35F 863 +disassemble_table_found= 379 889 +disassemble_table_notfound= 37D 893 +disassemble_table_seek= 33B 827 +disassemble_table_seek_loop= 33F 831 +dump_pretty =17E1 6113 +dump_pretty_ascii=180B 6155 +dump_pretty_ascii_cont=1829 6185 +dump_pretty_ascii_loop=1813 6163 +dump_pretty_ascii_none=1824 6180 +dump_pretty_col=17FE 6142 +dump_pretty_end=183B 6203 +dump_pretty_nextrow=182F 6191 +dump_pretty_row=17E9 6121 +endPrint = 19F 415 +fat_cd_single =244F 9295 +fat_copy_lba_pointer=22F5 8949 +fat_get_root_table=202D 8237 +fat_getfatsec =2122 8482 +fat_openfile =21D3 8659 +fat_openfile_noprepare=21DB 8667 +fat_print_directory=233A 9018 +fat_readfilesec=21A8 8616 +fat_reset_pointer=22E6 8934 +format_filename_fat16=2314 8980 +ide_printerror = E89 3721 +ide_readsector_256= E15 3605 +ide_readsector_256_waitloop= E17 3607 +ide_readsector_512_inv= E3E 3646 +ide_readsector_512_inv_waitloop= E43 3651 +ide_readsector_timeout= E73 3699 +ide_regread_8 = DF7 3575 +ide_regwrite_8 = DDB 3547 +ide_reset = DCE 3534 +ide_writesector_256= E88 3720 +ideif_drv_sel =1573 5491 +ideif_get_drv_pointer=151C 5404 +ideif_init_all =1530 5424 +ideif_init_devtable=133A 4922 +ideif_init_drive=144D 5197 +ideif_prnt_devtable=1358 4952 +iic_init =16F5 5877 +iic_read_ack =1734 5940 +iic_receive_buffer=16C6 5830 +iic_receive_buffer_done=16E9 5865 +iic_receive_buffer_err=16EF 5871 +iic_receive_buffer_loop=16D7 5847 +iic_receive_byte=17BA 6074 +iic_receive_byte_loop=17C7 6087 +iic_send_ack =175A 5978 +iic_send_buffer=169C 5788 +iic_send_buffer_done=16BA 5818 +iic_send_buffer_err=16C0 5824 +iic_send_buffer_loop=16AC 5804 +iic_send_byte =1794 6036 +iic_send_byte_loop=17A0 6048 +iic_send_ebit =1713 5907 +iic_send_nack =1777 6007 +iic_send_sbit =16FE 5886 +mon_var_template=44 68 +mon_var_template_end= 40F 1039 +nxtILC = 194 404 +param_01 = 3A9 937 +param_02 = 3D0 976 +param_03 = 3ED 1005 +param_03_done = 425 1061 +param_03_neg = 40E 1038 +param_04 = 429 1065 +param_04_i = 439 1081 +param_05 = 43F 1087 +param_06 = 44C 1100 +param_07 = 466 1126 +param_08 = 473 1139 +param_09 = 488 1160 +param_09_0A = 48E 1166 +param_0A = 47F 1151 +param_10 = 49D 1181 +param_11 = 4AD 1197 +param_11_12 = 4BC 1212 +param_11_12_all= 4DC 1244 +param_11_12_def= 4CF 1231 +param_11_12_ix = 4D4 1236 +param_11_12_iy = 4D9 1241 +param_12 = 4B5 1205 +param_13 = 4ED 1261 +param_80 = 50C 1292 +param_80_seek = 513 1299 +param_81 = 503 1283 +param_comma = 547 1351 +param_printRegister= 522 1314 +param_printRegisterA= 540 1344 +param_printRegisterHL= 538 1336 +print_16_hex = 16A 362 +print_32_hex = 151 337 +print_a_hex = 10E 270 +print_bcd = 120 288 +print_char =DE 222 +print_clear =F1 241 +print_newLine =F8 248 +print_reg = 1A4 420 +print_str =E6 230 +print_str_end =F0 240 +print_str_fixed=187B 6267 +print_wait_out = 103 259 +read_bcd = 138 312 +read_char = 126 294 +read_lba_sector=1543 5443 +str_dev_done =15E3 5603 +str_dev_waitready=15CB 5579 +str_error_start= EBC 3772 +str_error_start1= ED9 3801 +str_error_start2= EE2 3810 +str_error_time = EEB 3819 +str_post_apu =1F2D 7981 +str_post_ide_30=1EDC 7900 +str_post_ide_40=1EF7 7927 +str_post_nd =1F63 8035 +str_post_ok =1F9B 8091 +str_post_pio =1F12 7954 +str_post_rtc =1F48 8008 +str_post_rtc_iv=1F71 8049 +var_apu_present=400A 16394 +var_buffer_len =4000 16384 +var_bytes_count=411A 16666 +var_curserchar =4006 16390 +var_curserlastaddr=4007 16391 +var_curseron =4005 16389 +var_curserstate=4004 16388 +var_curserx =4002 16386 +var_cursery =4003 16387 +var_dir =402B 16427 +var_idebuffer =40CB 16587 +var_input =407B 16507 +var_last_char =4001 16385 +var_opcode =4114 16660 +var_opcode_length=4116 16662 +var_opcode_pcount=4119 16665 +var_opcode_start=4110 16656 +var_opcode_string=4117 16663 +var_opcode_table=4112 16658 +var_opcode_x =4115 16661 +var_pio_present=4009 16393 +var_ps2mem =401B 16411 +var_scratch =400B 16395 diff --git a/OperatingSystem/software2/zout/test.mon b/OperatingSystem/software2/zout/test.mon new file mode 100644 index 0000000..67e7daa --- /dev/null +++ b/OperatingSystem/software2/zout/test.mon @@ -0,0 +1,7 @@ +!8000 C3 40 80 00 00 00 00 00 00 00 00 80 65 80 65 00 +!8010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +!8020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +!8030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +!8040 21 55 80 7E B7 C8 D3 08 3E 01 D3 09 DB 09 CB 47 +!8050 28 F6 23 18 EE 0A 0D 48 65 6C 6C 6F 20 57 6F 72 +!8060 6C 64 0A 0D 00