BASIC and ZeroPain
Tank (53) 375 posts |
Repeatable error from Function VARINT from castle.RiscOS.Sources.Programmer.BASIC.s.Factor.
R0 = 00000006 R1 = 00000002 R2 = 00000004 R3 = 0000006e fc1a8a3c : 11a00230 : MOVNE R0,R0,LSR R2 Using the following BASIC lines
20 proc=!info% Line 20 causes the problem |
Jeff Doggett (257) 234 posts |
According to https://www.riscosopen.org/wiki/documentation/show/HAL_IRQSource |
Tank (53) 375 posts |
Wrong call Jeff…. |
Jeff Doggett (257) 234 posts |
Dammit, I knew that I must me misreading it somehow! In fact I said as much in the first attempt at posting which the Textile system lost! Ok, so it now looks to me that info% is read from R1 – or am I reading that wrong as well? |
Jeffrey Lee (213) 6048 posts |
Jeff’s right – OS_Hardware 4 returns the device pointer in R2, but you’re dereferencing R1, which is meant to be an opaque iterator handle. To save yourself from future shame Tank, feel free to send in a patch to BASIC which implements the ! and ? operator sanity checks which were discussed a while ago :-) (not sure of the thread – sorry!) |
Tank (53) 375 posts |
You’ve got me there… |