bge test
This commit is contained in:
parent
9ebb1aa0c9
commit
62d2971860
2 changed files with 53 additions and 0 deletions
50
tester-bge.mac
Normal file
50
tester-bge.mac
Normal file
|
@ -0,0 +1,50 @@
|
|||
.EXTERN ALL
|
||||
|
||||
test_bge:
|
||||
MOV #what_bge,R0
|
||||
CALL print_start
|
||||
|
||||
test_bge_1:
|
||||
; initialize flags
|
||||
MOV #8.,R0
|
||||
MTPS R0
|
||||
|
||||
; should not jump
|
||||
BGE test_bge_1_fail
|
||||
JMP test_bge_2
|
||||
|
||||
test_bge_1_fail:
|
||||
MOV #1.,R0
|
||||
JMP test_bge_fail
|
||||
|
||||
test_bge_2:
|
||||
MOV #10.,R0
|
||||
MTPS R0
|
||||
BGE test_bge_2_ok
|
||||
|
||||
MOV #2.,R0
|
||||
JMP test_bge_fail
|
||||
|
||||
test_bge_2_ok:
|
||||
RET
|
||||
|
||||
test_bge_fail:
|
||||
; print test number
|
||||
CALL print_binary
|
||||
|
||||
; flags are always (for this tester) in R2
|
||||
MOV R2,R0
|
||||
CALL print_binary
|
||||
|
||||
MOV #test_bge_fail_txt,R0
|
||||
CALL print_start
|
||||
RET
|
||||
|
||||
test_bge_fail_txt:
|
||||
.ASCII "BGE handling FAIL\r\n\x00"
|
||||
|
||||
|
||||
what_bge:
|
||||
.ASCII "BGE test\r\n\x00"
|
||||
|
||||
.EVEN
|
|
@ -15,6 +15,7 @@ start: MOV #1000, R6
|
|||
.INCLUDE "tester-addressing.mac"
|
||||
.INCLUDE "tester-mov.mac"
|
||||
.INCLUDE "tester-tst.mac"
|
||||
.INCLUDE "tester-bge.mac"
|
||||
|
||||
go: MOV #textstart, R0
|
||||
CALL print_start
|
||||
|
@ -33,6 +34,8 @@ go: MOV #textstart, R0
|
|||
|
||||
CALL test_tst
|
||||
|
||||
CALL test_bge
|
||||
|
||||
MOV #textfin, R0
|
||||
CALL print_start
|
||||
TRAP 7
|
||||
|
|
Loading…
Add table
Reference in a new issue