Microsoft KB Archive/32198

BYTE_TO_DEC Macro from Programmer’s Reference Manual ID Number: Q32198

3.20 3.30 MS-DOS docerr

Summary: The macro BYTE_TO_DEC was omitted from the “MS-DOS Version 3.3 Programmer’s Reference.” It is a macro that is referred to in many system services, but was never defined. The following is a version of the macro; it should be added to the “GENERAL” macro section, at the end of Chapter 1, “System Calls.”


 * BYTE_TO_DEC macro reg,string push ax push bx push dx push si xor ax,ax mov al,reg mov bx,offset string mov si,10 div si add dx,‘0’ add ax,‘0’ mov [bx],ax inc bx mov [bx],dx pop si pop dx pop bx pop ax endm ;