[Coco] Assembler question

gene heskett gheskett at wdtv.com
Sun Aug 28 19:48:29 EDT 2011


On Sunday, August 28, 2011 07:37:08 PM Helio Emery Jr. did opine:

> Hey all,
> 
> I found what was doing.
> It turns out it was a silly beginners mistake.
> I was addressing a constant using U register indirect addressing,
> instead of pcr indirect addressing. This is one of the things that
> makes an assembly programing much more dificult to learn. The compiler
> does not help with this kind of mistakes...
> And my program is now with some 300 lines of code, so it's not always
> ease to see those mistakes while learning.

As a relative beginner, you may find that building yourself a boot disk 
with krnp3 and krnp4 in it is quite helpful.  p3 is the error translator so 
that an error 216 is translated to tell you "file not found" for instance.  
p4 in turn implements the 'os9 F$RegDmp' call.  To use that, put the CC 
register on the stack, make the call, which dumps all the cpu registers to 
the terminal screen, and pop CC back off the stack and the rest of your 
program will never know it was tapped into to see if it was correct.  
Virtually every line of vfy was so inspected when I wrote it yonks ago, and 
is the major reason vfy is, AFAIK, dead stable.

> Anyway,
> Thanks everybody for helping a newbee.
> Now the program works as it should.
> See you soon here,
> Helio

Cheers, gene
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
My web page: <http://204.111.67.138:85/gene>
Dreams are free, but you get soaked on the connect time.



More information about the Coco mailing list