I have written this code in Pep/9 Assembly language:
BR main
num1: .BLOCK 2
num2: .BLOCK 2
adder: .EQUATE 25
stopper: .EQUATE 0
tester: .EQUATE 75
message: .ASCII "higher\n"
;
main: DECI num1,d
LDWA num1,d
CPBA stopper,i
BREQ finish
ADDA adder,i
STWA num2,d
CPBA tester,i
BRLE lower
STRO message,d
BR main
lower: DECO num2,d
LDBA '\n',i
STBA 0xFC16,d
BR main
finish: STOP
.END
Numbers are inputted through a decimal trap, stored to num1 block, first tested if they are equal to the stopper (0), if so the program terminates. Then they have the adder (25) added to them and that is stored to the num2 block. If that number is larger than 75, the word "higher" will print. If not, num2 will.
However, when testing my code, every time a number triggers "higher" to be printed, the number 1 is printed right after. Not sure where it comes from. Please help.