Merge pull request #44 from ksherlock/shell_fix_1

QAsm Shell fixes
This commit is contained in:
Lane Roathe 2020-05-24 21:21:51 -07:00 committed by GitHub
commit e743e2a6c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 5 deletions

View File

@ -154,6 +154,7 @@ QuickASM ENT
_InitCursor ;no longer waiting to startup
~CheckClick #TextName ;do we have a doc to open?
bcs :9
txa
beq :9 ; no- don't open anything

View File

@ -772,22 +772,28 @@ SetCmdHdl
rts
*------------------------------------------------------
* _QAGetWord error
* $0000 -> no error
* $00xx -> no word, a = terminating character (anything less than $20, excluding \t )
* $80xx -> qa tool error
* return value will always be 0,0 if there was an error. can never be 0,0 on success.
*
:getword
REP #$20 ;force 16 bit
]loop
~QAGetWord Ptr;endword;temp ;get a word
plx
ply
beq :0 ;don't modify if no word!
stx endword
sty begword
bcc :1
tax ;real error, or just no word?
bmi :1
tax ; real error or no word?
bpl :0
rts ; carry still set
:0
inc endword ;no word- look for one!
bra ]loop
:1
stx endword
sty begword
SEP #$20
bra :gc ;get first char, uppercase!