|
-
Oct 15th, 2002, 02:43 AM
#1
Thread Starter
Hyperactive Member
TASM Error
Hi 
I am learning and i am getting an "Illegal Instruction Error" from TASM compiler. What does it mean?
Code:
text segment
assume CS:text,DS:data
VirtualReplace proc ptrString ;pass parameters
;looping...
mov SI,0
mov CX,2
scroll: ;we are scrolling
inc SI ;increase counter...
mov ptrString[SI], 30
loop scroll
endp
begin:
mov AX,data ;create data segment
mov DS,AX ;move AX to DX
;This is where the error happends
VirtualReplace ptr offset hello
mov AH,09h ;screen output
lea DX,hello ;move output
int 21h ;call dos
mov AH,4Ch ;finished!
mov AL,0 ;code 0 - success
int 21h ;call dos
text ends
data segment
symbols db 233 dup('*')
crlf db 10,13,'$'
hello db 'hi!$'
data ends
stk segment stack
db 256 dup (0)
stk ends
end begin
-
Oct 15th, 2002, 04:45 AM
#2
Can you call a function this way in TASM?
Usually you push the arguments on the stack, then do a 'call'.
MASM has the 'Invoke' high command to make things a little easier.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Oct 15th, 2002, 05:35 AM
#3
Thread Starter
Hyperactive Member
Thanks for your reply 
You can call macro's this way, i dont know abut functions.
I'l try the push method
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|