1 1.1 christos 2 1.1.1.2 christos /* Print "pass\n" and 'exit 0' */ 3 1.1 christos .macro pass 4 1.1 christos .data 5 1.1 christos mpass: 6 1.1 christos .string "pass\n" 7 1.1 christos .text 8 1.1 christos _pass: 9 1.1.1.2 christos lddw %r1, mpass /* point to "pass\n" string */ 10 1.1.1.2 christos mov %r2, 5 /* strlen mpass */ 11 1.1.1.2 christos call 7 /* printk */ 12 1.1.1.2 christos mov %r0, 0 13 1.1.1.2 christos exit /* exit 0 */ 14 1.1 christos .endm 15 1.1 christos 16 1.1.1.2 christos /* MACRO fail 17 1.1.1.2 christos Exit with status 1 */ 18 1.1 christos .macro fail 19 1.1 christos mov %r0, 1 20 1.1 christos exit 21 1.1 christos .endm 22 1.1 christos 23 1.1.1.2 christos /* MACRO fail_ne32 24 1.1.1.2 christos Exit with status 1 if \reg32 != \val */ 25 1.1 christos .macro fail_ne32 reg val 26 1.1 christos jeq32 \reg, \val, 2 27 1.1 christos mov %r0, 1 28 1.1 christos exit 29 1.1 christos .endm 30 1.1 christos 31 1.1.1.2 christos /* MACRO fail_ne 32 1.1.1.2 christos Exit with status1 if \reg ne \val */ 33 1.1 christos .macro fail_ne reg val 34 1.1 christos lddw %r0, \val 35 1.1 christos jeq \reg, %r0, 2 36 1.1 christos mov %r0, 1 37 1.1 christos exit 38 1.1 christos .endm 39