This is an old revision of the document!


Bally On-Board ROM Subroutines

Routine # Location? Arguments Name Function
00 007B none INTPC Initiates multiple subroutine calls.
02 0279 none XINTC/EXIT Performs an ending function for multiple subroutine calls.
04 0634 L,H RCALL Jumps immediately to location specified by HL.
06 007D L,H MCALL “CALL” for subroutines. Nests a multiple subroutine call. HL specifies data location.
08 0B79 none MRET “RET” for subroutines. Performs a POP AF and POP HL. (Aborts a nest.)
10 0ACA L,H MJUMP “JP” for subroutines. A logical nested subroutine jump. Execution of subroutines starts over at location HL.
12 00A4 B SUCK Performs a SACRED register load according to B.
14 018B none ACTINT Interrupt Service Routine. Executes SR16 on 4FD5–4FD8 and SR0200 every interrupt.
16 0480 C DECCTS Checks locations 4FD5–4FDC according to bits of C (Bit 0 = 4FD5).
18 050A IXl,IXh,A,L,H BMUSIC Sound Generator. Enter with IX pointing to a work area, HL pointing to parameter string. Sound parameters are in sets.
20 05FE non EMUSIC Stops all sound output. Sets (4FEA) and (4FF9) to 00. Outputs 00 to port 18, 8 times.
22 03CF D,B,A SETOUT Outputs D to port 0A, B to port 09, A to port 0E.
24 01DB L,H Output color specifications.
26 0AF4 E,D,C,B,A Stores A in BC bytes starting at location DE.
28 06B4 E,D,C,B,A Display Solid Color in 4000 area.
30 0704 IXl,IXh,L,H Load A with (IX+00), D with (IX+0B), E with (IX+06), set bit 6 in (IX+01) and execute SR32, 34, 36, and 38.
32 0711 E,D,A,L,H Enter with HL pointing to first of four bytes of data. Increment E (horizontal dot number) by (HL) and increment D (vertical dot number) by (HL+1). Execute SR34, 36, and 38 with HL incremented by 2.
34 071B E,D,A,L,H Pick up C (# bytes/horizontal line) from (HL) and B (number of horizontal lines) from (HL+1). Execute SR36 and 38 with HL incremented by 2.
36 071F E,D,C,B,A,L,H Calculate CRT index from V/H dot number in DE by executing SR56. Index (0000 area) returned in DE. Execute SR38.
38 0722 E,D,C,B,A,L,H Move CRT data. Moves C bytes of data from location HL to location DE.
40 0783 IXl,IXh,E,D
42 07A4 E,D,B,L,H Display solid color.
44 03B9 E,D,C,B,L,H Move CRT Data. Moves C bytes of data from HL to DE+2.
46 07B3 E,D,L,H Move data to CRT.
48 026A E,D,C,B,L,H Block moves. Moves C bytes from (HL+DE) to (HL). Increments HL by DE and repeats B times.
50 07E7 E,D,C,A Character display subroutine. See routine 52.
52 07CA E,D,C,L,H String display routine.