Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Nov 21st, 2005, 9:43 AM   #1
rsnd
Hobbyist Programmer
 
rsnd's Avatar
 
Join Date: Jun 2005
Location: Helltown
Posts: 162
Rep Power: 4 rsnd is on a distinguished road
yet another masm compilation error

whats wrong in he followin lines.
	ja Label401061
	cmp eax , 0C000008Dh
	jb Label401080

Label401025:; < line 43
	mov esi , 01h

Label40102a ::
	mov  dword ptr [ esp ] , 08h
	xor eax , eax
	mov  dword ptr [ esp + 4 ] , eax
	call Fun4163b0
I get the following error:
kaillerasrv.txt(43) : error A2108: use of register assumed to ERROR
kaillerasrv.txt(46) : error A2108: use of register assumed to ERROR

Thanks in advance
__________________
Spread your wings and fly! Chicken!
rsnd is offline   Reply With Quote
Old Nov 21st, 2005, 10:09 AM   #2
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
I may be wrong, but in the assemblers I've used, labels are defined as follows:
.MyLabel
By the way, try using descriptive names for your labels, as opposed to seemingly-random numbers.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Nov 21st, 2005, 10:15 AM   #3
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Many assemblers also use the

Label:

approach. Not seeing line numbers isn't a huge help to potential respondents. Have you actually checked your documentation to see what A2108 has to say about itself?

EDIT: Ahhhh, my curiosity is going to kill either me or my cat.
Quote:
The "ASSUME register:ERROR" syntax causes the assembler to
generate an error if <register> is later used explictly or
implicitly. The OPATTR, .TYPE, and TYPE directives do not cause
errors when referring to registers assumed to ERROR.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Nov 21st, 2005, 6:24 PM   #4
rsnd
Hobbyist Programmer
 
rsnd's Avatar
 
Join Date: Jun 2005
Location: Helltown
Posts: 162
Rep Power: 4 rsnd is on a distinguished road
hehe...It better be your cat DaWei

How do i fix it?? I tried ASSUME register:NOTHING with all the registers and it doesnot work

*masm detects .MyLabel as being a syntax error.
__________________
Spread your wings and fly! Chicken!
rsnd is offline   Reply With Quote
Old Nov 21st, 2005, 6:44 PM   #5
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
I'm not really up to speed on this, rsnd. Why don't you zip your file and attach it to a post (or, post it directly if it's not too large). I'll clobber the cat with it and see what meows. If Lostcauz happens to peep in, his crystal ball will handle it, no doubt.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Nov 21st, 2005, 7:36 PM   #6
lostcauz
Hobbyist Programmer
 
Join Date: Nov 2004
Location: 1691 miles East of L.A.
Posts: 159
Rep Power: 4 lostcauz is on a distinguished road
The crystal ball tells me the code in question is missing the .code section.
__________________
-- lostcauz

Stepped in what?...
Behind whose barn?...
I didn't even know they had a cow!
lostcauz is offline   Reply With Quote
Old Nov 21st, 2005, 7:39 PM   #7
Scorpions4ever
Programmer
 
Join Date: Jun 2005
Posts: 86
Rep Power: 4 Scorpions4ever is on a distinguished road
Try:
mov esi , 00000001h
instead of:
mov esi , 01h

and also:
mov dword ptr [ esp ] , 00000008h
instead of:
mov dword ptr [ esp ] , 08h
Scorpions4ever is offline   Reply With Quote
Old Nov 21st, 2005, 7:40 PM   #8
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
LOL. Some balls, Randy.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Nov 21st, 2005, 8:11 PM   #9
rsnd
Hobbyist Programmer
 
rsnd's Avatar
 
Join Date: Jun 2005
Location: Helltown
Posts: 162
Rep Power: 4 rsnd is on a distinguished road
Quote:
Originally Posted by lostcauz
The crystal ball tells me the code in question is missing the .code section.
lol...ur from masmforums

anyways...the mesage is...never use non-commercial decompilers.

NOW!!! What processor mode do I need for the insturction "fucomip" to work? This is driving me nutz.
__________________
Spread your wings and fly! Chicken!
rsnd is offline   Reply With Quote
Old Nov 21st, 2005, 8:13 PM   #10
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
"fucomip" -- maybe it depends on how you pronounce that....
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 12:52 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC