AAGDOS
Experienced Member
I am confused on how the BASIC Interpreter is formatting the values of integers? They do not seem to be either straight binary or BCD?? I typed in and ran a very simple BASIC program...
10 N=2
20 END
Start of Basic (SOB) is correct at $0801. The code ends with 3 zeros at $0810. On Using the ML monitor to look at the variable "N" in memory, I see $0811 - $0817 as.....
4E ,0, 82, 0 ,0, 0, 0 82 is correct with Hi bit set for integer, and the "2" in binary.
If I change the code to
10 N=3
20 END
The ML monitor shows the variable in memory $0801-$0817...
4E, 0, 82, 40, 0, 0, 0
Why is this not 4E, 0, 83, 0, 0, 0, 0 ......??????
I tried N=4, N=5, N=6 and got a similar confusion!
Any thoughts would be appreciated!
Anthony G
10 N=2
20 END
Start of Basic (SOB) is correct at $0801. The code ends with 3 zeros at $0810. On Using the ML monitor to look at the variable "N" in memory, I see $0811 - $0817 as.....
4E ,0, 82, 0 ,0, 0, 0 82 is correct with Hi bit set for integer, and the "2" in binary.
If I change the code to
10 N=3
20 END
The ML monitor shows the variable in memory $0801-$0817...
4E, 0, 82, 40, 0, 0, 0
Why is this not 4E, 0, 83, 0, 0, 0, 0 ......??????
I tried N=4, N=5, N=6 and got a similar confusion!
Any thoughts would be appreciated!
Anthony G