OEL TTX2000 Issue 2.3 | Routines |
Prev: 1B84 | Up: Map | Next: 1C1F |
|
||||
datatype_and_hardware | 1B8A | CALL OELRoutine17 | Call OELRoutine17 to get number of arguments. | |
1B8D | CP $32 | If not '2' jump to illegal_operand. | ||
1B8F | JP NZ,illegal_operand | |||
1B92 | CALL OELRoutine17 | Call OELRoutine17 to get length of datatype string. | ||
1B95 | CP $35 | If not '5' jump to not_spectrum. | ||
1B97 | JP NZ,not_spectrum | |||
1B9A | CALL OELRoutine17 | Call OELRoutine17 to get first character of datatype. | ||
1B9D | CP $42 | If not equal to 'B' or 'M' jump to illegal_type. | ||
1B9F | JR Z,legal_type | |||
1BA1 | CP $4D | |||
1BA3 | JP NZ,illegal_type | |||
legal_type | 1BA6 | LD (OELVariable10),A | Store type in OELVariable10. | |
1BA9 | CALL OELRoutine17 | Get next four characters of datatype string. Jump to not_spectrum if not equal to "SPEC". | ||
1BAC | CP $53 | |||
1BAE | JP NZ,not_spectrum | |||
1BB1 | CALL OELRoutine17 | |||
1BB4 | CP $50 | |||
1BB6 | JP NZ,not_spectrum | |||
1BB9 | CALL OELRoutine17 | |||
1BBC | CP $45 | |||
1BBE | JP NZ,not_spectrum | |||
1BC1 | CALL OELRoutine17 | |||
1BC4 | CP $43 | |||
1BC6 | JP NZ,not_spectrum | |||
1BC9 | CALL OELRoutine17 | Call OELRoutine17 to get length of hardware string. | ||
1BCC | CP $33 | If not '3' jump to illegal_operand. | ||
1BCE | JP NZ,illegal_operand | |||
1BD1 | CALL OELRoutine17 | Call OELRoutine17 to get first character of hardware. | ||
1BD4 | CP $31 | If equal to '1' jump to size_starts_with_1. | ||
1BD6 | JR Z,size_starts_with_1 | |||
1BD8 | CP $34 | Else if not '4' jump to illegal_size. | ||
1BDA | JP NZ,illegal_size | |||
1BDD | LD A,$30 | Set OELVariable11 to 48 | ||
1BDF | LD (OELVariable11),A | |||
1BE2 | LD A,($5CB5) | If P_RAMT is less than $8000 jump to too_large. | ||
1BE5 | BIT 7,A | |||
1BE7 | JP Z,too_large | |||
1BEA | CALL OELRoutine17 | Call OELRoutine17 to get second character of hardware. | ||
1BED | CP $38 | If equal to '8' jump to size_ok, else fall through to illegal_size. | ||
1BEF | JR Z,size_ok | |||
illegal_size | 1BF1 | LD HL,illegal_size_message | Display illegal_size_message and jump into page decode loop. | |
1BF4 | CALL display_error | |||
too_large | 1BF7 | LD HL,too_large_message | Display too_large_message and jump into page decode loop. | |
1BFA | CALL display_error | |||
not_spectrum | 1BFD | LD HL,not_spectrum_message | Display not_spectrum_message and jump into page decode loop. | |
1C00 | CALL display_error | |||
size_starts_with_1 | 1C03 | LD A,$10 | Set OELVariable11 to 16 | |
1C05 | LD (OELVariable11),A | |||
1C08 | CALL OELRoutine17 | Call OELRoutine17 to get second character of hardware. | ||
1C0B | CP $36 | If not '6' jump to illegal_size. | ||
1C0D | JP NZ,illegal_size | |||
size_ok | 1C10 | CALL OELRoutine17 | Call OELRoutine17 to get last character of hardware. | |
1C13 | CP $4B | Return if equal to 'K' or 'k' | ||
1C15 | RET Z | |||
1C16 | CP $6B | |||
1C18 | RET Z | Else fall through to illegal_operand | ||
This entry point is used by the routines at OELRoutine07, OELRoutine08, OELRoutine09, OELRoutine23, 1E1B, 1F28 and 1F67.
|
||||
illegal_operand | 1C19 | LD HL,illegal_operand_message | illegal_operand: Display illegal_operand_message and jump into page decode loop. | |
1C1C | CALL display_error |
Prev: 1B84 | Up: Map | Next: 1C1F |