Heres the code:


_TEXT SEGMENT
PutChar PROC PUBLIC schar:PTR DWORD, flags:PTR DWORD
align 4
mov eax,_schar$[esp]
mov esi,CHR.Font[eax]
mov edi,CHR.WriteBuffer[eax]
shl DWORD PTR CHR.Char[eax],6
add esi,CHR.Char[eax]
add edi,4

mov ebx,0A00h
mov edx,8
yloop:
mov ecx,8
xloop:
[COLOR=red] mov al,[esi]
movsx eax,al[/COLOR]
mov [edi+ebx],eax
add esi,1
add edi,4
dec ecx
jnz xloop

add ebx,9E0h
dec edx
jnz yloop

ret fix$
PutChar endp
_TEXT ENDS

According to opcodes.hlp there is a movsz r,m8 version. mov eax, wont work. So how do I make a memory operand the souce?

Thanks.
Posted on 2003-01-28 10:08:24 by ThoughtCriminal
of course wont work, it's an invalid adressing mode.
movsx eax, byte ptr
movsx eax, byte ptr ; "byte ptr" not needed if myvariable is known and byte-sized.
Posted on 2003-01-28 10:17:57 by f0dder

of course wont work, it's an invalid adressing mode.


Yeah, figured that out after I tried it.

movsx eax, byte ptr

Works perfectly. Now I understand what the error meant about needing a base or index reg.

Thanks.
Posted on 2003-01-28 10:42:43 by ThoughtCriminal
I want to know More about this (Below). And this topic.

> Is it able if we made a program (using a Hexeditor) start at org 100 but using 32-Bit Opcode?.
Example:
org 100 ;
xor eax,eax; 32- Bit
mov eax,900h ; 32-Bit
int 21h ;



Am Courios.
_________________________________________________________
WeaponStorageOur WeaponStorage
Posted on 2003-02-09 09:14:20 by realvampire