stdout.txt

来自「汇编编程艺术」· 文本 代码 · 共 890 行 · 第 1/3 页

TXT
890
字号
Register on entry:    AL 

Register on return:   AL

Flags affected:       None

Example of Usage:
                      mov     al, 1fh
                      puth


Description:    The Puth routine Prints the value in the AL register as two
                hexadecimal digits.  If the value in AL is between 0 and 0Fh, 
                puth will print a leading zero.  This routine calls the stdlib
                standard output routine (putc) to print all characters.


Include:        stdlib.a or stdout.a



Routine:  Putw
--------------

Category:             Character Output Routine

Registers on Entry:   AX- Value to print

Registers on Return:  None

Flags Affected:       None

Example of Usage: 
                      mov AX, 0f1fh
                      putw


Description:  The Putw routine prints the value in the AX register as four
              hexadecimal digits (including leading zeros if necessary).  
              This routine calls the stdlib standard output routine (putc) 
              to print all characters.

Include:        stdlib.a or stdout.a



Routine:  Puti
--------------

Category:             Character Output Routine

Registers on Entry:   AX- Value to print

Registers on Return:  None

Flags Affected:       None

Example of Usage: 
                      mov AX, -1234
                      puti


Description:  Puti prints the value in the AX register as a decimal integer.
              This routine uses the exact number of screen positions required
	      to print the number (including a position for the minus sign, if
              the number is negative).  This routine calls the stdlib standard
              output routine (putc) to print all characters.


Include:        stdlib.a or stdout.a



Routine:  Putu
--------------

Category:             Character Output Routine

Register on entry:    AX- Unsigned value to print.

Register on return:   None

Flags affected:       None

Example of Usage:
                      mov     ax, 1234
                      putu


Description:  Putu prints the value in the AX register as an unsigned integer.
              This routine uses the exact number of screen positions required
              to print the number.  This routine calls the stdlib standard
              output routine (putc) to print all characters.


Include:        stdlib.a or stdout.a




Routine:  Putl
--------------

Category:            Character Output Routine

Register on entry:   DX:AX- Value to print

Register on return:  None

Flags affected:      None

Example of Usage:
                     mov     dx, 0ffffh
                     mov     ax, -1234
                     putl


Description:   Putl prints the value in the DX:AX registers as an integer.
               This routine uses the exact number of screen positions
               required to print the number (including a position for the
               minus sign, if the number is negative).  This routine calls
               the stdlib standard output routine (putc) to print all
               characters.


Include:        stdlib.a or stdout.a



Routine:  Putul
---------------

Category:             Character Output Routine

Register on entry:    DX:AX register

Register on return:   None

Flags affected:       None

Example of Usage:
                      mov     dx, 12h
                      mov     ax, 1234
                      putul


Description:    Putul prints the value in the DX:AX registers as an unsigned
                integer.  This routine uses the exact number of screen
                positions required to print the number.  This routine calls 
		the stdlib standard output routine (putc) to print all
		characters.


Include:        stdlib.a or stdout.a


Routine:  PutISize
------------------

Category:              Character Output Routine

Registers on Entry:    AX - Integer value to print
                       CX - Minimum number of print positions to use

Registers on return:   None

Flags affected:

Example of Usage:
                       mov     cx, 5
                       mov     ax, I
                       PutISize
                           .
                           . 
                           .
                       mov     cx, 12
                       mov     ax, J
                       PutISize


Description:    PutISize prints the signed integer value in AX to the
                stdlib standard output device using a minimum of n print
                positions.  CX contains n, the minimum field width for the
                output value.  The number (including any necessary minus sign)
		is printed right justified in the output field.
                If the number in AX requires more print positions than
                specified by CX, PutISize uses however many print positions
                are necessary to actually print the number.  If you specify
                zero in CX, PutISize uses the minimum number of print positions
                required.  Of course, PutI will also use the minimum number
                of print positions without disturbing the value in the CX
                register.

                Note that, under no circumstances, will the number in AX
                ever require more than 6 print positions (-32,767 requires
                the most print positions).


Include:        stdlib.a or stdout.a



Routine:  PutUSize
------------------

Category:              Character Output Routine

Registers on entry:    AX- Value to print
		       CX- Minimum field width

Registers on return:   None

Flags affected:        None

Example of usage: 
                       mov     cx, 8
                       mov     ax, U
                       PutUSize


Description:  PutUSize prints the value in AX as an unsigned decimal integer.
              The minimum field width specified by the value in CX.
              Like PutISize above except this one prints unsigned values.  
              Note that the maximum number of print positions required by any 
	      number (e.g., 65,535) is five.


Include:        stdlib.a or stdout.a



Routine:  PutLSize
------------------

Category:            Character Output Routine

Register on entry:   DX:AX-32 bit value to print
		     CX- Minimum field width

Register on return:  None

Flags affected:      None

Example of Usage:
		     mov     cx, 16
                     mov     dx, word ptr L+2
                     mov     ax, word ptr L
                     PutLSize


Description:   PutLSize is similar to PutISize, except this prints the long 
               integer value in DX:AX.  Note that there may be as many as 
               11 print positions (e.g., -1,000,000,000).

Include:        stdlib.a or stdout.a




Routine:  PutULSize
-------------------


Category:            Character Output Routine


Register on entry:   AX : DX and CX


Register on return:  None


Flags affected:      None


Example of usage:    mov     cx, 8
                     mov     dx, word ptr UL+2
                     mov     ax, word ptr UL
                     PutULSize


Description:  Prints the value in DX:AX as a long unsigned decimal integer.
              Prints the number in a minimum field width specified by the
              value in CX.  Just like PutLSize above except this one prints
	      unsigned numbers rather than signed long integers.  The largest
              field width for such a value is 10 print positions.


Include:        stdlib.a or stdout.a


Routine:   Print
----------------

Category:             Character Output Routine

Register on entry:    CS:RET - Return address points at the string to print.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?