[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ANNC: ProDraw IIe released



Hi All,

On 14 fév, 22:00, "Craig Bower" <requ...@email.yea> wrote:
> It's at the check keys routine, where stuff gets ridiculously strange.
> Some checks have routines built in, others do JSRs, which in turn
> do JSRs, JMPs, JSRs, etc., etc., etc.  Yikes-fest '09.
>
> 1122-   AD 10 C0      LDA   $C010    r:KBDSTRB ; Determine key
> 1125-   85 00             STA   $00                               ; and do
> function
>

In the code, somewhere:
LDA $C000
BMI keyHIT (or BPL mainLoop)

keyHIT
STA $C010
STA $00

> (Note: the STA $00 is pointless here, I figured that out early on, but
> never got around to compressing my code and eliminating it.)
>
> 1127-   C9 88            CMP   #$88        ; <--
> 1129-   D0 10            BNE   $113B      ; Decrement color
> 112B-   C6 08           DEC   $08
> 112D-   A5 08           LDA   $08           ; ZP $08 is where color status
> byte is
> 112F-   C9 FF           CMP   #$FF
> 1131-   D0 04           BNE   $1137
> 1133-   A9 0F           LDA   #$0F
> 1135-   85 08            STA   $08
> 1137-   20 D2 10       JSR   $10D2
> 113A-   60                RTS

LDA $08
SEC
SBC #$01
AND $0F
STA $08

>
> 113B-   C9 95           CMP   #$95      ; -->
> 113D-   D0 10          BNE   $114F     ; Increment color
> 113F-   E6 08           INC   $08
> 1141-   A5 08           LDA   $08        ; ZP $08 is where color status byte
> is
> 1143-   C9 10           CMP   #$10
> 1145-   D0 04           BNE   $114B
> 1147-   A9 00           LDA   #$00
> 1149-   85 08           STA   $08
> 114B-   20 D2 10     JSR   $10D2
> 114E-   60                RTS

LDA $08
CLC
ADC #$01
AND #$0F
STA $08

>
> 114F-   C9 D3         CMP   #$D3      ; S
> 1151-   D0 10         BNE   $1163      ; Change plot status
> 1153-   C6 09         DEC   $09
> 1155-   A5 09         LDA   $09           ; ZP $09 is where plot status byte
> is
> 1157-   C9 FF        CMP   #$FF
> 1159-   D0 04        BNE   $115F
> 115B-   A9 01        LDA   #$01
> 115D-   85 09        STA   $09
> 115F-   20 A6 10   JSR   $10A6
> 1162-   60              RTS

LDA $09
EOR #$01
STA $09

Congratulations for the ML input ;-)

antoine