[Coco] ASM Coders - Round two!

David Roper dave at ebonhost.com
Tue Aug 29 08:56:25 EDT 2006


Hi again

Thanks to everyone who helped last time - here's round two!

The code as it stands can be found below

If you compile and run it as-is, it'll clear half the screen

but! when you simply uncomment the lines:
*lda #$32
*sta $FFA3

It clears half the screen, and draws some colored garbage 3/4 of the way
down the screen

I can't understand why it's doing this

am I trying to allocate memory that I'm not allowed to touch? Am I
swapping *out* some memory that's otherwise being used?

Im very lost and very confused!

Any help would be great!

Kind regards,
David

-- code follows --


org $0300
START lda #%01001100 Coco3, MMU on, DRAM constant, standard SCS 16K
internal 16K external ROM
sta $FF90
lda #%10000000 graphics
sta $FF98
lda #%00111110 200 lines of 320H by 16 colors
sta $FF99
clr $FF9C clear vertical scroll
ldd #$C000 screen start divided by 8
std $FF9D vertical offset
clr $FF9F clear horizontal scroll

lda #$30 first block of graphics screen at $60000
sta $FFA1 mapped to $2000
lda #$31
sta $FFA2
*lda #$32
*sta $FFA3
*lda #$33
*sta $FFA4

CLRSCRN ldy #HSCLEN
ldx #HRESSCRN
CLRLOOP CLR ,X+
LEAY -1,Y
BNE CLRLOOP
ENDLOOP JMP ENDLOOP

HRESSCRN EQU $2000
HSCLEN EQU $3E80

end START



More information about the Coco mailing list