![]() |
Routines |
Prev: AC4D | Up: Map | Next: AC84 |
Used by the routine at GameStart.
|
||||
Parser_ProcessItem | AC60 | LD HL,$A13B | HL=UserInput_Token_1. | |
AC63 | LD B,$0A | Set a counter of 0A in B of the maximum number of tokens available in the user input. | ||
ProcessItem_Loop | AC65 | LD A,(HL) | Fetch a token byte from the user input pointer. | |
AC66 | CP $FF | Return if the terminator has been reached (FF). | ||
AC68 | RET Z | |||
AC69 | PUSH HL | Stash the user input token pointer and max count on the stack. | ||
AC6A | PUSH BC | |||
AC6B | LD HL,$B49E | Load Table_TokenItemList into HL. | ||
AC6E | LD BC,($BBC9) | Load *Count_Objects_2 into BC. | ||
AC72 | CPIR | Search for matching objects. | ||
AC74 | JR NZ,ProcessItem_Next | Jump to ProcessItem_Next the current token wasn't found in the table. | ||
AC76 | CALL Parser_ValidateItem | Call Parser_ValidateItem. | ||
AC79 | JR NC,ProcessItem_Next | Jump to ProcessItem_Next if the carry flag is not set. | ||
AC7B | POP BC | Restore the max count and user input token pointer from the stack. | ||
AC7C | POP HL | |||
AC7D | RET | Return. | ||
ProcessItem_Next | AC7E | POP BC | Restore the max count and user input token pointer from the stack. | |
AC7F | POP HL | |||
AC80 | INC HL | Increment the user input token pointer by one. | ||
AC81 | DJNZ ProcessItem_Loop | Decrease the max count by one and loop back to ProcessItem_Loop until all of the user input tokens have been evaluated. | ||
AC83 | RET | Return. | ||
View the equivalent code in;
|
Prev: AC4D | Up: Map | Next: AC84 |