![]() |
Routines |
Prev: 44983 | Up: Map | Next: 45035 |
Used by the routine at GameLoop.
|
||||
Parser_ProcessItem | 44999 | LD HL,43044 | HL=UserInput_Token_1. | |
45002 | LD B,10 | Set a counter of 10 in B of the maximum number of tokens available in the user input. | ||
ProcessItem_Loop | 45004 | LD A,(HL) | Fetch a token byte from the user input pointer. | |
45005 | CP 255 | Return if the terminator has been reached (255). | ||
45007 | RET Z | |||
45008 | PUSH HL | Stash the user input token pointer and max count on the stack. | ||
45009 | PUSH BC | |||
45010 | LD HL,(42968) | Load *Pointer_ObjectList into HL. | ||
45013 | LD BC,(42984) | Load *Count_Objects into BC. | ||
45017 | CPIR | Search for matching objects. | ||
45019 | JR NZ,ProcessItem_Next | Jump to ProcessItem_Next the current token wasn't found in the table. | ||
45021 | CALL Parser_ValidateItem | Call Parser_ValidateItem. | ||
45024 | JR NC,ProcessItem_Next | Jump to ProcessItem_Next if the carry flag is not set. | ||
45026 | POP BC | Restore the max count and user input token pointer from the stack. | ||
45027 | POP HL | |||
45028 | RET | Return. | ||
ProcessItem_Next | 45029 | POP BC | Restore the max count and user input token pointer from the stack. | |
45030 | POP HL | |||
45031 | INC HL | Increment the user input token pointer by one. | ||
45032 | 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. | ||
45034 | RET | Return. | ||
View the equivalent code in The Jewels Of Babylon.
|
Prev: 44983 | Up: Map | Next: 45035 |