{"id":1001,"date":"2022-08-30T15:10:44","date_gmt":"2022-08-30T15:10:44","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/11\/09\/why-undefined-symbol-start-error-in-masm32-in-window-7-64-bit-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:10:44","modified_gmt":"2022-08-30T15:10:44","slug":"why-undefined-symbol-start-error-in-masm32-in-window-7-64-bit-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/why-undefined-symbol-start-error-in-masm32-in-window-7-64-bit-collection-of-common-programming-errors\/","title":{"rendered":"why undefined symbol : START error in masm32 in window 7 64 bit?-Collection of common programming errors"},"content":{"rendered":"<p>after remove start, it left error at line 16, why error at Mov AX, DATA<\/p>\n<p>Microsoft (R) Macro Assembler Version 6.14.8444 Copyright (C) Microsoft Corp 1981-1997. All rights reserved.<\/p>\n<p>Assembling: D:\\Linux\\test1.asm D:\\Linux\\test1.asm(16) : error A2004: symbol type conflict _ Assembly Error<\/p>\n<p>Edited:<\/p>\n<pre><code>        TITLE EXAMPLE\nDATA    SEGMENT\nVARX    DW          6\nVARY    DW          7\nRESULT  DW          ?\nDATA    ENDS\nSTACK1  SEGMENT PARA STACK\n        DW          20H DUP(0)\nSTACK1  ENDS\nCOSEG   SEGMENT\nPROC1   PROC    FAR\n        ASSUME  CS:COSEG, DS:DATA, SS:STACK1\n        PUSH    DS\n        MOV     AX, 0\n        PUSH    AX\n        MOV     AX, DATA\n        MOV     DS, AX\n        MOV     DX, VARX\n        MOV     DX, VARY\n        MOV     CL, 3\n        SAL     DX, CL\n        SUB     DX, VARX\n        SAR     DX, 1\n        MOV     RESULT, DX\n        RET\nPROC1   ENDP\nCOSEG   ENDS\n        END\n<\/code><\/pre>\n<ol>\n<li>\n<p>Because START is defined inside a procedure, it is not a valid identifier outside it.<\/p>\n<p>Also, if it did work you would be creating a bug. PROC is a macro that expands to setup a stack frame, so your label START is not actually at the start of the code, while END START indicates that the entry point for your program is START. If you want your program to start with a main procedure you should just use the name of that procedure after END, like END PROC1.<\/p>\n<p>If it really was your intent to set the entry point to somewhere in your procedure, you could surround the label with OPTION NOSCOPED and OPTION SCOPED, so the label will be public, and not just visible inside the procedure.<\/p>\n<\/li>\n<\/ol>\n<p id=\"rop\"><small>Originally posted 2013-11-09 23:12:09. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>after remove start, it left error at line 16, why error at Mov AX, DATA Microsoft (R) Macro Assembler Version 6.14.8444 Copyright (C) Microsoft Corp 1981-1997. All rights reserved. Assembling: D:\\Linux\\test1.asm D:\\Linux\\test1.asm(16) : error A2004: symbol type conflict _ Assembly Error Edited: TITLE EXAMPLE DATA SEGMENT VARX DW 6 VARY DW 7 RESULT DW ? [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1001","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1001","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=1001"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1001\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=1001"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=1001"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=1001"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}