6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Thu Nov 14, 2024 2:03 am

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Sat May 23, 2020 11:53 am 
Offline

Joined: Mon Sep 14, 2015 8:50 pm
Posts: 112
Location: Virginia USA
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


Top
 Profile  
Reply with quote  
PostPosted: Sat May 23, 2020 12:22 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10977
Location: England
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:
******************************************************************************
*
*    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:
******************************************************************************
*
*    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
*
******************************************************************************


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: