[Prev] [Next] [Contents] [Commodore] [New] [Search] [Home]

B.20. Function Name: RAMTAS

Purpose: Purpose: Perform RAM test
Call address: Call address: $FF87 (hex) 65415 (decimal)
Communication registers: Communication registers: A, X, Y
Preparatory routines: Preparatory routines: None
Error returns: Error returns: None
Stack requirements: Stack requirements: 2
Registers affected: Registers affected: A, X, Y

Description: This routine is used to test RAM and set the top and bottom of memory pointers accordingly. It also clears locations $0000 to $0101 and $0200 to $03FF. It also allocates the cassette buffer, and sets the screen base to $0400. Normally, this routine is called as part of the initialization process of a Commodore 64 program cartridge.

EXAMPLE:

   JSR RAMTAS

B-21. Function Name: RDTIM

Purpose: Read system clock
Call address: $FFDE (hex) 65502 (decimal)
Communication registers: A, X, Y
Preparatory routines: None
Error returns: None
Stack requirements: 2
Registers affected: A, X, Y

Description: This routine is used to read the system clock. The clock's resolution is a 60th of a second. Three bytes are returned by the routine. The accumulator contains the most significant byte, the X index register contains the next most significant byte, and the Y index register contains the least significant byte.

EXAMPLE:

   JSR RDTIM
   STY TIME
   STX TIME+1
   STA TIME+2
   ...
   TIME *=*+3

[Prev] [Next] [Contents] [Commodore] [New] [Search] [Home]
This page has been created by Sami Rautiainen.
Read the small print. Last updated December 17, 2002.