[comp.sys.atari.st] AUXOUT.TOS

WILDDJ@VAXB.ASTON.AC.UK (05/12/89)

Here is the source code (assembler) and UUEncoded form of a program I've
written called AUXOUT.TOS which redirects _all_ TOS output to the RS232
port. Hope it is of some use to some of you out there!

- David

-------------------8<---------Cut-Here------------------------------------


; AUXOUT.TOS
; ==========

; Written by David Wild, 62 Lascelles Avenue, Withernsea,
; North Humberside, HU19 2EB
; JANET EMAIL to WILDDJ@UK.AC.ASTON.VAXB

; This is a dirty routine that redirects all screen text output to the
; RS232 port. It works by setting the con_state system variable to
; point to the BIOS routine to send a character to the AUX port.
; The auxout routine vector address was found from the BIOS listing
; in Atari ST internals.
; To test the program out, run it, then try double clicking on a non
; program file & showing it - it should be sent to AUX.


supexec 	equ	38		; XBIOS supexec call
con_state	equ	$4a8		; con_state sys. variable
auxout		equ	$FC08E4		; contents point to auxout

		; Install new vector

		move.l #install,-(sp)
		move.w #supexec,-(sp)	; Execute install routine
		trap #14		; in supervisor mode
		addq.l #8,sp
		clr.w -(sp)
		trap #1			; Exit

install		move.l auxout,con_state	; Make con_state point to
		rts			; auxout
-------------------8<---------Cut-Here------------------------------------

The UUEncoded version of AUXOUT.TOS....

-------------------8<---------Cut-Here------------------------------------
table
 !"#$%&'()*+,-./0123456789:;<=>?
@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]N_
begin 644 AUXOUT.TOS
M8!H    >                             "\\    $C\\ "9.3E"/0F=.a
202/Y /P(Y   !*A.=0    ( a
 a
end
-------------------8<---------Cut-Here------------------------------------

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
                     ! JANET   wilddj@uk.ac.aston.vaxb                         !
***      *  *     *  ! BITNET  wilddj@vaxb.aston.ac.uk                         !
*  *     *  *  *  *  ! ARPA    wilddj%vaxb.aston.ac.uk@cunyvm.cuny.edu         !
*  *     *  *  *  *  ! UUCP   ...psuvax1!cunyvm.bitnet!vaxb.aston.ac.uk!wilddj !
*  * *   *  *  *  *  !---------------------------------------------------------+
***   ***    ** **   ! Home Address: 62 Lascelles Avenue, Withernsea, North    !
                     !               Humberside, HU19 2EB, England             !
   David J  Wild     ! University  : Dept of Computer Science,                 !
                     !               Aston University, Birmingham, England     !
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-

WILDDJ@VAXB.ASTON.AC.UK (05/17/89)

Kristian Rosenvold writes

>Something tells me your defined AUXOUT variable in auxout.tos fails quite
>miserably on for instance the TOS 1.4 roms !?
>(I haven't tried it, but I will...)

>Is there noe legal way to do a force redirect of everything to AUX: ?

>Kristian Rosenvold, jkr@ifi.uio.no

(sorry to post this to the net, but I can't get mail back to you for some
 reason)

Hmmm, yes, AUXOUT is a bit dodgy. It should work with
all _existing_ versions of TOS, since this location actually contains a
vector to the actual location, so there is a means for changing the address
of the routine without changing AUXOUT. However, I don't know about TOS
1.4.

I think this is the only effective way of doing it. The trouble with FORCE
is that it dosen't work on all output - functions like bconout would still
output to the screen, causing a bit of a mess. In fact, I think the only
functions that are affected by FORCE are READ and WRITE.

Please let me know if I'm wrong or you have any other ideas

Dave

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
                     ! JANET   wilddj@uk.ac.aston.vaxb                         !
***      *  *     *  ! BITNET  wilddj@vaxb.aston.ac.uk                         !
*  *     *  *  *  *  ! ARPA    wilddj%vaxb.aston.ac.uk@cunyvm.cuny.edu         !
*  *     *  *  *  *  ! UUCP   ...psuvax1!cunyvm.bitnet!vaxb.aston.ac.uk!wilddj !
*  * *   *  *  *  *  !---------------------------------------------------------+
***   ***    ** **   ! Home Address: 62 Lascelles Avenue, Withernsea, North    !
                     !               Humberside, HU19 2EB, England             !
   David J  Wild     ! University  : Dept of Computer Science,                 !
                     !               Aston University, Birmingham, England     !
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-