[Coco] Assembly help: Corrupted bin file ?

Bob Devries devries.bob at gmail.com
Fri Dec 19 19:45:34 EST 2008


Hmm,
from memory, an END statement is required to force the assembler to generate
the post-amble (FF 00 00 XX XX). As well, the END statement should have a
label after it pointing to the EXEC point. so that the XX XX will be
properly completed.

(yeah, I know, this has already been answered.... I just thought I'd throw 
in my 2c.... My internet access is somewhat intermittent from Mindanao. A 
couple of weeks and I'll be back in good old Australia).


----- Original Message ----- 
From: "Fedor Steeman" <petrander at gmail.com>
To: "CoCoList for Color Computer Enthusiasts" <coco at maltedmedia.com>
Sent: Wednesday, December 17, 2008 5:30 PM
Subject: [Coco] Assembly help: Corrupted bin file ?


> Hello everyone,
>
> I am still trying to learn assembly language but keep on running into
> problems.
>
> I have been trying to have the following source code assembled:
>
> VIDRAM  EQU     $0400     *Start of Video Display location
> V0CLR   EQU     $FFC0        *Clear bit for Sam Chip (Graphics mode)
> V1SET   EQU     $FFC3        *Set V1 bit in Sam Chip (Graphics mode)
> V2SET   EQU     $FFC5        *set V2 bit in Sam Chip (Graphics mode)
> VOFSET  EQU     $FFC6       *Display Offset Binary, This is the CLR Bit
> (Video page offset)
> VDGSET  EQU     $FF22        *PIA1 data port B: VDG Control output
> POLCAT  EQU     $A000        *Color Basic rom poll keyboard routine
>
>        ORG     $21FD
>        LDX     #VIDRAM   *331D: 8E 04 00
>        LDD     $AAAA     *3320: CC AA AA
> Z3323   STD     ,X++      *3323: ED 81
>        CMPX    #$1C00    *3325: 8C 1C 00
>        BCS     Z3323     *3328: 25 F9
>        NOP               *332A: 12
> PMODE4  STA     V0CLR     *2787: B7 FF C0
>        STA     V1SET     *278A: B7 FF C3
>        STA     V2SET     *278D: B7 FF C5
>        LDA     #$F8      *2790: 86 F8
>        STA     VDGSET    *2792: B7 FF 22
>        STA     VOFSET    *2795: B7 FF C6
>        JSR     [POLCAT]  *332E: AD 9F A0 00
>        RTS               *3332:
>
> Using Roger Taylor's CCASM (as included in RainbowIDE) I get the following
> binary file:
>
> 00 00 24 21 FD 8E 04 00 FC AA AA ED 81 8C 1C 00
> 25 F9 12 B7 FF C0 B7 FF C3 B7 FF C5 86 F8 B7 FF
> 22 B7 FF C6 AD 9F A0 00 39
>
> When I try to run this binary file using the VCC emulator I get an error
> message stating that the binary file is corrupt.
>
> Can anyone help me try to understand whether there is anything wrong with
> my
> source code, the assembler (i.e. the resulting binary file) or the
> emulator?
>
> Thanks in advance!
>
> Cheers,
> Fedor
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco




More information about the Coco mailing list