1# MACRO: exit 2 .macro exit nr 3 ldd # \nr 4 # The debug insn class. 5 .byte 0xcd 6 # The exit utility function. 7 .byte 0x03 8 .endm 9 10# MACRO: pass 11# Write 'pass' to stdout and quit 12 .macro pass 13 # Point to the string. 14 # NB: See comment above _pass below. 15 ldx #0x8000 16 # Number of bytes to write. 17 ldd #5 18 # The debug insn class. 19 .byte 0xcd 20 # The write utility function. 21 .byte 0x01 22 exit 0 23 .endm 24 25# MACRO: ffail 26# Write 'ffail' to stdout and quit 27# Normally this would be 'fail', but m68k has a pseudo "fail" op. 28 .macro ffail 29 # Point to the string. 30 ldx #0x8006 31 # Number of bytes to write. 32 ldd #5 33 # The debug insn class. 34 .byte 0xcd 35 # The write utility function. 36 .byte 0x01 37 exit 0 38 .endm 39 40# MACRO: start 41# All assembler tests should start with a call to "start" 42 .macro start 43 .text 44# These need to be at the start of text as it's the only stable address. 45# The sim will load all sections starting at the .text address and ignore 46# the addresses for the other sections. 47_pass: 48 .asciz "pass\n" 49_fail: 50 .asciz "fail\n" 51.global _start 52_start: 53 .endm 54