ADD R14,R4,#cFor__resume ;Point to resume buffer
LDR R1,sail_tokAnchor ;Find anchor of script buff
- LDR R1,[R1] ;SODDING WIMPEXTENSION!!!
SUB R1,R10,R1 ;Work out current offset
LDR R0,sail_line ;Get the current line number
STMIA R14,{R0,R1} ;Save these in the frame
LDMIA R14,{R0,R1} ;Load the line and offset
STR R0,sail_line ;Save the line counter
LDR R14,sail_tokAnchor ;Find the anchor of the file
- LDR R14,[R14] ;Pointless instruction
ADD R10,R14,R1 ;Get the new offset
SUB R10,R10,#1 ;Backtrack to read prev token
MOV R9,#0 ;Give bogus current token
MOV R0,#cFrame__repeat ;Create a REPEAT frame
BL ctrl__pushFrame ;Stick that on the stack
LDR R2,sail_tokAnchor ;Find anchor of script buff
- LDR R2,[R2] ;SODDING WIMPEXTENSION!!!
SUB R2,R10,R2 ;Work out current offset
LDR R1,sail_line ;Get the current line number
STMIA R0,{R1,R2} ;Save these in the frame
LDMIA R1,{R0,R1} ;Load the line and offset
STR R0,sail_line ;Save the line counter
LDR R14,sail_tokAnchor ;Find the anchor of the file
- LDR R14,[R14] ;Pointless instruction
ADD R10,R14,R1 ;Get the new offset
SUB R10,R10,#1 ;Backtrack to read prev token
MOV R9,#-1 ;Give bogus current token
MOV R0,#cFrame__while ;Create a REPEAT frame
BL ctrl__pushFrame ;Stick that on the stack
LDR R2,sail_tokAnchor ;Find anchor of script buff
- LDR R2,[R2] ;SODDING WIMPEXTENSION!!!
SUB R2,R10,R2 ;Work out current offset
LDR R1,sail_line ;Get the current line number
STMIA R0,{R1,R2} ;Save these in the frame
LDMIA R1,{R0,R1} ;Load the line and offset
STR R0,sail_line ;Save the line counter
LDR R14,sail_tokAnchor ;Find the anchor of the file
- LDR R14,[R14] ;Pointless instruction
ADD R10,R14,R1 ;Get the new offset
SUB R10,R10,#1 ;Backtrack to read prev token
MOV R9,#-1 ;Give bogus current token
MOV R0,#cFrame__gosub ;Create a REPEAT frame
BL ctrl__pushFrame ;Stick that on the stack
LDR R2,sail_tokAnchor ;Find anchor of script buff
- LDR R2,[R2] ;SODDING WIMPEXTENSION!!!
SUB R2,R10,R2 ;Work out current offset
LDR R1,sail_line ;Get the current line number
STMIA R0,{R1,R2} ;Save these in the frame
LDMIB R3,{R0,R1} ;Load out address/line
STR R1,sail_line ;Store the line number
LDR R1,sail_tokAnchor ;Load anchor address
- LDR R1,[R1,#0] ;WimpExtension is bollocks
MOV R9,#-1 ;Don't confuse getToken
ADD R10,R0,R1 ;This is where we are
BL getToken ;Prime the lookahead token
LDMIA R1,{R0,R1} ;Load the line and offset
STR R0,sail_line ;Save the line counter
LDR R14,sail_tokAnchor ;Find the anchor of the file
- LDR R14,[R14] ;Pointless instruction
ADD R10,R14,R1 ;Get the new offset
SUB R10,R10,#1 ;Backtrac a little
MOV R9,#-1 ;Give bogus current token
LDMIB R0,{R0,R1} ;Load out address/line
STR R1,sail_line ;Store the line number
LDR R1,sail_tokAnchor ;Load anchor address
- LDR R1,[R1,#0] ;WimpExtension is bollocks
MOV R9,#-1 ;Don't confuse getToken
ADD R10,R0,R1 ;This is where we are
BL getToken ;Prime the lookahead token
CMPEQ R9,#':' ;No -- check for colon
CMPNE R9,#&0A ;Newline?
BEQ %80ctrl_case ;Yes -- let it rip
- CMP R9,#'"' ;Is this a quote?
+ CMP R9,#'""' ;Is this a quote?
EOREQ R5,R5,#1 ;Yes -- toggle quoted bit
BL getToken ;Get another token
B %b00 ;And keep going
STMFD R13!,{R1,R2,R14} ;Save some registers
LDR R0,sail_dataPtr ;Load the current position
LDR R1,sail_tokAnchor ;Load the anchor
- LDR R1,[R1]
ADD R0,R1,R0 ;Point into the file
- LDR R2,sail_dataLine ;Line number of DATA
+ LDR R2,sail_dataLine ;Line number of DATA
; --- Search the file for DATA, or EOF ---
LDR R4,sail_dataPtr ;Load the current position
LDR R5,sail_tokAnchor ;Load the anchor
- LDR R5,[R5]
ADD R4,R5,R4 ;Point into the file
00ctrl_read LDRB R14,[R4,#0] ;Load the byte there
BL stracc_ensure ;Get current strac position
LDMFD R13!,{R0} ;Load registers back again
STR R1,[R0,#cFn__stracc] ;Save this away
+ ; Oh, bugger. This doesn't work.
LDR R14,sail_currAnchor ;Load the current anchor
STR R14,sail_oldAnchor ;Save this as the old one
LDR R14,sail_tokAnchor ;Now we work from the file