Everything

PUTC


Outputs 1 byte to standard output.

[Function Code (R1 Register)]

[Parameter Block (R2 Register)]

[Parameters]

Parameter

Description

Beginning address of output buffer (input)

Beginning address of the output buffer that contains output data

[Detailed Description]

-

Outputs 1 byte to standard output.

[Example]

_charput:
        MOV.L       #IO_BUF,R2      ; Set the address of the output buffer in R2.
        MOV.B       R1,[R2]         ; Set the value of R1 (output character) in the 
                                    ; output buffer.
        MOV.L       #1220000h,R1    ; Set the function code of PUTC in R1.
        MOV.L       #PARM,R3        ; Set the address of the parameter block in R3.
        MOV.L       R2,[R3]         ; Set the address of the output buffer in the 
                                    ; output buffer.
        MOV.L       R3,R2           ; Set the value of R3 (address of the parameter 
                                    ; block) in R2.
        MOV.L       #SIM_IO,R3      ; Set the address of the system call in R3.
        JSR         R3              ; System call
        RTS                         ; Return to the address where the function was 
                                    ; called.
 
         .SECTION  B,DATA,ALIGN=4
PARM:       .BLKL   1               ; Parameter block area
         .SECTION  B_1,DATA
IO_BUF:     .BLKL   1               ; Input/output buffer