On Sun, 26 Aug 2018 18:32:29 +0200
Florian Klämpfl wrote:
> Am 26.08.2018 um 11:43 schrieb Giuliano Colla:
> > Il 23/08/2018 11:34, Marco Borsari via fpc-pascal ha scritto:
> >
> >> It would be for the Wirth optimization in the access of an array,
> >> when the index is 0 or 1, allowing the elim
Am 26.08.2018 um 11:43 schrieb Giuliano Colla:
> Il 23/08/2018 11:34, Marco Borsari via fpc-pascal ha scritto:
>
>> It would be for the Wirth optimization in the access of an array,
>> when the index is 0 or 1, allowing the elimination of a multiplication.
>
> I'm afraid that this sort of optimiz
Il 23/08/2018 11:34, Marco Borsari via fpc-pascal ha scritto:
It would be for the Wirth optimization in the access of an array,
when the index is 0 or 1, allowing the elimination of a multiplication.
I'm afraid that this sort of optimization is rather outdat
On Thu, 23 Aug 2018 09:32:58 +0200
Florian Klämpfl wrote:
> Am 21.08.2018 um 11:42 schrieb Marco Borsari via fpc-pascal:
> > Il 20/08/2018 17:32, Giuliano Colla ha scritto:
> >
> >> On the Intel architecture you cannot perform pointer arithmetic as if a
> >> pointer were just a number.
> >> A po
Am 21.08.2018 um 11:42 schrieb Marco Borsari via fpc-pascal:
> Il 20/08/2018 17:32, Giuliano Colla ha scritto:
>
>> On the Intel architecture you cannot perform pointer arithmetic as if a
>> pointer were just a number.
>> A pointer is composed of two parts: a "selector" and an "offset", which
>> m
Il 20/08/2018 17:32, Giuliano Colla ha scritto:
On the Intel architecture you cannot perform pointer arithmetic as if a
pointer were just a number.
A pointer is composed of two parts: a "selector" and an "offset", which
must be handled separately.
Ah, I saw, 32 bit segmentation is quite compli
Il 18/08/2018 15:52, Marco Borsari via fpc-pascal ha scritto:
it works only for index 0, and crashes otherwise. Maybe
a problem of alignment? Or must be tab declared in data section?
On the Intel architecture you cannot perform pointer arithmetic as if a
pointer were just a number.
A pointer
Il 17/08/2018 18:04, Giuliano Colla ha scritto:
I modified your code, to add a jump table (as it is in the example you
mention)
I came to that
program branch;
{$ASMMODE intel}
label tab,stop,a,b,c;
var idx:byte;
begin
write('Index? ');
readln(idx);
asm
xor eax,eax;
mov al,idx;
shl ax,2;
mov e
Il 17/08/2018 18:04, Giuliano Colla ha scritto:
Enjoy programming!
Giuliano
Thank you!
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Il 17/08/2018 15:46, Marco Borsari via fpc-pascal ha scritto:
I found
that someone made that for me at link
http://www.mindfruit.co.uk/2012/01/switch-blocks-jump-tables.html
and I have tried to rewrite the program in at&t syntax
Il 16/08/2018 17:40, Giuliano Colla ha scritto:
The first thing I notice is that you load BX, which is a 16 bit register
(the lower 16 bits of EBX), with the value of "next", and then Jump to
the content of EBX which is a 32 bit register, whose lower 16 bits have
been loaded but whose upper 16 b
Il 14/08/2018 15:21, Marco Borsari via fpc-pascal ha scritto:
Why the code below does exit gracefully without prints anything?
Sure, it is for my poor knowledge of the assembler, but in some
details, please...
program branch;
{$ASMMODE intel}
label next,stop,a,b,c;
var idx:byte;
begin
write('
Why the code below does exit gracefully without prints anything?
Sure, it is for my poor knowledge of the assembler, but in some details,
please...
program branch;
{$ASMMODE intel}
label next,stop,a,b,c;
var idx:byte;
begin
write('Index? ');
readln(idx);
asm
mov ax,idx;
shl ax,2;
mov bx,next;
a
13 matches
Mail list logo