Closed mincebert closed 1 year ago
This is on a Master with MOS 3.50 and ANFS 4.25, BTW.
This is a good find - I don't think I've tested the two-byte transfer mode that ANFS uses.
Can you spot the cut-paste error?
Type3:
lb t0, R4STATUS(gp) # Test for an pending interrupt signalling end of transfer
bltz t0, Release
lb t0, R3STATUS(gp)
bgez t0, Type3
lb t0, R3DATA(gp)
sb t0, (t2) # store lo byte to memory
lb t1, R3DATA(gp)
sb t0, 1(t2) # store hi byte to memory
addi t2, t2, 2
j Type3
I'll fix this today and post a dev-build to this thread for you to test.
I only started looking at RISC-V yesterday , but is it the second store should be t1 instead of t0?
Or, more probably, the load should be t0 instead of t1, since I don’t think there’s a reason to use another register there.
If so, that does explain why, when I compared a copy loaded via ANFS and another via ADFS that there were a lot of differences. I hadn’t noticed they were every second byte, though!
Yes indeed, the second load should be t0.
Oh yes, so it is - every odd-numbered byte is wrong and the same as the even-numbered byte before it!
I've fixed the LOAD issue, but there also now seems to be an issue with SAVE that I'm investigating....
I've created a seperate issue (#179) for the SAVE bug, as that looks like an error in the ULA code.
I'll close this one now.
I'm unclear if this is a RISC-V BASIC issue, or a PiTubeDirect Indigo issue, or a problem with PiTubeDirect, or I'm doing something monumentally stupid, but I get an uncaught exception if I try and execute RVBASIC from my PiEconetBridge.
I have the load and execute addresses set to &F80000 and I get the same error if I
*LOAD
and*GO
, rather than just*/
, if I*MOVE
the file from NET to ADFS, it then runs OK.Apologies if I've missed something not implemented yet, or misunderstood something!