[Coco] Apparent discrepancy between MAME and XRoar re: SBCB instruction

Joel Rees joel.rees at gmail.com
Tue Oct 17 20:41:14 EDT 2017


2017/10/18 8:23 "Pierre Sarrazin" <sarrazip at sarrazip.com>:
>
>[...]
>         org     $3800
>
> start
>         clrb
>         andcc   #$00    ; clear all flags
>         orcc    #$01    ; set carry
>         sbcb    #$FF    ; $00 - $ff - 1 = $00
>         pshs    cc
>         puls    a

Wouldn't

          tfr cc,a

do the job? Or is my memory wrong?

>         sta     $400    ; store resulting CC on 32x16 screen
>         rts
>
>         end     start
>[...]


More information about the Coco mailing list