Saturday, December 12, 2009

So last night I finally had time to finish the decimal printing routines. Along the way I found I had really misunderstood the function for the DIV instruction. I had thought that the OV flag would be set when the resulting quotient was zero. Looking back on the references, I can't see where I ever got that idea.

The *printf* routines take 446 bytes, not too bad, but I would have liked it to be smaller. Also, the stdio.asm file is a mess. It works, but there is little organization, and the layout is poor, with unnecessary B instructions.

I should start thinking about making a user-callable library for syscalls or somethihng. I don't want to go too far down the road of assuming a single-user, single-tasking environment. That works for now, but will all need to be ripped up later.

Honestly, a good chunk of the code (126 bytes) is encoding flags to discriminate the *print* forms.

No comments:

Post a Comment