Apple IIGS GSOS 6.0.1 source

Programming the 6502 microprocessor and its relatives in assembly and other languages.
Post Reply
handyandy
Posts: 113
Joined: 14 Sep 2015
Location: Virginia USA

Apple IIGS GSOS 6.0.1 source

Post by handyandy »

At the request of someone from another family of 6502-based computers (Atari) with a retro-fitted 65816 hardware enhancement, I searched for and found the source for the 16 bit operating system GSOS for the Apple IIGS:

https://archive.org/details/GSOS_6.0.1_source

If nothing else, it's a good resource for writing code for the 65816 in assembly language.

Cheers,
Andy
User avatar
BigEd
Posts: 11464
Joined: 11 Dec 2008
Location: England
Contact:

Re: Apple IIGS GSOS 6.0.1 source

Post by BigEd »

Oh yes, always good to see a big chunk of solid code. Here's a snippet from HS.FST.src indicating both a calling convention and a documentation convention:
Quote:

Code: Select all

******************************************************************************
*
*	 Name:	Appl_call
*
* Description:	Entry point for	all application	calls.	Called by GS/OS	only.
*		Validates call before passing control to call handler.
*
*     Created:	Oct 6, 1987
*    Modified:	Mar 5, 1991
*      Author:	Bryan Atsatt
*
*	Entry:	jml
*
*	Input:	A = undefined
*		X = call number	times 2
*		Y = class number times 2
*		P = nvmxdizc
*		    ..000...
*
*      Output:	A = error code if carry	set
*		X = undefined
*		Y = undefined
*		P = nvmxdizc
*		    ..000..1 = error
*			   0 = no error
*
*	 Exit:	jml sys_exit
*
*	 Uses:	Everything!
*
******************************************************************************
and a simpler example:
Quote:

Code: Select all

******************************************************************************
*
*	 Name:	add_separator
*
* Description:	This routine will insert a class 0 or 1	separator at the
*		beginning of the gstring pointed to by X and Y.
*
*     Created:	Nov 6, 1987
*    Modified:	Nov 6, 1987
*      Author:	Bryan Atsatt
*
*	Entry:	jsr
*
*	Input:	A = undefined
*		X = low	byte of	pointer	to gstring
*		Y = high byte of pointer to gstring
*		P = nvmxdizc
*		    ..000...
*		B = K
*
*		class			;class of call.
*
*      Output:	A = undefined
*		X = undefined
*		Y = undefined
*		P = nvmxdizc
*		    ..000...
*		B = K
*
*	 Exit:	rts
*
*	 Uses:	all registers
*		input_string
*		length
*
******************************************************************************
Post Reply