1 # MACRO: outc 2 # Write byte to stdout 3 .macro outc ch 4 ldi r16, \ch 5 out 0x32, r16 6 .endm 7 8 # MACRO: exit 9 .macro exit nr 10 ldi r16, \nr 11 out 0x2f, r16 12 .endm 13 14 # MACRO: pass 15 # Write 'pass' to stdout and quit 16 .macro pass 17 outc 'p' 18 outc 'a' 19 outc 's' 20 outc 's' 21 outc '\n' 22 exit 0 23 .endm 24 25 # MACRO: fail 26 # Write 'fail' to stdout and quit 27 .macro fail 28 outc 'f' 29 outc 'a' 30 outc 'i' 31 outc 'l' 32 outc '\n' 33 exit 1 34 .endm 35 36 # MACRO: start 37 # All assembler tests should start with a call to "start" 38 .macro start 39 .text 40 .global _start 41 _start: 42 .endm 43