Assembly Beginner
Posted: Wed Nov 21, 2018 11:57 pm
Hey there! I am new to this forum.
I am interested to learn assembly on a C64. I am using C64Studio and the VICE Emulater for that. I worte today two codefragments:
*=$0801
!byte $0c,$08,$e2,$07,$9e,$20,$32,$30,$36,$32,$00,$00,$00
lda #$41
ldx #$ff
loop
sta $03ff,x
dex
bne loop
rts
and a smaller one
*=$C000
lda #$01
sta $0400
lda #$00
sta $d800
lda #$02
sta $0401
lda #$04
sta $d801
rts
So my questions are:
1) The first program compiles and runs AT ONCE with autostart option "inject into RAM" in VICE. But its not running if i change the startaddress for example to $C000 and try to run it in vice with sys 49152. Well the program run only if the first line is saved in $0801. Is there anything special about
$0801 (Begin of Basic RAM) as i should know for assembly?
2) The second program runs perfectly (but NOT automatically) with any address expect $0801. I realy dont understand why ... May be you have a hint for me ?
Thank you very much in advance for your answer and i am sorry about my bad english knowledge
Greetings from Zurich, Switzerland.
Han
I am interested to learn assembly on a C64. I am using C64Studio and the VICE Emulater for that. I worte today two codefragments:
*=$0801
!byte $0c,$08,$e2,$07,$9e,$20,$32,$30,$36,$32,$00,$00,$00
lda #$41
ldx #$ff
loop
sta $03ff,x
dex
bne loop
rts
and a smaller one
*=$C000
lda #$01
sta $0400
lda #$00
sta $d800
lda #$02
sta $0401
lda #$04
sta $d801
rts
So my questions are:
1) The first program compiles and runs AT ONCE with autostart option "inject into RAM" in VICE. But its not running if i change the startaddress for example to $C000 and try to run it in vice with sys 49152. Well the program run only if the first line is saved in $0801. Is there anything special about
$0801 (Begin of Basic RAM) as i should know for assembly?
2) The second program runs perfectly (but NOT automatically) with any address expect $0801. I realy dont understand why ... May be you have a hint for me ?
Thank you very much in advance for your answer and i am sorry about my bad english knowledge
Greetings from Zurich, Switzerland.
Han