Purpose: Initialize system I/O
Call address: $FF84 (hex) 65412 (decimal)
Registers: none Memory system map Flags: none Calls: noneResults:
Registers: .A used .X used .Y used Memory: initialize I/O Flags: none
Description: IOINIT is perhaps the major function of the Reset handler. It initializes both CIA's (timers, keyboard, serial port, user port, cassette) and the 8502 port (keyboard, cassette, VIC bank). It distinguishes a PAL system from and NTSC one and sets PALCNT ($A03) if PAL. The VIC, SID and 8563 devices are initialized, including the downloading of character definitions to 8563 display RAM (if necessary). The system 60Hz IRQ source, the VIC raster, is started (pending IRQs are cleared). IOINIT utilizes the status byte INIT_STATUS ($A04) as follows:
$A04 bit 7 = 0 -> Full initialization (set INIT_STATUS bit 7) 1 -> Partial initialization. (not 8563 character definitions)You should be sure IRQ's are disabled before calling IOINIT to avoid interrupts while the various I/O devices are bing initialized.
SEI JSR $FF84 ;initialize system I/O cli