This the multi-page printable view of this section.Click here to print.

Return to the regular view of this page.

BeebASM

Files for the BeebASM assembler

Table of Contents

1 - api

Generated file for beebasm
; *************************************************************************** ; API for Commodore C64 Kernal ; Notes about the C64 operating system & memory ; Author: Peter Mount, Area51.dev & Contributors ; ; URL: https://area51.dev/c64/kernal/ ; ; Modified: Sun, 23 Jan 2022 17:05:58 UTC ; ; Current version: https://area51.dev/c64/kernal/reference/include/beebasm/api.asm ; *************************************************************************** ACPTR = &FFA5 ; Get data from the serial bus CHKIN = &FFC6 ; Open channel for input CHKOUT = &FFC9 ; Open channel for output CHRIN = &FFCF ; Get a character from the input channel CHROUT = &FFD2 ; Output a character CINT = &FF81 ; Initialise screen editor CIOUT = &FFA8 ; Transmit a byte over the serial bus CLALL = &FFE7 ; Close all open files CLOSE = &FFC3 ; Close a logical file CLRCHN = &FFCC ; Clear I/O channels CLRLN = &E9FF ; Clear the line X CLSR = &E544 ; Clear the screen GETIN = &FFE4 ; Get a character IOBASE = &FFF3 ; Define I/O memory page IOINIT = &FF84 ; Initialise I/O Devices LISTEN = &FFB1 ; Command a device on serial bus to LISTEN LOAD = &FFD5 ; Load memory from a device MEMBOT = &FF9C ; Set bottom of memory MEMTOP = &FF99 ; Set top of memory OPEN = &FFC0 ; Open a logical file PLOT = &FFF0 ; Set cursor location RAMTAS = &FF87 ; Perform RAM test RDTIM = &FFDE ; Read system clock READST = &FFB7 ; Read status word RESTOR = &FF8A ; Restore default system & interrup vectors SAVE = &FFD8 ; Save memory to a device SCNKEY = &FF9F ; Scan the keyboard SCREEN = &FFED ; Return screen format SECOND = &FF93 ; Send secondary address for LISTEN SETLFS = &FFBA ; Setup a logical file SETMSG = &FF90 ; Control system message output SETNAM = &FFBD ; Set file name SETTIM = &FFDB ; Set system clock SETTMO = &FFA2 ; Set IEEE bus card timeout STOP = &FFE1 ; Check if key/stop key is pressed TALK = &FFB4 ; Command a device on serial bus to TALK TKSA = &FF96 ; Send secondary address to a device commanded to TALK UDTIM = &FFEA ; Update system clock UNLISTEN = &FFAE ; Send an UNLISTEN command UNTLK = &FFAB ; Send an UNTALK command VECTOR = &FF8D ; Manage RAM Vectors

2 - headers

Generated file for beebasm
; *************************************************************************** ; Headers for Commodore C64 Kernal ; Notes about the C64 operating system & memory ; Author: Peter Mount, Area51.dev & Contributors ; ; URL: https://area51.dev/c64/kernal/ ; ; Modified: Sun, 23 Jan 2022 17:05:58 UTC ; ; Current version: https://area51.dev/c64/kernal/reference/include/beebasm/headers.asm ; *************************************************************************** ; C64 Zero Page D6510 = &0 ; 6510 On-Chip I/O DATA Direction Register R6510 = &1 ; 6510 On-Chip I/O Port ADRAY1 = &3 ; Vector to routine to convert Number from Floating Point to Signed Integer ADRAY2 = &5 ; Vector to routine to convert Number from Integer to Floating Point VERCK = &A ; Flag: LOAD or VERIFY TXTTAB = &2B ; Pointer to start of BASIC program text VARTAB = &2D ; Pointer to start of BASIC Variable storage area ARYTAB = &2F ; Pointer to start of array variable area STREND = &31 ; End of Basic array storage (+1), Start of free ram FRETOP = &33 ; Pointer to bottom of string text area FRESPC = &35 ; Temp pointer for strings BASMEMSIZ = &37 ; Highest address used by basic BLNSW = &CC ; Cursor Blink Enable RIBUF = &F7 ; RS232 Input Buffer Pointer ROBUF = &F9 ; RS232 Output Buffer Pointer FREKZP = &FB ; 4 free bytes of Zero Page for User Programs BASZPT = &FF ; BASIC temp data area for floating point to ASCII conversion ; C64 Page 2 BUF = &200 ; BASIC Line Editor Input Buffer LAT = &259 ; Active logical file number table FAT = &263 ; Device number for each logical file SAT = &26D ; Secondary address for each logical file KEYD = &277 ; Keyboard buffer MEMSTR = &281 ; Start of Memory pointer MEMSIZ = &283 ; End of Memory pointer COLOR = &286 ; Current Foreground text colour GDCOL = &287 ; Colour of character under Cursor HIBASE = &288 ; Page of Screen Memory XMAX = &289 ; Max length of keyboard buffer RPTFLG = &28A ; Which keys will repeat SHFLAG = &28D ; Shift/Ctrl/Commodore key pressed LSTSHF = &28E ; Last value of Shift/Ctrl/Commodore key pressed MODE = &291 ; Shift/Commodore switch AUTODN = &292 ; Screen scrolling enabled M51CTR = &293 ; Mock 6551 RS-232 Control Register M51CDR = &294 ; Mock 6551 RS-232 Command Register M51AJB = &295 ; Mock 6551 RS-232 Nonstandard Bit Timing M51STAT = &297 ; Mock 6551 RS-232 Status Register RIDBE = &29B ; RS-232 Index to end of receive buffer RIDBS = &29C ; RS-232 Index to start of receive buffer RODBE = &29D ; RS-232 Index to end of transmit buffer RODBS = &29E ; RS-232 Index to start of transmit buffer ENABL = &2A1 ; RS-232 Interrupts Enabled ; C64 Page 3 Vectors & Cassette Buffer USRPOK = &310 ; Jump instruction for BASIC USR() function USRADD = &311 ; Address of USR() function CINV = &314 ; IRQ Interrupt Routine Vector CBNV = &316 ; BRK Interrupt Routine Vector NMINV = &318 ; NMI Interrupt Routine Vector IOPEN = &31A ; Kernal OPEN Vector ICLOSE = &31C ; Kernal close Vector ICHKIN = &31E ; Kernal CHKIN Vector ICKOUT = &320 ; Kernal CKOUT Vector ICLRCH = &322 ; Kernal CLRCHN Vector IBASIN = &324 ; Kernal CHRIN Vector IBSOUT = &326 ; Kernal CHROUT Vector ISTOP = &328 ; Kernal STOP Vector IGETIN = &32A ; Kernal GETIN Vector ICLALL = &32C ; Kernal CLALL Vector USRCMD = &32E ; User-Defined Command Vector ILOAD = &330 ; Kernal LOAD Vector ISAVE = &332 ; Kernal SAVE Vector TBUFFR = &33C ; Cassette I/O Buffer ; VIC-II Registers VIC2M0X = &D000 ; X Coordinate Sprite 0 VIC2M0Y = &D001 ; Y Coordinate Sprite 0 VIC2M1X = &D002 ; X Coordinate Sprite 1 VIC2M1Y = &D003 ; Y Coordinate Sprite 1 VIC2M2X = &D004 ; X Coordinate Sprite 2 VIC2M2Y = &D005 ; Y Coordinate Sprite 2 VIC2M3X = &D006 ; X Coordinate Sprite 3 VIC2M3Y = &D007 ; Y Coordinate Sprite 3 VIC2M4X = &D008 ; X Coordinate Sprite 4 VIC2M4Y = &D009 ; Y Coordinate Sprite 4 VIC2M5X = &D00A ; X Coordinate Sprite 5 VIC2M5Y = &D05B ; Y Coordinate Sprite 5 VIC2M6X = &D00C ; X Coordinate Sprite 6 VIC2M6Y = &D00D ; Y Coordinate Sprite 6 VIC2M7X = &D00E ; X Coordinate Sprite 7 VIC2M7Y = &D00F ; Y Coordinate Sprite 7 VIC2MNX = &D010 ; Bit 8 of X coordinates VIC2CR1 = &D011 ; Control register 1 VIC2RASTER = &D012 ; Raster counter VIC2LPX = &D013 ; Light pen X VIC2LPY = &D014 ; Light pen Y VIC2SPE = &D015 ; Sprite Enabled VIC2CR2 = &D016 ; Control register 2 VIC2SPYE = &D017 ; Sprite Y expansion VIC2MPTR = &D018 ; Memory pointers VIC2INTR = &D019 ; Interrupt Register VIC2INTE = &D01A ; Interrupt Enabled VIC2SPDP = &D01B ; Sprite data priority VIC2SPMC = &D01C ; Sprite multicolour VIC2SPXE = &D01D ; Sprite X expansion VIC2SPSPCOL = &D01E ; Sprite-Sprite collision VIC2SPDCOL = &D01F ; Sprite data collision VIC2BORDER = &D020 ; Border colour VIC2B0C = &D021 ; Background colour 0 VIC2B1C = &D022 ; Background colour 1 VIC2B2C = &D023 ; Background colour 2 VIC2B3C = &D024 ; Background colour 3 VIC2SPMM0 = &D025 ; Sprite multicolour 0 VIC2SPMM1 = &D026 ; Sprite multicolour 1 VIC2SPCOL0 = &D027 ; Sprite 0 colour VIC2SPCOL1 = &D028 ; Sprite 1 colour VIC2SPCOL2 = &D029 ; Sprite 2 colour VIC2SPCOL3 = &D02A ; Sprite 3 colour VIC2SPCOL4 = &D02B ; Sprite 4 colour VIC2SPCOL5 = &D02C ; Sprite 5 colour VIC2SPCOL6 = &D02D ; Sprite 6 colour VIC2SPCOL7 = &D02E ; Sprite 7 colour ; SID Registers SID1FRELOW = &D400 ; Frequency voice 1 low byte SID1FREHIGH = &D401 ; Frequency voice 1 high byte SID1PWDCLOW = &D402 ; Pulse wave duty cycle voice 1 low byte SID1PWDCHIGH = &D403 ; Pulse wave duty cycle voice 1 high byte SID1CR = &D404 ; Control Register voice 1 ; Colour memory COLMEM = &D800 ; Colour Memory ; CIA 1 CIA1PRA = &DC00 ; Data Port A CIA1PRB = &DC01 ; Data Port B CIA1DDRA = &DC02 ; Data Direction Port A CIA1DDRB = &DC03 ; Data Direction Port B CIA1TIMAL = &DC04 ; Timer A Low byte CIA1TIMAH = &DC05 ; Timer A High byte CIA1TIMBL = &DC06 ; Timer B Low byte CIA1TIMBH = &DC07 ; Timer B High byte CIA1RTCT = &DC08 ; Real time clock 1/10s CIA1RTCS = &DC09 ; Real time clock seconds CIA1RTCM = &DC0A ; Real time clock minutes CIA1RTCH = &DC0B ; Real time clock hours CIA1SR = &DC0C ; Shift register CIA1ICS = &DC0D ; Interrupt Control & Status CIA1CTA = &DC0E ; Control Timer A CIA1CTB = &DC0F ; Control Timer B ; CIA 2 CIA2PRA = &DD00 ; Data Port A CIA2PRB = &DD01 ; User Port PB0-7 CIA2DDRA = &DD02 ; Data Direction Port A CIA2DDRB = &DD03 ; Data Direction Port B CIA2TIMAL = &DD04 ; Timer A Low byte CIA2TIMAH = &DD05 ; Timer A High byte CIA2TIMBL = &DD06 ; Timer B Low byte CIA2TIMBH = &DD07 ; Timer B High byte CIA2RTCT = &DD08 ; Real time clock 1/10s CIA2RTCS = &DD09 ; Real time clock seconds CIA2RTCM = &DD0A ; Real time clock minutes CIA2RTCH = &DD0B ; Real time clock hours CIA2SR = &DD0C ; Shift register CIA2ICS = &DD0D ; Interrupt Control & Status CIA2CTA = &DD0E ; Control Timer A CIA2CTB = &DD0F ; Control Timer B