Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; Test file for .orgASM
- .equ TEST 14
- TEST2 .equ 18
- TEST .equ 12 ; Duplicate
- .org 5
- #nolist
- ADD B, A
- SET PC, 0x8000
- .list
- SET A, 10 + 'b' - 0b101101 * 0x14 / (0o7 << TEST) | (4 >> (10 & 13)) ^ ~10
- SET PC, label1 ; Forward-referencing
- label1:
- :label2
- SET A,B ; Comment "te'st"
- SET pop, A
- JSR $++
- SET A, [B]
- $:
- SET B , [0]
- SET C, [A+2]
- ADD A, B
- .org 0x8000
- $:
- SET A, $+0x20
- label3:
- invalid label:
- IFB A, Z
- MUL notaregister, b
- INVALIDOPCODE A, Z
- label1: ; Duplicate
- DIV A,I
- SET PC, pop
- JSR label3
- SET A, A
- SET 10, A
- .org 0x8000
- SET A, $+0x10
- #ifdef TEST
- SET A, 1
- #end
- #ifdef NOTDEFINED
- SET A, 0
- #end
- SET PC, POP
- #ifdef
- #ifdef TOO MANY PARAMETERS
- #end
- .dat 0, 1, 0x2, 0x03, 'b', "Hello\nworld!"
- testSource.asm (line 2): [0x0000] .equ TEST 14
- testSource.asm (line 3): [0x0000] .equ TEST2 18
- testSource.asm (line 4): [0x0000] Error: Duplicate name.
- testSource.asm (line 4): [0x0000] .equ TEST 12
- testSource.asm (line 6): [0x0005] .org 5
- testSource.asm (line 8): [0x0005] #nolist
- testSource.asm (line 9): [NOLIST] 0012 ADD B, A
- testSource.asm (line 10): [NOLIST] 7DC1 8000 SET PC, 0x8000
- testSource.asm (line 11): [0x0005] .list
- testSource.asm (line 12): [0x0005] 8001 SET A, 10 + 'b' - 0b101101 * 0x14 / (0o7 << TEST) | (4 >> (10 & 13)) ^ ~10
- testSource.asm (line 13): [0x0006] 95C1 SET PC, label1
- testSource.asm (line 14): [0x0005] label1:
- testSource.asm (line 15): [0x0005] :label2
- testSource.asm (line 16): [0x0007] 0401 SET A,B
- testSource.asm (line 17): [0x0008] 0181 SET pop, A
- testSource.asm (line 18): [0x0009] 0010 8000 JSR $++
- testSource.asm (line 19): [0x000B] 2401 SET A, [B]
- testSource.asm (line 21): [0x000C] 7811 0000 SET B , [0]
- testSource.asm (line 22): [0x000E] 4021 0002 SET C, [A+2]
- testSource.asm (line 23): [0x0010] 0402 ADD A, B
- testSource.asm (line 24): [0x8000] .org 0x8000
- testSource.asm (line 26): [0x8000] 7C01 8000 SET A, $+0x20
- testSource.asm (line 27): [0x8001] label3:
- testSource.asm (line 28): [0x8001] Error: Invalid label name.
- testSource.asm (line 28): [0x8001] invalid label:
- testSource.asm (line 29): [0x8002] 140F IFB A, Z
- testSource.asm (line 30): [0x8003] Error: Illegal expression.
- testSource.asm (line 30): [0x8003] MUL notaregister, b
- testSource.asm (line 31): [0x8003] Error: Invalid opcode.
- testSource.asm (line 31): [0x8003] INVALIDOPCODE A, Z
- testSource.asm (line 32): [0x8002] Error: Duplicate name.
- testSource.asm (line 32): [0x8002] label1:
- testSource.asm (line 33): [0x8003] 1805 DIV A,I
- testSource.asm (line 34): [0x8004] 61C1 SET PC, pop
- testSource.asm (line 35): [0x8005] 0010 8001 JSR label3
- testSource.asm (line 36): [0x8007] Warning: Redundant statement.
- testSource.asm (line 36): [0x8007] 0001 SET A, A
- testSource.asm (line 37): [0x8008] Warning: Attempted to assign to a literal.
- testSource.asm (line 37): [0x8008] A9F1 SET 10, A
- testSource.asm (line 38): [0x8000] .org 0x8000
- testSource.asm (line 39): [0x8000] Error: Illegal expression.
- testSource.asm (line 39): [0x8000] SET A, $+ + 0x10
- testSource.asm (line 40): [0x8000] #ifdef TEST
- testSource.asm (line 41): [0x8000] 8401 SET A, 1
- testSource.asm (line 42): [0x8001] #end
- testSource.asm (line 43): [0x8001] #ifdef NOTDEFINED
- testSource.asm (line 45): [0x8001] #end
- testSource.asm (line 47): [0x8001] 61C1 SET PC, POP
- testSource.asm (line 48): [0x8002] Error: Insufficient parameters.
- testSource.asm (line 48): [0x8002] #ifdef
- testSource.asm (line 49): [0x8002] Error: Too many parameters.
- testSource.asm (line 49): [0x8002] #ifdef TOO MANY PARAMETERS
- testSource.asm (line 50): [0x8002] #end
- testSource.asm (line 51): [0x8002] .dat 0, 1, 0x2, 0x03, 'b', "Hello\nworld!"
- testSource.asm (line 51): [0x8002] 0000 0001 0002 0003 0062 0048 0065 006C
- testSource.asm (line 51): [0x800A] 006C 006F 000A 0077 006F 0072 006C 0064
- testSource.asm (line 51): [0x8012] 0021
Advertisement
Add Comment
Please, Sign In to add comment