WinAsm Studio, The Assembly IDE - Free Downloads, Source Code
Sponsors
Articles
Programming Quick Start
32-bit Assembler is Easy
Porting Iczelion tutorials
What is FASM
Hard Drive Recovery
Wiring your own LAN
Personal menu
Welcome Guest
User:
Pass:
Register!
Resend Validation Email
 
Forum
 

error A2108: use of register assumed to ERROR, I am converting some goasm code to masm and I am having some difficulties.

Slider
Quote Post


Extremely Active Member
******

Group: Moderators
Posts: 287
Member No.: 5004
Joined: 11-May 07


I am converting some goasm code to masm and I am having some difficulties.

I tried using ASSUME fs:NOTHING, but that did not help.

The instructions that I am using are what Ollydbg and IDA are showing.

Can someone help?

Thanks.

# ;FS PUSH ; )stack
push dword ptr fs:[0] ; line 71 error A2108: use of register assumed
to ERROR

;FS MOV
# ,ESP ;point to structure just established on the stack
mov dword ptr fs:[0],esp ; line 74 error A2108: use of register
assumed to ERROR
;
;*********************** and now lets cause the exception ..

XOR ECX,ECX ;set ecx to zero
DIV ECX ;divide by zero, causing exception

;*********************** because of the exception the code never gets
to here

SAFE_PLACE: ;but the handler will jump to here ..

;FS POP
# ;restore original exception handler from stack
pop dword ptr fs:[0] ; line 86 error A2108: use of register assumed
to ERROR
PMEmail Poster
Top
JimG
Quote Post


Extremely Active Member
******

Group: Moderators
Posts: 725
Member No.: 11
Joined: 16-May 04


I don't see it in your code, but that particular error is almost always caused by a missing .code statement after adding some .data
PMEmail Poster
Top
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:

Topic Options Reply to this topicStart new topicStart Poll

 

Sponsors
Computer Science

Internet
C/C++
Hardware & PC maintenance

HiEditor

General Discussions
Suggestions/Bug Reports
WinAsm Studio

General Discussions
Suggestions/Bug Reports
WinAsm Studio FAQ
Multilingual User Interface
Add-Ins
Assembly Programming

Main
Newbies
Projects
Custom Controls
Snippets
Announcements & Rules

Announcements

General

Online Degrees - Distance Learning
The Heap
Russian
Google