quill | Routines |
Prev: 64859 | Up: Map | Next: 64991 |
|
||||
FREEHAND_ROUTINE | 64927 | CALL SET_INVERSE_AND_OVER | Set inverse and over bits | |
64930 | LD BC,(23677) | Get current co-ordinates | ||
64934 | LD A,(IX+0) | A=graphics instruction | ||
64937 | RRCA | |||
64938 | RRCA | |||
64939 | RRCA | |||
64940 | RRCA | Rotate top 4 bits to bottom 4 bits | ||
64941 | AND 14 | Clear bits 0 and 4-7 | ||
64943 | LD L,A | L=0,2,4,6,8,10,12,14 | ||
64944 | LD H,0 | |||
64946 | LD DE,64991 | DE=lookup table | ||
64949 | ADD HL,DE | Use L to get offset in lookup table | ||
64950 | LD E,(HL) | E=Y offset | ||
64951 | INC HL | |||
64952 | LD A,(HL) | A=X offset | ||
64953 | ADD A,C | Add current X-co-ordinate to A | ||
64954 | LD C,A | C=new X co-ordinate | ||
64955 | INC B | Increment y co-ordinate by 1 | ||
64956 | BIT 0,E | Is Y offset=1 or -1? | ||
64958 | JR Z,FREEHAND_ROUTINE_0 | If not, it must be zero, jump forward to decrement it to what it was | ||
64960 | BIT 7,E | Is Y offset=-1? | ||
64962 | JR Z,FREEHAND_ROUTINE_1 | If not, it must be one, jump forward to boundary check | ||
64964 | DEC B | Decrement x co-ordinate back to what it was | ||
64965 | JR NZ,FREEHAND_ROUTINE_0 | If B is non-zero, decrement it | ||
64967 | LD B,176 | If B is zero, set it to 176 (and then it will decrement to 175) | ||
FREEHAND_ROUTINE_0 | 64969 | DEC B | Decrement y co-ordinate by 1 | |
FREEHAND_ROUTINE_1 | 64970 | LD A,176 | ||
64972 | CP B | Is B=176? | ||
64973 | JR NZ,FREEHAND_ROUTINE_2 | If not, skip to plot | ||
64975 | LD B,0 | If so, set B to 0 (175 is highest Y co-ordinate) | ||
FREEHAND_ROUTINE_2 | 64977 | CALL 8933 | 'Plot' routine | |
64980 | RES 0,(IY+87) | |||
64984 | RES 2,(IY+87) | |||
64988 | JP SKIP_1_THEN_NEXT | Ahead one byte and process next graphics instruction |
Prev: 64859 | Up: Map | Next: 64991 |