Ken Shirriff < email@example.com > wrote Jan 24, 2015
... One question: what's the best way to deal with signed vs unsigned numbers? The signs keep messing things up for me, e.g. comparisons don't work like I'd expect: 1 is higher than -2 which is higher than -1 which is higher than +0. Is there a trick to using signs without going crazy? (And is there a way to stop infinite loops without killing ROPE?)
Paul Laughton < firstname.lastname@example.org > wrote January 24, 2015
Michael Albaugh < email@example.com > wrote January 24, 2015
> Thus I avoided the complexities of Compare. I admit that I am not sure what happens when -0 is subtracted from -0. The answer might be -0, which could send me to LOSING when breaking even.
I just tried -0 - -0 (on the simulator) and got a perfectly cromulent -0, which BM was happy to consider "negative". This was pretty much what I expected.
Testing on an actual 1401 is left as an exercise to (someone).
JOB TEST OF 1401 -0 HANDLING. * ASSEMBLE WITH COMMAND * AUTOCODER -L MZTEST.LIS -O MZTEST.OBJ -BV MZTEST.AC CTL 6111 ORG 333 * GENERATE -0. HECK, GENERATE TWO. MZGEN ZS @0@,MIN#3 ZS @0@,SUB#3 * SUBTRACT -0 FROM -0. S SUB,MIN MZ BM MZ,MIN PZ B PZ END MZGEN
return to main page