Can you see where my unmatched block nesting is wrong? I just can't seem to see it? MASM

nooj

New to assembly. Working on printing a copy of incremented values with C++ and MASM and it looked fine to me. I got this error:

..\..\..\..\Downloads\MASM\project.asm(24): error A2005: symbol redefinition : Store
..\..\..\..\Downloads\MASM\project.asm(32): fatal error A1010: unmatched block nesting : Store

CONSOLE     equ     -11
KEYBOARD    equ     -10

extrn   Store:          PROC
extrn   increment:      PROC
extrn   Show:           PROC
extrn   ExitProcess:    PROC    

.data
.data?
c1      byte    ?   ;pass in usual reg  /byte=8-bit char                    char
s1      word    ?   ;pass in usual reg  /word=16-bit short                  short
us1     word    ?   ;pass in usual reg  /word=16-bit short                  unsigned short
i1      dword   ?   ;pass in usual reg  /dword=32-bit int or long int       int
ull1    qword   ?   ;offset 48,56,64    /qword=64-bit long long int         unsigned long long int
ll1     qword   ?   ;offset 48,56,64    /qword=64-bit long long int         long long int
uc1     byte    ?   ;offset 48,56,64    /byte=8-bit char                    unsigned char

.code

Store       PROC
         mov    rcx, c1             ;store param1
         mov    rdx, s1             ;store param2
         mov    r8, us1             ;store param3
         mov    r9, i1              ;store param4
         mov    r10, ull1           ;store param5
         mov    r11, ll1            ;store param6
         mov    r12, uc1            ;store param7
Store       ENDP

Increment   PROC
         inc    c1                  ;increment param1
         inc    s1                  ;increment param2
         inc    us1                 ;increment param3
         inc    i1                  ;increment param4
         inc    ull1                ;increment param5
         inc    ll1                 ;increment param6
         inc    uc1                 ;increment param7
Increment   ENDP

Show        PROC
       Display
Show        ENDP

Display:
    mov      c1, rcx            ;
    mov      s1, rdx            ;
    mov      us1, r8            ;
    mov      i1, r9         ;
    mov      ull1, r10          ;
    mov      ll1, r11           ;
    mov      uc1, r12           ;
    pop      rcx                ;
    pop      rdx                ;
    pop      r8                 ;
    pop      r9                 ;
    pop      r10                ;
    pop      r11                ;
    pop      r12                ;


CherryDT

You are defining Store, Increment and Show as extrn, so you can't define them here afterwards - the are already defined, as coming from an external source!

Remove those extrn definitions. (Only ExitProcess has to stay since it's actually coming from an external source.)

The "unmatched" part is probably just a result of the previous error and the Store PROC line being ignored due to the error, which will make Store ENDP unmatched. So, this error should go away as well once the extrn issue is fixed.

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

分類Dev

RSelenium: Can't see Browser as I run my Code

分類Dev

Why can't I see remote video in my WebRTC app?

分類Dev

Disk is used but I can not see where

分類Dev

Can I see my gem version history?

分類Dev

Why can't I see gnome extensions?

分類Dev

Where can I see the version of VSC that I have?

分類Dev

Why can't I see my USB drive during Windows 7 installation?

分類Dev

Where can I see the next time the function starts?

分類Dev

Where can I see Code execution time VS2019?

分類Dev

Can I let some user to see my analytics data?

分類Dev

How can I see my LAN when connected to a VPN?

分類Dev

Compiler can't see argument

分類Dev

Can't see test files

分類Dev

Why can't I see CloudWatch Logs for Lambda function?

分類Dev

Why can't I see the keys of an Error object?

分類Dev

Why i can't see new branch in tortoiseHG?

分類Dev

Can you see previous values for an atom in Clojure?

分類Dev

in Wso2 Publisher Each user just access to himself API And Can't see other api

分類Dev

There is something wrong with my formulas and I can't figure out which one and where

分類Dev

Why can't I assign to a variable a JSON value that I can see in Debug mode?

分類Dev

Can't see localstorage event across tabs

分類Dev

Node Docker Runs, but can't see the application

分類Dev

AWS QuickSight can't see Athena DB

分類Dev

Can't see custom topology on DLUX

分類Dev

Can't see Textbox text in DataGrid

分類Dev

why can't see regression line?

分類Dev

CKEDITOR Can't see content area with DecoupledEditor

分類Dev

Virtualized OSX can't see iPhone device

分類Dev

Eclipse can't see objects in the array

Related 関連記事

ホットタグ

アーカイブ