daily pastebin goal


maximinus Apr 7th, 2012 292 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;list of errors that all compilers should check
  2. ;all lines up to :start will be skipped by the test program
  4. :start
  5.                 sit a, 3                ;instruction name incorrect
  6.                 set d, 4                ;wrong register name
  7.                 set a, 70000    ;integer too big
  8.                 set a, 0xfffff  ;hex value too large
  9.                 set a a                 ;no comma to seperate
  10.                 set a                   ;missing operand
  11.                 set                             ;no operands
  12. label   set a, 0                ;label has no colon
  13. loop:   set a, 0                ;label is at wrong end
  14.                 set a, [x               ;missing right square bracket
  15.                 set a, x]               ;missing left square bracket
  16.                 jsr a, a                ;too many operands on a jsr
  17.                 set a, aaa              ;no label exists
  18.                 set a, [aaa]    ;no indexed label exists
  19.                 div a, 0                ;catch compiler divide by zero errors
RAW Paste Data