-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restructured ACME folder and added missing files (LICENCE, etc)
Note ACME_LIBS not used yet!
- Loading branch information
Showing
163 changed files
with
14,837 additions
and
119 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
;ACME 0.94.4 | ||
|
||
!ifdef lib_6502_opcodes_a !eof | ||
lib_6502_opcodes_a = 1 | ||
|
||
; if your self-modifying code not only changes its arguments, but even its opcodes, use these constants. | ||
; unused slots in this table indicate "illegal" instructions. | ||
|
||
; addressing mode modifiers: | ||
; <nothing> for implied addressing (BRK/CLC/NOP/TAX/...) and branches | ||
; _A for "accumulator addressing" (ASL/ROL/LSR/ROR without argument) | ||
; (...using "_A" instead of nothing so user does not forget to specify addressing mode) | ||
; _IMM 8-bit constant (immediate addressing) | ||
; _8 8-bit address (zero page addressing) | ||
; _8X, _8Y 8-bit address with X/Y indexing | ||
; _8XI, _8IY 8-bit address, indirect: TLA ($12, x) and TLA ($12), y | ||
; _16 16-bit address (absolute addressing) | ||
; _16X, _16Y 16-bit address with X/Y indexing | ||
; _16I 16-bit address, indirect: JMP ($1234) | ||
|
||
;pattern %......00 pattern %......01 pattern %......10 pattern %......11 (all illegal) | ||
opcode_BRK = 0x00: opcode_ORA_8XI = 0x01 | ||
opcode_ORA_8 = 0x05: opcode_ASL_8 = 0x06 | ||
opcode_PHP = 0x08: opcode_ORA_IMM = 0x09: opcode_ASL_A = 0x0a | ||
opcode_ORA_16 = 0x0d: opcode_ASL_16 = 0x0e | ||
opcode_BPL = 0x10: opcode_ORA_8IY = 0x11 | ||
opcode_ORA_8X = 0x15: opcode_ASL_8X = 0x16 | ||
opcode_CLC = 0x18: opcode_ORA_16Y = 0x19 | ||
opcode_ORA_16X = 0x1d: opcode_ASL_16X = 0x1e | ||
opcode_JSR_16 = 0x20: opcode_AND_8XI = 0x21 | ||
opcode_BIT_8 = 0x24: opcode_AND_8 = 0x25: opcode_ROL_8 = 0x26 | ||
opcode_PLP = 0x28: opcode_AND_IMM = 0x29: opcode_ROL_A = 0x2a | ||
opcode_BIT_16 = 0x2c: opcode_AND_16 = 0x2d: opcode_ROL_16 = 0x2e | ||
opcode_BMI = 0x30: opcode_AND_8IY = 0x31 | ||
opcode_AND_8X = 0x35: opcode_ROL_8X = 0x36 | ||
opcode_SEC = 0x38: opcode_AND_16Y = 0x39 | ||
opcode_AND_16X = 0x3d: opcode_ROL_16X = 0x3e | ||
opcode_RTI = 0x40: opcode_EOR_8XI = 0x41 | ||
opcode_EOR_8 = 0x45: opcode_LSR_8 = 0x46 | ||
opcode_PHA = 0x48: opcode_EOR_IMM = 0x49: opcode_LSR_A = 0x4a | ||
opcode_JMP_16 = 0x4c: opcode_EOR_16 = 0x4d: opcode_LSR_16 = 0x4e | ||
opcode_BVC = 0x50: opcode_EOR_8IY = 0x51 | ||
opcode_EOR_8X = 0x55: opcode_LSR_8X = 0x56 | ||
opcode_CLI = 0x58: opcode_EOR_16Y = 0x59 | ||
opcode_EOR_16X = 0x5d: opcode_LSR_16X = 0x5e | ||
opcode_RTS = 0x60: opcode_ADC_8XI = 0x61 | ||
opcode_ADC_8 = 0x65: opcode_ROR_8 = 0x66 | ||
opcode_PLA = 0x68: opcode_ADC_IMM = 0x69: opcode_ROR_A = 0x6a | ||
opcode_JMP_16I = 0x6c: opcode_ADC_16 = 0x6d: opcode_ROR_16 = 0x6e | ||
opcode_BVS = 0x70: opcode_ADC_8IY = 0x71 | ||
opcode_ADC_8X = 0x75: opcode_ROR_8X = 0x76 | ||
opcode_SEI = 0x78: opcode_ADC_16Y = 0x79 | ||
opcode_ADC_16X = 0x7d: opcode_ROR_16X = 0x7e | ||
opcode_STA_8XI = 0x81 | ||
opcode_STY_8 = 0x84: opcode_STA_8 = 0x85: opcode_STX_8 = 0x86 | ||
opcode_DEY = 0x88: opcode_TXA = 0x8a | ||
opcode_STY_16 = 0x8c: opcode_STA_16 = 0x8d: opcode_STX_16 = 0x8e | ||
opcode_BCC = 0x90: opcode_STA_8IY = 0x91 | ||
opcode_STY_8X = 0x94: opcode_STA_8X = 0x95: opcode_STX_8Y = 0x96 | ||
opcode_TYA = 0x98: opcode_STA_16Y = 0x99: opcode_TXS = 0x9a | ||
opcode_STA_16X = 0x9d | ||
opcode_LDY_IMM = 0xa0: opcode_LDA_8XI = 0xa1: opcode_LDX_IMM = 0xa2 | ||
opcode_LDY_8 = 0xa4: opcode_LDA_8 = 0xa5: opcode_LDX_8 = 0xa6 | ||
opcode_TAY = 0xa8: opcode_LDA_IMM = 0xa9: opcode_TAX = 0xaa | ||
opcode_LDY_16 = 0xac: opcode_LDA_16 = 0xad: opcode_LDX_16 = 0xae | ||
opcode_BCS = 0xb0: opcode_LDA_8IY = 0xb1 | ||
opcode_LDY_8X = 0xb4: opcode_LDA_8X = 0xb5: opcode_LDX_8Y = 0xb6 | ||
opcode_CLV = 0xb8: opcode_LDA_16Y = 0xb9: opcode_TSX = 0xba | ||
opcode_LDY_16X = 0xbc: opcode_LDA_16X = 0xbd: opcode_LDX_16Y = 0xbe | ||
opcode_CPY_IMM = 0xc0: opcode_CMP_8XI = 0xc1 | ||
opcode_CPY_8 = 0xc4: opcode_CMP_8 = 0xc5: opcode_DEC_8 = 0xc6 | ||
opcode_INY = 0xc8: opcode_CMP_IMM = 0xc9: opcode_DEX = 0xca | ||
opcode_CPY_16 = 0xcc: opcode_CMP_16 = 0xcd: opcode_DEC_16 = 0xce | ||
opcode_BNE = 0xd0: opcode_CMP_8IY = 0xd1 | ||
opcode_CMP_8X = 0xd5: opcode_DEC_8X = 0xd6 | ||
opcode_CLD = 0xd8: opcode_CMP_16Y = 0xd9 | ||
opcode_CMP_16X = 0xdd: opcode_DEC_16X = 0xde | ||
opcode_CPX_IMM = 0xe0: opcode_SBC_8XI = 0xe1 | ||
opcode_CPX_8 = 0xe4: opcode_SBC_8 = 0xe5: opcode_INC_8 = 0xe6 | ||
opcode_INX = 0xe8: opcode_SBC_IMM = 0xe9: opcode_NOP = 0xea | ||
opcode_CPX_16 = 0xec: opcode_SBC_16 = 0xed: opcode_INC_16 = 0xee | ||
opcode_BEQ = 0xf0: opcode_SBC_8IY = 0xf1 | ||
opcode_SBC_8X = 0xf5: opcode_INC_8X = 0xf6 | ||
opcode_SED = 0xf8: opcode_SBC_16Y = 0xf9 | ||
opcode_SBC_16X = 0xfd: opcode_INC_16X = 0xfe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
;ACME 0.96.4 | ||
|
||
!ifdef lib_6502_std_a !eof | ||
lib_6502_std_a = 1 | ||
|
||
; labels and macros for plain 6502 processor | ||
|
||
!address { | ||
cpu_nmi = $fffa | ||
cpu_reset = $fffc | ||
cpu_irq = $fffe | ||
} | ||
|
||
; skip byte | ||
!macro bit8 { | ||
!byte $24 ; opcode of BIT $.. command | ||
} | ||
|
||
; skip word | ||
!macro bit16 { | ||
!byte $2c ; opcode of BIT $.... command | ||
} | ||
|
||
; increase 16-bit counter | ||
!macro inc16 @t { | ||
inc @t | ||
bne + | ||
inc @t + 1 | ||
+ | ||
} | ||
|
||
; far branches | ||
!macro bcc @t { | ||
bcs + | ||
jmp @t | ||
+ | ||
} | ||
!macro bcs @t { | ||
bcc + | ||
jmp @t | ||
+ | ||
} | ||
|
||
!macro beq @t { | ||
bne + | ||
jmp @t | ||
+ | ||
} | ||
|
||
!macro bne @t { | ||
beq + | ||
jmp @t | ||
+ | ||
} | ||
|
||
!macro bmi @t { | ||
bpl + | ||
jmp @t | ||
+ | ||
} | ||
|
||
!macro bpl @t { | ||
bmi + | ||
jmp @t | ||
+ | ||
} | ||
|
||
!macro bvc @t { | ||
bvs + | ||
jmp @t | ||
+ | ||
} | ||
|
||
!macro bvs @t { | ||
bvc + | ||
jmp @t | ||
+ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
;ACME 0.96.4 | ||
|
||
!ifdef lib_65816_std_a !eof | ||
lib_65816_std_a = 2 | ||
|
||
; Labels and macros for Western Digital's 65c816 processor | ||
|
||
!address { | ||
cpu_e_cop = $fff4 | ||
cpu_e_abort = $fff8 | ||
cpu_e_nmi = $fffa | ||
cpu_e_reset = $fffc | ||
cpu_e_irq = $fffe | ||
|
||
cpu_n_cop = $ffe4 | ||
cpu_n_brk = $ffe6 | ||
cpu_n_abort = $ffe8 | ||
cpu_n_nmi = $ffea | ||
; no reset vector for native mode because reset always enters emulation mode | ||
cpu_n_irq = $ffee | ||
} | ||
|
||
!macro cpu_emu {; switch to emulation mode | ||
sec | ||
xce | ||
} | ||
|
||
!macro cpu_native {; switch to native mode | ||
clc | ||
xce | ||
} | ||
|
||
!macro a8 {; switch A to 8 bit | ||
sep #%..#..... | ||
!as | ||
} | ||
|
||
!macro a16 {; switch A to 16 bit | ||
rep #%..#..... | ||
!al | ||
} | ||
|
||
!macro i8 {; switch X/Y to 8 bit | ||
sep #%...#.... | ||
!rs | ||
} | ||
|
||
!macro i16 {; switch X/Y to 16 bit | ||
rep #%...#.... | ||
!rl | ||
} | ||
|
||
!macro ai8 {; switch A/X/Y to 8 bit | ||
sep #%..##.... | ||
!as | ||
!rs | ||
} | ||
|
||
!macro ai16 {; switch A/X/Y to 16 bit | ||
rep #%..##.... | ||
!al | ||
!rl | ||
} | ||
|
||
!macro a8i16 {; switch A to 8, X/Y to 16 bit | ||
+a8 | ||
+i16 | ||
} | ||
|
||
!macro a16i8 {; switch A to 16, X/Y to 8 bit | ||
+a16 | ||
+i8 | ||
} | ||
|
||
!macro inc24 @t {; increase 24-bit counter | ||
inc @t | ||
bne + | ||
inc @t + 1 | ||
bne + | ||
inc @t + 2 | ||
+ | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
;ACME 0.95.1 | ||
|
||
!ifdef lib_cbm_baserror_a !eof | ||
lib_cbm_baserror_a = 1 | ||
|
||
; i/o error 0 (BREAK) is mapped to basic error 30 | ||
; codes 1 through 9 are the same for i/o and basic errors: | ||
baserror_TOO_MANY_FILES = 1 | ||
baserror_FILE_OPEN = 2 | ||
baserror_FILE_NOT_OPEN = 3 | ||
baserror_FILE_NOT_FOUND = 4 | ||
baserror_DEVICE_NOT_PRESENT = 5 | ||
baserror_NOT_INPUT_FILE = 6 | ||
baserror_NOT_OUTPUT_FILE = 7 | ||
baserror_MISSING_FILE_NAME = 8 | ||
baserror_ILLEGAL_DEVICE_NUMBER = 9 | ||
; from here on basic errors only: | ||
baserror_NEXT_WITHOUT_FOR = 10 | ||
baserror_SYNTAX = 11 | ||
baserror_RETURN_WITHOUT_GOSUB = 12 | ||
baserror_OUT_OF_DATA = 13 | ||
baserror_ILLEGAL_QUANTITY = 14 | ||
baserror_OVERFLOW = 15 | ||
baserror_OUT_OF_MEMORY = 16 | ||
baserror_UNDEFD_STATEMENT = 17 | ||
baserror_BAD_SUBSCRIPT = 18 | ||
baserror_REDIMD_ARRAY = 19 | ||
baserror_DIVISION_BY_ZERO = 20 | ||
baserror_ILLEGAL_DIRECT = 21 | ||
baserror_TYPE_MISMATCH = 22 | ||
baserror_STRING_TOO_LONG = 23 | ||
baserror_FILE_DATA = 24 | ||
baserror_FORMULA_TOO_COMPLEX = 25 | ||
baserror_CANT_CONTINUE = 26 | ||
baserror_UNDEFINED_FUNCTION = 27 | ||
baserror_VERIFY = 28 | ||
baserror_LOAD = 29 | ||
baserror_BREAK = 30 | ||
; basic 3.5 and higher: | ||
baserror_CANT_RESUME = 31 | ||
baserror_LOOP_NOT_FOUND = 32 | ||
baserror_LOOP_WITHOUT_DO = 33 | ||
baserror_DIRECT_MODE_ONLY = 34 | ||
baserror_NO_GRAPHICS_AREA = 35 | ||
baserror_BAD_DISK = 36 | ||
; basic 7 and higher: | ||
baserror_BEND_NOT_FOUND = 37 | ||
baserror_LINE_NUMBER_TOO_LARGE = 38 ; for RENUMBER | ||
baserror_UNRESOLVED_REFERENCE = 39 ; for RENUMBER | ||
baserror_UNIMPLEMENTED_COMMAND = 40 ; for OFF and QUIT | ||
baserror_FILE_READ = 41 |
Oops, something went wrong.