I would like to down convert Dword to Byte so that I can store it to a textfile in readable text by call WriteToFile
. How can I do it?
.386
.model flat, stdcall
INCLUDE Irvine32.inc
.stack 4096
.Data
total DWORD ? ;total is a variable which holding a math calc output
totalTXT BYTE ? ;totalTXT would be the output in String value.
Here is where i try to downcast the conversion
xor eax, eax
mov eax, total
mov totalTXT, al
I need totalTXT in byte so I can store into file as text. But After debugging, my textfile become empty.
WRITE_TO_FILE: ;assume file is successfully opened
mov eax,fileHandle
mov edx, OFFSET totalTXT
mov ecx, LENGTHOF totalTXT
call WriteToFile
call CloseFile