Re: Pascal Compiler

From: Spiro Trikaliotis (ml-cbmhackers_at_trikaliotis.net)
Date: 2004-12-12 13:25:10

Hello,

* On Fri, Dec 10, 2004 at 01:27:40PM -0700 Steve Judd wrote:
 
> I thought there was a routine for printing 16-bit ints.  Line numbers,
> for example.

$BDCD, value in A/X. Anyway, this still utilizes floating point.

> I also thought there was a "print signed number in .AY" routine.

I don't know about this. But you can transfer anything into the FAC,
convert the FAC to ASCII ($BDDD), and output the string ($AB1E) -
exactly, what $BDCD from above does, too.

 
> In Slang, each variable type has three major attributes: signed/unsigned,
> fixed/float, and the length in bytes.  For bitwise operations, the same
> code is used for any length; the code goes something like

Of course it is arguable, but in general, I would prefer speed over
size. As I showed in another mail, you do not even need to implement
every size, but only the biggest one.

Of course, if size is of concern, a loop is much better suited.
Possibly, Ruud might want to let the user decide what he prefers?

> This is very easy since the same code is emitted for each byte.  (As
> opposed to, say, shifting left/right, since the code for the first
> byte is different than the code for successive bytes,

Is it really different? I have a set up, then I can do the shift for
every byte (always the same). Do I misunderstand you?

Regards,
   Spiro.

-- 
Spiro R. Trikaliotis
http://www.trikaliotis.net/

       Message was sent through the cbm-hackers mailing list

Archive generated by hypermail pre-2.1.8.