Hello.
Just wanted to mention it... when anyone of you posts source code, even if
it's only a small part, PLEASE COMMENT IT, preferably EVERY SINGLE LINE!
Believe me, even though some of you professionals here probably don't need
detailled comments in a source listing, 'newbies' like me who just started
with this a few weeks ago and don't do programming for a living *DO* need
it and are thankful for every comment, even if it's something as simple as
for example
MOV #$80,ACC ; move value $80 into ACC register
ST 2 ; store it in memory address 2
; (used for indirect addressing, @R2)
Again, for the professionals here, commenting such simple things may sound
silly, but I still remember what a hard time I had when working my way
through Marcus Comstedt's sample "Tetris' listing a few weeks ago, needing
over half an hour to fully understand even simple things like the Clear
Screen routine, and _I_ always had a knack for assembler. But others who
have to start _completely_ from scratch will probably give up when finding
only listings with few to no explanations.
So please _please_ *PLEASE*, when you post stuff, comment *EVERYTHING*, as
detailled as possible, and preferrably with as simple words as possible.
Always try to make it understandable even for someone with _no_ previous
VMU knowledge. Give 'hobby-programmers' like me a chance to catch up too.
;)
Anyway, to be completely honest, part of the reason why I posted this is
because Marcus' latest source listing about unrestricted write access to
the VMU Flash Rom again gave me a pretty hard time (also with almost no
comments, but please don't take this personal). :) For a start could
someone please explain to me the following:
fwcall .macro
mov #<$0123,0
push 0
mov #>$0123,0
push 0
not1 ext,0
jmpf \1
.endm
bios_rflash:
fwcall $e027
How does macro definition work in the VMU assembler, and how are those
macros used? What does stuff like "mov #<$0123,0" or "jmpf \1" do
exactly? What's the "\1" for in the latter? What's a "fwcall"?
And here:
clr1 ie,7
mov #$81,ocr
mov #2,xbnk
push xram+4
set1 xram+4,0
mov #0,$7c
callf bios_wflash
callf bios_vflash
pop xram+4
pop xbnk
Why is xram+4 pushed on the stack? Wouldn't that be the data at address
$184 or what? Or why is xbnk set to #2? So many questions, and nothing
has been explained... ;)
Bye
Alessandro
---
You get what anyone gets. You get a lifetime.