Routines |
Prev: $09E8 | Up: Map | Next: $0A57 |
$09E9 | LDA $70 | Pick up the lesson descriptor from $70. | ||
$09EB | AND #$F0 | Keep only ERIC's teacher ID (bits 4-7). | ||
$09ED | STA $57 | Store this teacher ID at $57. | ||
$09EF | LDA $60 | Pick up the teacher's character number ($0B-$0E) from $60. | ||
$09F1 | SEC | Now A holds 0, 1, 2 or 3. | ||
$09F2 | SBC #$0B | |||
$09F4 | ASL A | Shift this teacher identifier into bits 4-7 of A. | ||
$09F5 | ASL A | |||
$09F6 | ASL A | |||
$09F7 | ASL A | |||
$09F8 | CMP $57 | Are we dealing with ERIC's teacher? | ||
$09FA | BNE $09FF | Branch if not. | ||
$09FC | JMP $0A58 | Start the lesson with ERIC. | ||
This teacher is not teaching ERIC.
|
||||
$09FF | LDA $FB | Pick up the teacher's y-coordinate from $FB. | ||
$0A01 | CMP #$03 | Is the teacher on the top floor? | ||
$0A03 | BEQ $0A08 | Branch if so. | ||
$0A05 | JMP $0A0E | Jump forward. | ||
$0A08 | LDA $FC | Pick up the teacher's x-coordinate from $FC. | ||
$0A0A | CMP #$3B | Is the teacher in the Map Room? | ||
$0A0C | BCS $0A3F | Branch if so (there's no blackboard in the Map Room). | ||
$0A0E | JSR $1F77 | Place the address of the interruptible subcommand routine at $16E9 into the teacher's buffer and jump to it. This makes him wipe the blackboard and return here when he's done. | ||
$0A11 | .WORD $16E9 | |||
$0A13 | LDA $FC | Pick up the teacher's x-coordinate from $FC. | ||
$0A15 | CLC | Add 3 to this x-coordinate and store the result at $AC and $AD. | ||
$0A16 | ADC #$03 | |||
$0A18 | STA $AC | |||
$0A1A | STA $AD | |||
$0A1C | JSR $1F77 | Place the address of the interruptible subcommand routine at $136F into the teacher's buffer and jump to it. This makes him walk to the middle of the blackboard before returning here. | ||
$0A1F | .WORD $136F | |||
$0A21 | LDA $D41B | Generate a random value in A. | ||
$0A24 | CMP #$AB | Is it less than $AB? | ||
$0A26 | BCC $0A3F | Branch if so. | ||
$0A28 | JSR $1F77 | Place the address of the interruptible subcommand routine at $1129 into the teacher's buffer and jump to it. This makes him write on the blackboard and return here when he's done. | ||
$0A2B | .WORD $1129 | |||
$0A2D | LDA $D41B | Generate a random value in A. | ||
$0A30 | CMP #$A1 | Is it less than $A1? | ||
$0A32 | BCC $0A3F | Branch if so. | ||
$0A34 | LDA #$5C | Store $5CD6 (WRITE AN ESSAY WITH THIS TITLE) at $AC. | ||
$0A36 | STA $AD | |||
$0A38 | LDA #$D6 | |||
$0A3A | STA $AC | |||
$0A3C | JMP $0A42 | Jump forward. | ||
$0A3F | JSR $2500 | Prepare a message telling the kids to go to a certain page in their books | ||
$0A42 | JSR $1F77 | Place the address of the interruptible subcommand routine at $2387 into the teacher's buffer and jump to it. This makes him tell the kids to write an essay or read their books, and then return here. | ||
$0A45 | .WORD $2387 | |||
$0A47 | LDA $FC | Pick up the teacher's x-coordinate from $FC. | ||
$0A49 | EOR #$03 | Flip bits 0 and 1 and store the result at $AC and $AD. | ||
$0A4B | STA $AC | |||
$0A4D | STA $AD | |||
$0A4F | JSR $1F77 | Place the address of the interruptible subcommand routine at $136F into the teacher's buffer and jump to it. This makes him turn round, walk a few paces and then return here. | ||
$0A52 | .WORD $136F | |||
$0A54 | JMP $0A47 | Jump back to make the teacher turn round and walk another few paces. |
Prev: $09E8 | Up: Map | Next: $0A57 |