Mercurial > hg > index.cgi
comparison src/parse.s @ 131:95f174bf459b
Add error handling for immediate mode loop
author | William Astle <lost@l-w.ca> |
---|---|
date | Sat, 18 May 2024 00:41:46 -0600 |
parents | 9f23ddc5165f |
children | 917b4893bb3d |
comparison
equal
deleted
inserted
replaced
130:9f23ddc5165f | 131:95f174bf459b |
---|---|
40 parse1 cmpb ,x ; did we match a valid command token? | 40 parse1 cmpb ,x ; did we match a valid command token? |
41 beq parse3 ; brif so | 41 beq parse3 ; brif so |
42 leax 3,x ; move to next entry | 42 leax 3,x ; move to next entry |
43 cmpx #parsetab_cmde ; end of table? | 43 cmpx #parsetab_cmde ; end of table? |
44 blo parse1 ; brif not | 44 blo parse1 ; brif not |
45 bra parse_errorsn ; fell off the end | |
45 parse3 jsr [1,x] ; call the handler | 46 parse3 jsr [1,x] ; call the handler |
46 bcs parse_error ; brif the handler indicated error | 47 bcs parse_error ; brif the handler indicated error |
47 bsr parse_curtoken ; fetch the token we left off on | 48 bsr parse_curtoken ; fetch the token we left off on |
48 cmpb #token_eot ; end of input? | 49 cmpb #token_eot ; end of input? |
49 bne parse4 ; brif not | 50 bne parse4 ; brif not |