NewsProductsSprinterSupportDownloadSprinter ForumAbout usLinksSite map Russian site

English
   >> Software programming for the computer Sprinter
Thread views: 47 View all threadsNext thread*Threaded Mode

Marcelo
(stranger )
2002/05/22 15:40
Silly bug in ExePrFix example Reply to this post

There's a not really important bug in the EXEPRFIX.ASM assembly example, but it may drive a beginner mad. In the PRINTNUM routine, Tens overwrite Hundreds when preparing the print area for numbers between 0 to 255 (there's no routine for 16 bit numbers, though). This is (part of) the code:

ADD A,100
LD (HL),C

NUMB
LD C,"0"-1

When, later, C is again put at (HL), without first incrementing HL! One solution could be:

ADD A,100
LD (HL),C

INC HL
NUMB
LD C,"0"-1

That is, add a INC HL instruction before entering the NUMB label (this would make the EXE one byte longer).
This is a not really important bug because the command line cannot be longer than 128 (decimal) characters, and the biggest correct number printed by the routine without the correction would be 99 (decimal). I really doubt anyone tested this with such a long command line!


Marcelo.
----------------------------------
Speccy rules, its staff is Sprinter.



Alex_GoryachevAdministrator
(Sprinter Team)
2002/05/23 12:11
Re: Silly bug in ExePrFix example new [re: Marcelo]Reply to this post

You are right! Thank you for the bug report.
We will add your comment to the program description.

---
PETERS PLUS LTD


View all threadsNext thread*Threaded Mode
Jump to