Help required-Reg.

mastercomputerservices 1957 mastercomputerservices1957@gmail.com
Sat Oct 10 05:11:00 GMT 2020


Namaste!

My OS: Windows XP,32 Bit, Intel Centrino Core*2 Duo, Toshiba A
205,Satellite,386 Pentium Laptop.

My binUtils: GNU Assembler Version 2.9.4 <i386-mingw32> using BFD version
2.9.4.Only this displayed after entering in the command line on my laptop:

Syntax: as  -v

How to solve the below Assembly routine?

Please help me to solve this problem.

The below routine I have tried in GAS.  I don’t know the correct syntax for
the below error indicated 4, 5 lines.

       pushl  %ebp                  # no error

       movl   %ebp,%esp             # no error

       movb   %ah,0                 # no error

       les    %bx,dword ptr[%bp+6]  # error



 Error in Line 4: Ignoring junk ‘ptr [%bp+6]’ after expression

  Error in Line 4: Suffix or Operands invalid for ‘les’

       movsd  %al,%es:[%bx]         # error



  Error in Line 5: No such 386 instruction: ‘movsd   %al,%es:[%bx]’

       int    $16                   # no error

       movl   %esp,%ebp             # no error

       pop    %ebp                  # no error

       ret    $04                   # no error



I am giving below masm32,Ver10,3 routines(A,B,C) without any errors. Object
files generated without any trouble.

*A:*

.386P

.MODEL  FLAT,FORTRAN

.DATA

.CODE

                 PUBLIC SCREEN

SCREEN   PROC   FAR

                 PUSH   EBP

                 MOV    EBP,ESP

                 MOV    AH,0

                 LES       BX,DWORD PTR [EBP+6]

                 MOV    AL,ESI:[EBX]

                 INT       16

                 MOV    ESP,EBP

                 POP      EBP

                 RET       04

                 SCREEN ENDP

END

*

*B:*

   .386P

   .MODEL  LARGE,FORTRAN; FLAT,STDCALL

    OPTION  CASEMAP: NONE

    .DATA

    B        DB     ?

    F        DB     ?

    Cm       DB     32

    .CODE

    PUBLIC   COLOR

    COLOR    PROC   FAR

            PUSH   EBP

            MOV    EBP,ESP

            LES    SI,DWORD PTR [EBP+10]

            MOV    BL,ES:[ESI]

            MOV    B,BL

            MOV    AH,11

            MOV    BH,0

            MOV    BL,B

            INT    16

            LES    SI,DWORD PTR [EBP+06]

            MOV    BL,ES:[ESI]

            MOV    F,BL

            CMP    B,8

            JG     A10

            CMP    F,15

            JG     A10

            MOV    AL,B

            MUL    Cm

            ADD    AL,F

            MOV    B,AL

            MOV    AH,9

            MOV    AL,' '

            MOV    BL,B

            MOV    BH,0

            MOV    CX,2000

            INT    16

   A10:     MOV    ESP,EBP

            POP    EBP

            RET    8

            COLOR  ENDP

   END

 *

C:

.386P

.MODEL  FLAT,STDCALL

OPTION  CASEMAP: NONE

.DATA

.CODE

PUBLIC  PIXEL

PIXEL   PROC   FAR

        PUSH   EBP

        MOV    EBP,ESP

        MOV    AH,12

        LES    BX,DWORD PTR [EBP+14]

        MOV    AL,ES:[EBX]

        LES    BX,DWORD PTR [EBP+10]

        MOV    DX,ES:[EBX]

        LES    BX,DWORD PTR [EBP+06]

        MOV    CX,ES:[EBX]

        INT    16

        MOV    ESP,EBP

        POP    EBP

        RET    12

        PIXEL  ENDP

END



I can’t find any useful info related to my problem (LES,MOVL,DWORD PTR)
from the below . Working examples also not available.

https://sourceware.org/binutils/docs-2.35/
https://sourceware.org/binutils/docs-2.35/as/index.html

Is there any other info required from my end?


 Thanks


Regards,

D.SundarChand

+91 8688568699


More information about the Binutils mailing list