[[fpc-pascal]Intel ASM syntax problem]

Vit Kavan vit.kavan at usa.net
Mon Jun 25 17:42:05 CEST 2001


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 <aitor.sm at terra.es> 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

_______________________________________________
fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal





More information about the fpc-pascal mailing list