Masm Error A2008 Syntax Error
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers error a2008: syntax error : c or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x
Syntax Error Endp
Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Syntax errors in my assembly code [closed] up vote -7 down vote favorite 1 I had this code and I was wondering if anyone would be willing to help me get it working. TITLE MASM Template (main.asm) ; Description: this code is supposed to print out each letter followed by a space and then the capitalized version on seperate lines ; Revision date: INCLUDE Irvine32.inc .data myArray byte 'l','s','d','t','h','c','f','u','c','k' ;my array of 10 characters .code main PROC mov ecx,0 ;clears ecx mov ecx,LENGTHOF myArray ;should be 10 mov edi,OFFSET myArray ;will point to the beginning of the array mov eax,0 ;clears eax mov esi,0 ;clears esi LOne: mov eax,myArray[esi] ;points the pointer at the beginning of myArray WriteChar eax ;prints the designated value in the array WriteChar 32 ;prints a space (32 is the ascii value for ' ') sub eax,32 ;subtracts 32 from the ascii value of the char ;the capital version of each letter is -32 of its ascii value WriteChar eax ;prints the capital version call CLRF ;prints new line inc esi ;increments esi to the next array value dec ecx ;decrements ecx, moving it through the array loop LOne ;loops back until ecx is equal to zero exit main ENDP END main It won't compile giving me syntax errors. 1>main.asm(22): error A2008: syntax error : eax 1>main.asm(23): error A2008: syntax error : WriteChar 1>main.asm(26): error A2008: syntax error : eax 1>main.asm(21): error A2022: instruction operands must be the same size 1>main.asm(27): error A2006: undefined symbol : CLRF assembly syntax masm irvine32 share|improve this question edited Jan 7 at 8:24 rkhb 7,56271628 asked Sep 23 '11 at 3:16 Mattj7 614 closed as not a real question by Jaguar, bensiu, TheHippo, syb0rg, kolossus May 2 '13 at 3:16 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question. 2
resources Windows Server 2012 resources Programs MSDN subscriptions Overview Benefits Administrators Students Microsoft Imagine Microsoft Student Partners ISV Startups TechRewards Events Community Magazine Forums Blogs Channel 9 Documentation APIs and reference Dev centers Samples Retired content We’re sorry. The content you requested has been removed. You’ll be auto redirected in 1 second. ML Error Messages ML Nonfatal Errors ML Nonfatal Errors A2000-A2049 ML Nonfatal Errors A2000-A2049 ML Nonfatal Error A2008 ML Nonfatal Error A2008 ML Nonfatal Error A2008 ML Nonfatal Error A2004 ML Nonfatal Error A2006 ML Nonfatal Error A2008 ML Nonfatal http://stackoverflow.com/questions/7523869/syntax-errors-in-my-assembly-code Error A2010 ML Nonfatal Error A2019 ML Nonfatal Error A2022 ML Nonfatal Error A2031 ML Nonfatal Error A2034 ML Nonfatal Error A2037 ML Nonfatal Error A2038 ML Nonfatal Error A2039 ML Nonfatal Error A2044 ML Nonfatal Error A2047 TOC Collapse the table of content Expand the table of content This documentation is archived and is not being maintained. This documentation is archived https://msdn.microsoft.com/en-us/library/wf749ktb.aspx and is not being maintained. ML Nonfatal Error A2008 Visual Studio 2015 Other Versions Visual Studio 2013 Visual Studio 2012 Visual Studio 2010 Visual Studio 2008 Visual Studio 2005 Visual Studio .NET 2003  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 AlsoML Error Messages Show: Inherited Protected Print Export (0) Print Export (0) Share IN THIS ARTICLE Is this page helpful? Yes No Additional feedback? 1500 characters remaining Submit Skip this Thank you! We appreciate your feedback. Dev centers Windows Office Visual Studio Microsoft Azure More... Learning resources Microsoft Virtual Academy Channel 9 MSDN Magazine Community Forums Blogs Codeplex Support Self support Programs B
error A2008: syntax error : MENUINFOMenuToolbar.asm(279) : error A2006: http://www.asmcommunity.net/forums/topic/?id=22330 undefined symbol : MENUINFOMenuToolbar.asm(279) : error A2195: parameter http://www.masmforum.com/board/index.php?PHPSESSID=786dd40408172108b65a5a36b09c88c0&topic=12036.0 or local cannot have void typeMenuToolbar.asm(285) : error A2006: undefined symbol : hbrBackMenuToolbar.asm(286) : error A2006: undefined symbol : cbSizeMenuToolbar.asm(287) : error A2006: undefined symbol : fmaskMake error(s) occured.Total compile syntax error time 430 msPlease help and advise on how to restore the above error which I am getting in assembling& compiling a tutorial made for RadASM IDE with rap file.Thanks!Naiman Posted on 2005-11-09 18:11:09 by nkhan Re: error A2008: syntax masm error a2008 error : MENUINFO HiMENUINFO declaration is missing in your code.Here it is:
MENUINFO struct
cbSize DWORD ?
fmask DWORD ?
dwstyle DWORD ?
cyMax DWORD ?
hbrBack DWORD ?
dwContextHelpID DWORD ?
dwMenuData DWORD ?
MENUINFO ends
KetilO Posted on 2005-11-10 02:38:04 by KetilO Re: error A2008: syntax error : MENUINFO Thanks for replying! you are right , infact it was not declared in windows.inc which I have now added.However this problem is now resolved.Thanks! great reply!Naiman Posted on 2005-11-10 11:08:50 by nkhan
Links and Website Archived Old Forum Files Links for VC and MASM 128553 Posts in 15254 Topics by 684 Members Latest Member: mottt The MASM Forum Archive 2004 to 2012 Miscellaneous Forums 16 bit DOS Programming syntax error with a macro « previous next » Pages: [1] Author Topic: syntax error with a macro (Read 3074 times) zak100 Guest syntax error with a macro « on: August 07, 2009, 06:29:28 AM » Hi,I want to print a string using a macro at boot time, passing the name of string as argument, but I am getting a syntax error. Can somebody plz help me with this?D:\masm prog>ml bpb_str.asmMicrosoft (R) Macro Assembler Version 6.14.8444Copyright (C) Microsoft Corp 1981-1997. All rights reserved. Assembling: bpb_str.asmbpb_str.asm(53) : error A2008: syntax error : print_mesgD:\masm prog>Zulfi.Code:;---------------------------------------------------------------------------------- .MODEL TINY .CODE;---------------------------------------------------------------------------------- ORG 0;code branchboot0: jmp short boot1;---------------------------------------------------------------------------------- ORG 3;OEM identifierboot03 db 'BootDisk' ;always 8 characters.STACK 2048; removes the stack warning;---------------------------------------------------------------------------------- ORG 0Bhboot0B dw 200h ;bytes per sectorboot0D db 1 ;sectors per clusterboot0E dw 1 ;reserved sectors (the boot sector is reserved)boot10 db 2 ;number of copies of the FATboot11 dw 0E0h ;root directory entries (224 for 1.4 mb)boot13 dw 0B40h ;total disk sectorsboot15 db 0F0h ;media descriptor byte (F0 for 1.4 mb)boot16 dw 9 ;sectors per FATboot18 dw 12h ;sectors per cylinderboot1A dw 2 ;number of headsboot1C dw 0 ;hidden sectors;----------------------------------------------------------------------------------boot1: cli ;disable maskable interrupts xor di,di mov ss,di mov sp,7C00h ;SS:SP = 0000:7C00 sti print_mesg msgboot2: jmp boot2;----------------------------------------------------------------------------------;data area - notice the absence of a ".DATA" directivemsg db "We be bootin2'!"prin