Ticket #176 (Invalid)Mon Sep 22 15:02:50 UTC 2008
Basic uses OS_ReadLine, not OS_ReadLine32
Reported by: | David Given (199) | Severity: | Minor |
Part: | RISC OS: Module | Release: | |
Milestone: | Status | Invalid |
Details by David Given (199):
Basic uses the non-32-bit safe version of OS_ReadLine.
AFAICT Basic’s input buffer is down the bottom of application memory, so this should not be a problem, but it ought to be fixed anyway.
Changelog:
Modified by Theo Markettos (89) Mon, September 22 2008 - 17:15:00 GMT
- Status changed from Open to Fixed
The 32 bit OS_ReadLine doc (http://www.iyonix.com/32bit/APIchanges.shtml) says:
“In a 32-bit OS, OS_ReadLine now interprets R0 as a 32-bit address, and acts as though the flags are both clear. This reflects the most common usage, and allows applications not wanting to use the flags to remain unaltered.”
BASIC only uses OS_ReadLine in one routine I can find, where the code is this:
INLINE ADD R0,ARGP,#STRACC
MOV R1,#238
MOV R2,#" "
MOV R3,#255
SWI READLINE
(in castle/RiscOS/Sources/Programmer/BASIC/s/Basic)
ARGP is BASIC’s workspace pointer, and thus won’t have any flag bits set. STRACC=256. Thus this code is 32 bit safe because of the new definition of OS_ReadLine.
Modified by Theo Markettos (89) Sat, October 11 2008 - 13:29:17 GMT
- Status changed from Fixed to Invalid
Argh, the system mangled my code above. Spotted the ‘invalid’ option, so I think I’ll change it to this as it wasn’t a bug in the first place.