Why is it that when I write an instruction such as LDA #$01 that it changes to jsr $2020? it does that for every single instruction. what Is going on. My only Vicmon experience is on this website:https://techtinkering.com/2013/04/16/be ... re-vic-20/
and everything there worls ok on my end but the moment I try to make something of my own, the above happens. please help.
Vicmon is set at $6000 Sys 24576
Machine language issue
Moderator: Moderators
-
- Vic 20 Hobbyist
- Posts: 108
- Joined: Sun Mar 10, 2019 7:39 pm
- Location: lodi california
- Occupation: student
Machine language issue
Bedroom coder=rock star
modern coder= pop star
i'd rather be a rock star than a pop start
modern coder= pop star
i'd rather be a rock star than a pop start

Re: Machine language issue
What address are you assembling at? If the result "changes" that suggests you're using an address that isn't RAM.
- Mike
- Herr VC
- Posts: 5131
- Joined: Wed Dec 01, 2004 1:57 pm
- Location: Munich, Germany
- Occupation: electrical engineer
Re: Machine language issue
... or no memory at all.srowe wrote:you're using an address that isn't RAM.
Most probably the OP wanted to assemble the instruction at address $20xx. Read accesses from "open" address ranges quite often (but not reliably) return the high byte of the address as data. That means, even though LDA #$01 ($A9 $01) was written to $2000 and $2001, what got read back was $20 $20 $20 ... and this is disassembled (as control mechanism of the direct assembler) as JSR $2020.
Solution: Enable RAM in BLK1 ($2000..$3FFF) in VICE or add the necessary RAM expansion on real hardware.
There's also the thread "A sample programming session in VICMON" you have already replied to.20questions wrote:My only Vicmon experience is on this website:https://techtinkering.com/2013/04/16/be ... re-vic-20/

-
- Vic 20 Hobbyist
- Posts: 108
- Joined: Sun Mar 10, 2019 7:39 pm
- Location: lodi california
- Occupation: student
Re: Machine language issue
so, not enough memory? got it. thanksMike wrote:... or no memory at all.srowe wrote:you're using an address that isn't RAM.
Most probably the OP wanted to assemble the instruction at address $20xx. Read accesses from "open" address ranges quite often (but not reliably) return the high byte of the address as data. That means, even though LDA #$01 ($A9 $01) was written to $2000 and $2001, what got read back was $20 $20 $20 ... and this is disassembled (as control mechanism of the direct assembler) as JSR $2020.
Solution: Enable RAM in BLK1 ($2000..$3FFF) in VICE or add the necessary RAM expansion on real hardware.
There's also the thread "A sample programming session in VICMON" you have already replied to.20questions wrote:My only Vicmon experience is on this website:https://techtinkering.com/2013/04/16/be ... re-vic-20/

Bedroom coder=rock star
modern coder= pop star
i'd rather be a rock star than a pop start
modern coder= pop star
i'd rather be a rock star than a pop start

Re: Machine language issue
Working on your first Hello World! in assembly?
-
- Vic 20 Hobbyist
- Posts: 108
- Joined: Sun Mar 10, 2019 7:39 pm
- Location: lodi california
- Occupation: student
Re: Machine language issue
I've been absorbin as much as possible about the 6502, using Assembly Lines (Great book) and others. I use AppleWin when i want to do serious programming (even though I have no idea how to Use Merlin (no how to docs were released with the other stuff) nor how to exit the Editor/assembler.OmegaMax wrote:Working on your first Hello World! in assembly?
I then try to replicate the code on the C64 or the Vic 20. So my day is usually full.
Bedroom coder=rock star
modern coder= pop star
i'd rather be a rock star than a pop start
modern coder= pop star
i'd rather be a rock star than a pop start
