Home  Articles  Programs 

GOS 95 C64 Operating System Commands Part 1

GOS is an Operating System - BASIC Extension hybrid written for Commodore 64 computers between 1992 and 1995.

GOS features a disk cache, readahead disk buffer, memory manager, memory compression, mouse support, BASIC variable transfer, linking BASIC files and external commands loaded from diskette.

Thanks to its disk cache and track buffer, the external commands are as fast as the internal commands.

Approximately 19 years later I've recovered my GOS diskettes, work diskettes and some of the documentation and transferred them to the modern medium. However, the organization of the material and remembering/reverse-engineering my own code takes time. I'll fill the missing information in time.

As an appetizer, here is a working diskette of GOS:

Download: http://cbm.ficicilar.name.tr/dosya/gos95.zip

Version: 1995.10.14-19:37
Date: October 1995
Programmer: Ilker Ficicilar

I haven't documented all of the commands and features online yet. So, here is the part 1:

GOS 95 Commands:

command: dir
parameters: -
type: internal
definition: Shows directory of the active disk.

command: cat parameters: - type: diskette definition: Shows directory of the active disk.

command: status parameters: - type: diskette definition: Shows the status of the cache, memory, fastID and fastopen.

command: mem parameters: - type: diskette definition: General memory status of the BASIC.

command: drive parameters: {drive no} type: internal definition: Sets the active disk drive number. The drive no is in between 8 and 11.

command: path parameters: {path} type: internal definition: Sets the directory path for external commands.

command: drvset parameters: {on|off},{on|off} type: internal definition: Sets on or off the fastID and fastopen functions respectively.

command: dump parameters: - type: diskette definition: Shows the values of the active BASIC variables.

command: scrollup parameters: - type: diskette definition: Scroll the screen one row up.

command: volume parameters: {0-15} type: diskette definition: Sets the SID volume. It's value is in between 0 and 15.

command: type: parameters: {file name},{drive no} type: diskette definition: Displays the contents of a text file.

command: baspack parameters: - type: diskette definition: Packs the loaded BASIC program to reduce its size in the memory.

command: italic parameters: - type: diskette definition: Converts the screen font into italic font.

command: movie parameters: {file name, without mv0. prefix},{drive no} type: diskette definition: mv0. type animation files are played with this command.

command: cls parameters: [{screen no}] type: internal definition: Clears the screen. Clears the default screen 0 or the screen no given.

command: screen parameters: {screen no} type: internal definition: Displays the given screen number. Screen no 8 is the graphics screen, 0-2 are the text screens.

command: pass parameters: {screen no} type: internal definition: Sets the active screen for output. Example: pass1:cls:print"hello world":screen1 This technique prepares the screen first, then displays it.

command: swap parameters: - type: diskette definition: Swaps screen 0 and 1 in turn. It changes both the screen and active output.

command: flip parameters: - type: diskette definition: It only swaps active output in turn, without changing the display.

command: color parameters: {border and screen color},{font color},{gfx screen colors} type: internal definition: Sets the colors. Graphics screen colors = background*16+foreground color.

command: picput parameters: {file name},{drive no} type: diskette definition: Saves the graphics screen.

command: show parameters: {file name},{drive no} type: diskette definition: Loads and displays the graphics screen.

command: hear parameters: - type: diskette definition: Outputs the digital audio sampled by an ADC digitizer connected to the 2nd Joystick port. Press CTRL-J or fire button of the joystick to stop.

command: dsp parameters: {number of times},{speed} type: diskette definition: Shows the sound waves of the digital audio sampled by an ADC digitizer connected to the 2nd Joystick port.

command: makehi parameters: - type: diskette definition: Converts the normal text screen into Hires graphics screen.

command: makehi parameters: - type: diskette definition: Converts the normal text screen into Hires graphics screen.

command: makelow parameters: - type: diskette definition: Converts the graphics screen into text screen by redefining the character map.

command: key parameters: [{definition},{0-15}] type: diskette definition: Defines the function keys and shows the current definitions. Defines 16 key combinations in total.

command: del parameters: {line numbers} type: diskette definition: Deletes the given line numbers in a BASIC program. Example: del130-180

command: renum parameters: {first line number},{increase} type: diskette definition: Renumbers the line numbers of a BASIC program.

command: erase parameters: - type: internal definition: Clears the cache memory.

command: reset parameters: - type: internal definition: Resets to initial configuration; without erasing memory.

command: cset parameters: {0|1} type: internal definition: Sets the character set. 0=Capital letters, 1=Lower case letters.

command: block parameters: {C|M|T}{X1},{Y1},{X2},{Y2},{X3},{Y3} type: diskette definition: Copies (C), moves (M) or transfers (T) a block defined by X1,Y1,X2,Y2 in the text screen to X3,Y3.

command: fill parameters: {S}{X1},{Y1},{X2},{Y2},{Char} type: diskette definition: Fills the area defined by X1,Y1,X2,Y2 in the text screen with {Char} character.

command: dot parameters: {X1},{Y1},{0|1} type: diskette definition: Sets or clears a pixel in the graphics screen.

command: locate parameters: {X1},{Y1} type: internal definition: Sets the cursor coordinate in the text screen.

***

GOS System Registers and Vectors

IV1: $19,$1A
IV2: $1B,$1C
IV3: $1D,$1E
IV4: $A3,$A4
IV5: $C3,$C4
IV6: $FB,$FC
IV7: $FD,$FE
PR1: $1F
PR2: $20
PR3: $21
PR4: $02
PR5: $97
PR6: $D7
PR7: $FF
DR: $14,$15
DR1: $14
DR2: $15
FAC: $61-$65
ARG: $69-$6D
SGF: $66
SGA: $6E
SGC: $6F
OVF: $68
RD: $70

IV: Indirect Vector PR: Pseudo Register DR: Decimal Register FAC: Floating Point Accumulator ARG: Floating Point Argument SGF: FAC's sign SGA: ARG's sign SGC: The result of compared signs OVF: Overflow bit of FAC F: FAC's Registers A: ARG's Registers

***

Short Memory Map

$0401-     : BASIC area.
$CC00-$CFE7: Text screen.
$E000-$FF3F: Graphics screen.
$C000-$CBFF: Transient command area.
$6000-$6FFF: ML Monitor.
$7000-$9FFF: GOS

***

The work diskette includes additional fonts and example simple animation files.

Also, other than the listed above, there are more commands in the work-diskette, including commands for training and using artificial neural networks.

They will be covered in Part-2, together with the memory map.

İlker Fıçıcılar
29.07.2014

Keywords: GOS, Commodore 64, Operating System


C64 Projects Twitter Page

İlker Fıçıcılar's CBM Page