Is there a Task Window command repeat key
Pages: 1 2
David Pitt (102) 743 posts |
R4 is set to the dummy value in the left hand, input, register list and E% takes the value in R4 in the right hand, output, register list after the ‘TO’. PRINT "Now type something followed by RETURN" DIM Z% 256 R4%=&1234 SYS "OS_ReadLine", Z%, 128, 32, 128, R4% TO ,,,,R4% PRINT ~R4% END |
Fred Graute (114) 645 posts |
R4 doesn’t seem to get corrupted when calling OS_ReadLine but it is corrupted when calling OS_ReadLine32, so R4 really needs to be preserved. |
David Pitt (102) 743 posts |
Good thinking, adding R4 to the stacking in LineEditor as described above does resolve the issue on OS5.23. The thing I am not clear about is where the bug is. From ROOL’s PRM R4 is preserved over OS_ReadLine but R4 is not included in the exit list for OS_ReadLine32 which I took to mean that it should be preserved. From here in ‘Parameters and Results’ :- “For the OS SWIs documented on this wiki, it’s generally the case that any register which isn’t used as an input or an output will be preserved across the SWI call. However for some SWIs certain registers will be corrupted – these cases will be noted in the SWI documentation.” |
Mark (2737) 44 posts |
I made the edits to LineEditor at &3800 and &3888 adding R4 to the list in each case. Rebooted and everything seems to work. |
Pages: 1 2