notes for m100smallc-8085

stack on call:
	arg
	arg
	return value

must leave stack this way on entrance
return value in HL

normal C convention is that the caller saves any registers it wants
preserved, I'm going to assume Small-C is the same way.

if we want to support CALL <address>,A,HL we will need a CSTART but I
think for the moment I can get away without one!

(need a cstart that ends with fixpower!)


scc8080 -u hallo.c
make hallo.rel
aslink -n -i -m -b SMALLC_GENERATED=0xF000 -o hallo.ihx hallo.rel -l small.lib 
make hallo.co


ROM calls directly callable: These take no arguements and return
nothing, so don't need wrapper functions.

//LCD control
CRLF()	//print ^M^J
HOME()  //home cursor
CLS()	//clear screen
SETSYS()  //lock line 8
RSTSYS()  //unlock line 8
LOCK()	  //lock screen (no scrolling)
UNLOCK()  //unlock screen (enable scrolling)
CURSON()  //turn on text mode cursor
CUROFF()  //turn off text mode cursor
DELLIN()  //delete current line
INSLIN()  //insert line
ERAEOL()  //erase line from cursor to end of line
ENTREV()  //turn on  reverse video
EXTREV()  //turn off reverse video

DTLINE()  //print day/date/time as it appears on MENU

//function key support
CLRFLK()  //clear function key table
DSPFNK()  //display function keys
ERAFNK()  //erase function key display
FNKSB()   //display function key table if enabled
BK2SK()   //install BASIC function key table

//printer
PRTLCD()  //dump lcd to printer

//serial port
DISC()    //disconnect phone line
CONN()    //connect phone line
SENDCQ()  //send XON (^Q) to serial port
SENDCS()  //send XOFF (^S) to serial port
CLSCOM()  //deactivate rs232/modem

//cassette functions
CTON()   //turn on cassette motor
CTOFF()  //turn off cassette motor
SYNCW()  //write cassette header and sync byte
SYNCR()  //read cassette header and sync byte

//directory support
DIROK()  //sort directory

//other functions
INITIO()  //cold start
IOINIT()  //warm start
BOOT()    //reboot
TDDPT()   //print time on top line of screen
PFRE()    //print number of bytes of free memory

//ROM Apps. NO comming back from these!
MENU()	  //jump to main menu
TXT()    //ROM text editor
BASIC()  //BASIC
TELCOM()  // telcom app
ADDRSS()  //
SCHEDL()  // address/schedule database ROM app

//ROM call wrapper functions:
getc()   //blocking, echoing read 1 char from keyboard
gets()   //line input, returns system input buffer
putc(c)   //write one char to LCD
putd(i)   //write an integer to LCD
puts(s)   //write a string to LCD
