cbm prg studio

You need an actual VIC.

Moderator: Moderators

merser
Vic 20 Newbie
Posts: 13
Joined: Sat Sep 30, 2017 4:50 pm
Location: brisbane

cbm prg studio

Postby merser » Tue Oct 24, 2017 7:32 am

Can someone explain how to load a list of bytes into memory using assembly in cbm prg studio.
I tried *=$1C00
BYTE 126,90,255,189...
I copied the code generated by the SYS call generator tool but the bytes don't load into the location specified when it is run in the emulator.

ajordison
Vic 20 Enthusiast
Posts: 155
Joined: Fri Mar 19, 2010 4:31 pm
Website: http://www.ajordison.co.uk/
Location: Hartlepool, UK
Occupation: Software Engineer

Re: cbm prg studio

Postby ajordison » Tue Oct 24, 2017 4:10 pm

$1C00 is in the BASIC area, so BASIC itself might be over-writing your bytes. What are you trying to do?
Try out CBM prg Studio over at www.ajordison.co.uk

merser
Vic 20 Newbie
Posts: 13
Joined: Sat Sep 30, 2017 4:50 pm
Location: brisbane

Re: cbm prg studio

Postby merser » Wed Oct 25, 2017 6:48 am

Hi,

I am copying the character set to top of ram and modifying. I just want to know an easier way of loading the modified character data into memory.
Thought I could do that with the byte statement but it doesn't appear to work. However if as you can see I do a series of loads and stores the data is there.



Code: Select all

; 10 SYS (6968)

*=$1001

        BYTE    $0E, $10, $0A, $00, $9E, $20, $28,  $36
        BYTE    $39, $36, $38, $29, $00, $00, $00

*=$1C00
        byte    126, 90, 255, 189, 189, 36, 66, 36

CHAROM_START = $8000
CHARAM_START = $1C00
SCREEN_START = $1E00


*=$1B38

        lda #$93
        jsr $FFD2
        ldx #$0
Char_Copy       
        lda CHAROM_START,x
        sta CHARAM_START,x
        lda CHAROM_START,x + $100
        sta CHARAM_START,x + $100
        inx
        bne CHAR_COPY
New_Char
        lda #126
        sta CHARAM_START
        lda #90
        sta CHARAM_START + 1
        lda #255
        sta CHARAM_START + 2
        lda #189
        sta CHARAM_START + 3
        lda #189
        sta CHARAM_START + 4
        lda #36
        sta CHARAM_START + 5
        lda #66
        sta CHARAM_START + 6
        lda #36
        sta CHARAM_START + 7
Char_Pointer       
        lda #$FF
        sta $9005
Print_Char1
        lda #$40
        jsr $FFD2
End
        rts

merser
Vic 20 Newbie
Posts: 13
Joined: Sat Sep 30, 2017 4:50 pm
Location: brisbane

Re: cbm prg studio

Postby merser » Fri Oct 27, 2017 4:00 pm

OK so I figured out what I did wrong. The BYTE instruction was loading my custom character data into 7168-7175 at the start but then was copied over by the CHAR_COPY routine. Once I changed the starting address CHAROM_START and CHARAM_START to start after the loaded custom character data it worked.


Return to “Emulation and Cross Development”

Who is online

Users browsing this forum: No registered users and 2 guests