Ассемблер ошибка a2008

Permalink

Cannot retrieve contributors at this time

description title ms.date ms.topic f1_keywords helpviewer_keywords ms.assetid

Learn more about: ML Nonfatal Error A2008

ML Nonfatal Error A2008

12/17/2019

error-reference

A2008

A2008

ca24157f-c88a-4678-ae06-3bc3cd956001

syntax error :

A token at the current location caused a syntax error.

One of the following may have occurred:

  • A dot prefix was added to or omitted from a directive.

  • A reserved word (such as C or SIZE) was used as an identifier.

  • An instruction was used that was not available with the current processor or coprocessor selection.

  • A comparison run-time operator (such as ==) was used in a conditional assembly statement instead of a relational operator (such as EQ).

  • An instruction or directive was given too few operands.

  • An obsolete directive was used.

See also

ML Error Messages

Ferreira

1 / 1 / 0

Регистрация: 12.11.2018

Сообщений: 5

1

MASM

18.09.2019, 23:37. Показов 7091. Ответов 2

Метки нет (Все метки)


Студворк — интернет-сервис помощи студентам

Начал изучать книгу «Самоучитель Ассемблера» Александра Крупника, и в первой же программе ошибка.

Assembler
1
2
3
4
5
6
7
8
9
10
.586
.model flat, stdcall
includelib D:masm32libkernel32.lib
ExitProcess proto :DWORD
.code
start:
mov eax. 2
add eax. 3 
invoke ExitProcess. 0
end start

PowerShall:

PS D:Asemblersum> ml /c /coff new.asm
Microsoft (R) Macro Assembler Version 6.14.8444
Copyright (C) Microsoft Corp 1981-1997. All rights reserved.

Assembling: new.asm
new.asm(7) : error A2008: syntax error : in instruction
new.asm(8) : error A2008: syntax error : in instruction
new.asm(9) : error A2166: structure field expected
PS D:Asemblersum>



0



Programming

Эксперт

94731 / 64177 / 26122

Регистрация: 12.04.2006

Сообщений: 116,782

18.09.2019, 23:37

2

Ушел с форума

Автор FAQ

15893 / 7467 / 1012

Регистрация: 11.11.2010

Сообщений: 13,449

19.09.2019, 04:01

2

Ferreira,
в 7 и 8 строке должны быть запятые, а не точки

new.asm(7) : error A2008: syntax error : in instruction
new.asm(8) : error A2008: syntax error : in instruction

в 9 строке после ExitProcess должна быть запятая

new.asm(9) : error A2166: structure field expected



2



1 / 1 / 0

Регистрация: 12.11.2018

Сообщений: 5

19.09.2019, 19:20

 [ТС]

3

Спасибо, разобрался.



0



I’m trying to write a bootloader for an OS I’m developing.

I’m getting a syntax error on the first line.

Here is my assembly code:

.286 ; CPU Type
.model TINY  ; memory of model
;---------------------- EXTERNS -----------------------------
extrn               _BootMain:near     ; prototype of C func
;------------------------------------------------------------
;------------------------------------------------------------   
.code 
org             07c00h         ; for BootSector
_main:
                jmp short _start       ; go to main
                nop

;----------------------- CODE SEGMENT -----------------------
_start: 
        cli
        mov ax,cs               ; Setup segment registers
        mov ds,ax               ; Make DS correct
        mov es,ax               ; Make ES correct
        mov ss,ax               ; Make SS correct        
        mov bp,7c00h
        mov sp,7c00h           ; Setup a stack
        sti
                                ; start the program 
        call           _BootMain
        ret
        END _start
        END _main ; End of program

Here’s my compile line:

"*location*14.10.25017binHostX86x86ML.EXE"  /c StartPoint.asm

The error I’m getting:

StartPoint.asm(1): error A2008: syntax error : .

As far as I know, this line shouldn’t be a problem.

Thanks for the help :)

What is «error A2008: syntax error: integer» and how do I solve it?

before, I have the error A2008: syntax error : . and error A2008: syntax error : integer

, then I looked at one post, asking me to download older version of MASM, which I did, and the . error was resolved but error A2008: syntax error : integer is still there.

;.586
.MODEL flat,C

longestSequence PROTO, theArrayOFFSET:PTR DWORD, theArraySize: DWORD ;proto declaration

;.data

.code




longestSequence PROC USES esi edi eax ebx ,
theArrayOFFSET: PTR DWORD,
theArraySize: DWORD

LOCAL temp: DWORD 10 DUP(?) //error happens here
LOCAL lengthc: DWORD


; some irrelevant code

I am sure I declared the LOCAL correctly, seems like something is happening with the size of the temp array. (I am trying to call this procedure from a c++ method)

Asmc Macro Assembler

Asmc Macro Assembler Reference

ASMC Nonfatal Error A2008

syntax error :

A token at the current location caused a syntax error.
One of the following may have occurred:

  • A dot prefix was added to or omitted from a directive.
  • A reserved word (such as C or SIZE) was used as an identifier.
  • An instruction was used that was not available with the current
    processor or coprocessor selection.
  • A comparison run-time operator (such as ==) was used in a conditional
    assembly statement instead of a relational operator (such as EQ).
  • An instruction or directive was given too few operands.
  • An obsolete directive was used.

* ML 6.0 compatible error

See Also

ASMC Error Messages

Понравилась статья? Поделить с друзьями:

Не пропустите эти материалы по теме:

  • Яндекс еда ошибка привязки карты
  • Ассасин юнити ошибка запуска
  • Ассасин крид юнити ошибка msvcp100 dll
  • Ассасин крид юнити ошибка acu
  • Ассасин крид юнити выдает ошибку

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии