Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2001-06

Re: [Intel ASM syntax problem]

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Vit Kavan

1. word ptr is useless
2. I don't understand what is "bx" good for
3. mov ControlBlk25.StartSector,eax; should do the job

Aitor Santamaria Merino wrote:
Hi all,

I am trying to compile this (which compiles under TP): (using asm and
{$ASMMODE Intel}):

(66) mov word ptr ds:ControlBlk25[bx].StartSector,ax (67) mov word ptr ds:ControlBlk25[bx].StartSector[2],ax

where
ControlBlk25 = record { control block for INT 25 extended call } StartSector : LongInt; { start sector to read }
Count : Word; { number of sectors to read } BufferOffs : Word; { data buffer offset }
BufferSeg : Word; { data buffer segment }
end;

The problem appears when it reaches the [bx]:
drvscan.pp(66,18) Fatal: Syntax error, [ expected but identifier found

Any alternative/correction?

Aitor