SirCmpwn

Untitled

Apr 19th, 2012
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.26 KB | None | 0 0
  1. ; Test file for .orgASM
  2. .equ TEST 14
  3. TEST2 .equ 18
  4. TEST .equ 12 ; Duplicate
  5.  
  6. .org 5
  7.  
  8. #nolist
  9. ADD B, A
  10. SET PC, 0x8000
  11. .list
  12. SET A, 10 + 'b' - 0b101101 * 0x14 / (0o7 << TEST) | (4 >> (10 & 13)) ^ ~10
  13. SET PC, label1 ; Forward-referencing
  14. label1:
  15. :label2
  16. SET A,B ; Comment "te'st"
  17. SET pop, A
  18. JSR $++
  19. SET A, [B]
  20. $:
  21. SET B , [0]
  22. SET C, [A+2]
  23. ADD A, B
  24. .org 0x8000
  25. $:
  26. SET A, $+0x20
  27. label3:
  28. invalid label:
  29. IFB A, Z
  30. MUL notaregister, b
  31. INVALIDOPCODE A, Z
  32. label1: ; Duplicate
  33. DIV A,I
  34. SET PC, pop
  35. JSR label3
  36. SET A, A
  37. SET 10, A
  38. .org 0x8000
  39. SET A, $+0x10
  40. #ifdef TEST
  41. SET A, 1
  42. #end
  43. #ifdef NOTDEFINED
  44. SET A, 0
  45. #end
  46. SET PC, POP
  47. #ifdef
  48. #ifdef TOO MANY PARAMETERS
  49. #end
  50. .dat 0, 1, 0x2, 0x03, 'b', "Hello\nworld!"
  51.  
  52. testSource.asm (line 2): [0x0000] .equ TEST 14
  53. testSource.asm (line 3): [0x0000] .equ TEST2 18
  54. testSource.asm (line 4): [0x0000] Error: Duplicate name.
  55. testSource.asm (line 4): [0x0000] .equ TEST 12
  56. testSource.asm (line 6): [0x0005] .org 5
  57. testSource.asm (line 8): [0x0005] #nolist
  58. testSource.asm (line 9): [NOLIST] 0012 ADD B, A
  59. testSource.asm (line 10): [NOLIST] 7DC1 8000 SET PC, 0x8000
  60. testSource.asm (line 11): [0x0005] .list
  61. testSource.asm (line 12): [0x0005] 8001 SET A, 10 + 'b' - 0b101101 * 0x14 / (0o7 << TEST) | (4 >> (10 & 13)) ^ ~10
  62. testSource.asm (line 13): [0x0006] 95C1 SET PC, label1
  63. testSource.asm (line 14): [0x0005] label1:
  64. testSource.asm (line 15): [0x0005] :label2
  65. testSource.asm (line 16): [0x0007] 0401 SET A,B
  66. testSource.asm (line 17): [0x0008] 0181 SET pop, A
  67. testSource.asm (line 18): [0x0009] 0010 8000 JSR $++
  68. testSource.asm (line 19): [0x000B] 2401 SET A, [B]
  69. testSource.asm (line 21): [0x000C] 7811 0000 SET B , [0]
  70. testSource.asm (line 22): [0x000E] 4021 0002 SET C, [A+2]
  71. testSource.asm (line 23): [0x0010] 0402 ADD A, B
  72. testSource.asm (line 24): [0x8000] .org 0x8000
  73. testSource.asm (line 26): [0x8000] 7C01 8000 SET A, $+0x20
  74. testSource.asm (line 27): [0x8001] label3:
  75. testSource.asm (line 28): [0x8001] Error: Invalid label name.
  76. testSource.asm (line 28): [0x8001] invalid label:
  77. testSource.asm (line 29): [0x8002] 140F IFB A, Z
  78. testSource.asm (line 30): [0x8003] Error: Illegal expression.
  79. testSource.asm (line 30): [0x8003] MUL notaregister, b
  80. testSource.asm (line 31): [0x8003] Error: Invalid opcode.
  81. testSource.asm (line 31): [0x8003] INVALIDOPCODE A, Z
  82. testSource.asm (line 32): [0x8002] Error: Duplicate name.
  83. testSource.asm (line 32): [0x8002] label1:
  84. testSource.asm (line 33): [0x8003] 1805 DIV A,I
  85. testSource.asm (line 34): [0x8004] 61C1 SET PC, pop
  86. testSource.asm (line 35): [0x8005] 0010 8001 JSR label3
  87. testSource.asm (line 36): [0x8007] Warning: Redundant statement.
  88. testSource.asm (line 36): [0x8007] 0001 SET A, A
  89. testSource.asm (line 37): [0x8008] Warning: Attempted to assign to a literal.
  90. testSource.asm (line 37): [0x8008] A9F1 SET 10, A
  91. testSource.asm (line 38): [0x8000] .org 0x8000
  92. testSource.asm (line 39): [0x8000] Error: Illegal expression.
  93. testSource.asm (line 39): [0x8000] SET A, $+ + 0x10
  94. testSource.asm (line 40): [0x8000] #ifdef TEST
  95. testSource.asm (line 41): [0x8000] 8401 SET A, 1
  96. testSource.asm (line 42): [0x8001] #end
  97. testSource.asm (line 43): [0x8001] #ifdef NOTDEFINED
  98. testSource.asm (line 45): [0x8001] #end
  99. testSource.asm (line 47): [0x8001] 61C1 SET PC, POP
  100. testSource.asm (line 48): [0x8002] Error: Insufficient parameters.
  101. testSource.asm (line 48): [0x8002] #ifdef
  102. testSource.asm (line 49): [0x8002] Error: Too many parameters.
  103. testSource.asm (line 49): [0x8002] #ifdef TOO MANY PARAMETERS
  104. testSource.asm (line 50): [0x8002] #end
  105. testSource.asm (line 51): [0x8002] .dat 0, 1, 0x2, 0x03, 'b', "Hello\nworld!"
  106. testSource.asm (line 51): [0x8002] 0000 0001 0002 0003 0062 0048 0065 006C
  107. testSource.asm (line 51): [0x800A] 006C 006F 000A 0077 006F 0072 006C 0064
  108. testSource.asm (line 51): [0x8012] 0021
Advertisement
Add Comment
Please, Sign In to add comment