home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga MA Magazine 1997 #3
/
amigamamagazinepolishissue03-1
/
polski_aminet
/
michal_letowski
/
debuglib
/
src
/
kputchar.a
< prev
next >
Wrap
Text File
|
1996-05-11
|
1KB
|
68 lines
; kputchar.a - KPutChar implementation using ROM routines
; $VER: kputchar.a 37.1 (10.5.96)
; Copyright © 1996 Michael Letowski
;
; 37.1 (10.5.96) - initial version
include "exec/funcdef.i"
include "exec/exec_lib.i"
xdef _KPutChar
xdef @KPutChar
; Some aliases
xdef _kputc
xdef @kputc
xdef KPutChar
section text,code
******* debug.lib/KPutChar **************************************************
*
* NAME
* KPutChar -- put a character to the debugging console. (V37)
*
* SYNOPSIS
* char = KPutChar(char)
* D0 D0
*
* LONG KPutChar(LONG);
*
* FUNCTION
* Puts a character to the debugging console (defaults to the serial
* port at 9600 baud). This function will not return until the
* character has been completely transmitted.
*
* INPUTS
* char - a char to be outputted.
*
* RESULT
* char - a character that was outputted.
*
* NOTES
* @KPutChar, @kputc and KPutChar are identical assembly interfaces that
* expect character in D0 register. _KPutChar, _kputc are the C
* interfaces that expect a character to be a longword on stack.
*
*****************************************************************************
*
* _KPutChar(char)
* @KPutChar(R_D0 char)
*
_KPutChar:
_kputc:
move.l 4(sp),d0
@KPutChar:
@kputc:
KPutChar:
move.l a6,-(sp)
move.l (4).w,a6
jsr _LVORawPutChar(a6)
move.l (sp)+,a6
rts
end