Search the web
Sign In
New User? Sign Up
vmu-dev · The VMU Development list
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
[vmu] Please COMMENT your stuff...   Message List  
Reply | Forward Message #51 of 1156 |
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.



Tue Mar 7, 2000 2:26 am

tyro@...
Send Email Send Email

Forward
Message #51 of 1156 |
Expand Messages Author Sort by Date

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! ...
Alessandro Sanasi
tyro@...
Send Email
Mar 7, 2000
2:25 am

tyr-@... (alessandro sanasi) wrote: original article:http://www.egroups.com/group/vmu-dev/?start=51 ... Those kind of comments are in IMO worse...
Marcus Comstedt
marcus@...
Send Email
Mar 7, 2000
2:14 pm

... Agreed. Of course it's better to actually write what purpose an instruction has instead of just explaining the function. But I also think that when the...
Alessandro Sanasi
tyro@...
Send Email
Mar 19, 2000
10:23 pm

tyr-@... (alessandro sanasi) wrote: original article:http://www.egroups.com/group/vmu-dev/?start=83 ... stack ... that ... code to ... address ... ...
Marcus Comstedt
marcus@...
Send Email
Mar 26, 2000
11:41 pm

... Uh... guess I simply read your code wrong, then. At first glance it looked to me as if you were pushing the contents of Rom location $0123 and $0124 onto...
tyro@...
Send Email
Apr 6, 2000
2:54 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help