WriteBinB
PROC (Not covered in the 4th
edition)
Writes an unsigned 8, 16, or 32-bit number to
standard output in ASCII binary format.
EBX must contain the TYPE of the number to write
(1 for BYTE, 2 for WORD, or 4 for DWORD)
The binary bits are displayed in groups of 4 for
easy reading.
Call args: AL, AX, or EAX = the number to write.
EBX = 1 to write AL as 8 binary digits,
EBX = 2 to write AX as 16 binary digits,
EBX = 4 to write EAX as 32 binary digits.
Return arg: None
Example:
.data
bValue BYTE 'A'
.code
mov eax,bValue
mov ebx,TYPE bValue
call WriteBinB
Output: 0100 0001
Notes: To write a DWORD, the WriteBin procedure may also be used.| Converted from CHM to HTML with chm2web Pro 2.85 (unicode) |