Re: [stella] HMBL 2600 Programmer

Subject: Re: [stella] HMBL 2600 Programmer
From: KirkIsrael@xxxxxxxxxxxxx
Date: 15 Oct 2002 21:54:13 -0000
> Hey...that's not an entirely bad idea to get stella
> list T-shirts printed up and sell them on, like, cafe
> press.  Then we could all flaunt our esoteric
> programming skills. :)  Maybe something like:
> 
> "Stella List:
> Atari 2600 Programmers Do It In Real Time"
> 
> Just an idea. :)
> 
> Ben

Cafepress shirts are easy and colorful, but pretty 
crumbly when machine watched. They're not durable at 
all, alas.

Getting back to the original issues, I'm thinking about
writing a perl utility (which I should be able to make 
into a standalone .exe, for people who don't want to install
perl on their system) that will analyze the dasm -lList
file and flag any cross-page conditional jumps.

Is there any documentation of the structure of the generated
list files? A lot of it's self-explanatory but I don't if 
there are some DASM docs that would give me the official story.

Also, I could use some help in defining what exactly I'm looking
for, and if there are any other useful tasks such an analyzer
could perform. (Remember, in someways I'm punching above my weight
when it comes to my actual deep asm knowledge)

My strategy was going to be:
Look at the instruction byte. If it's one of these:
BPL (Branch on PLus)           $10
BMI (Branch on MInus)          $30
BVC (Branch on oVerflow Clear) $50
BVS (Branch on oVerflow Set)   $70
BCC (Branch on Carry Clear)    $90
BCS (Branch on Carry Set)      $B0
BNE (Branch on Not Equal)      $D0
BEQ (Branch on EQual)          $F0

then look at the (what do you call it, argument?) byte and if 
the current instruction location + the argument + 2 (I think)
takes you to a different page then flag it (hopefully being 
able to cross reference the label the person used rather than
just spitting out two memory locations and making the person
look in the damn list file themselves...)

Should I try to catch that 
AN INDIRECT JUMP MUST NEVER USE A
VECTOR BEGINNING ON THE LAST BYTE
OF A PAGE
issue as well? Is that the other big killer?

I think this might be the basis of a very nice, albeit limited,
tool. Almost a "lint" for 2600 ASM :-)

-- 
KirkIsrael@xxxxxxxxxxxxx    http://kisrael.com
 "Anyone who says life is short really isn't paying attention." --March 4 2001 


----------------------------------------------------------------------------------------------
Archives (includes files) at http://www.biglist.com/lists/stella/archives/
Unsub & more at http://www.biglist.com/lists/stella/


Current Thread