pgubook-readers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Pgubook-readers] Type .long


From: George Nyoro
Subject: Re: [Pgubook-readers] Type .long
Date: Sat, 11 Jan 2014 13:58:00 +0300

Well, yes, 255 is the maximum per byte, but a long is supposed to span 4 bytes (or 8 on some 64 bit architectures).


On 11 January 2014 13:40, Roger <address@hidden> wrote:
> On Sat, Jan 11, 2014 at 10:48:19AM +0300, George Nyoro wrote:
...snip...
>   At the offending line, if I replace it with je end, the program works. If
>   I leave it as is, the exit status is 0, showing that the program did not
>   run even once. The reason I came to understand or diagnose is that the
>   value of eol is some value greater than 255 while %edi is, for the start
>   of the program after moving the address to it, less than 255. eol is then
>   seen as smaller than edi by the value that it overshoots 255 by hence the
>   program never runs� through the rest of loop.
>
>   Now, my problem is, why? The only part in the book that referenced
>   anything like this said that only the exit status is allowed to be less
>   than 256. But why do longs overshoot? How then can I ever compute large
>   numbers? Unless something is wrong with my code.
>
>   Please help, Much appreciated.

Interesting you noted the numeral 255, as some platforms have a limit of
255/256 for hardware addresses/addressing.

"255 (number)"
http://en.wikipedia.org/wiki/255_(number)

I remember this from my Commodore 64 days.
PEEK
http://www.c64-wiki.com/index.php/PEEK


--
Roger
http://rogerx.freeshell.org/


_______________________________________________
Pgubook-readers mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/pgubook-readers


reply via email to

[Prev in Thread] Current Thread [Next in Thread]