9010A program problems....

From: Kev <KKlopp_at_erols.com>
Date: Fri Mar 01 2002 - 12:02:17 EST

I still don't understand all the finer points of programing using the RKSIC
compiler & labels.

GOTOs only work within individual programs and EXECUTE (EX) is used to jump
to another program.

Having said that, the following program will compile & attempt to run but it
doesn't respond to Keyboard inputs other than beep.

What did I miss?

! *GAMENAME replace with current game name
! *PROGRAMMER replace with current author name
! *DATE replace with original program date
! *MODDATE replace with revision date
! *REVISION replace with revision number

! Donkey Kong Jr Test Routine
! Use in CPU Z80 processor socket
! Program created by MOWERMAN
! Program written on 2/28/02
! Revision Date 2/28/02
! Revision number 0
!
! UNABLE TO TEST SOUND PROCESSOR 8035
! UNABLE TO TEST VID RAM 2P 2R
! UNABLE TO TEST CHARACTER ROMS 3P 3N

SETUP

   TRAP ACTIVE FORCE LINE NO
   TRAP ACTIVE INTERRUPT NO

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! MAIN LOOP ROUTINE

! Proposed standard
! 1 = RAM Test
! 2 = ROM Test
! 3 = SND Test
! 4 = I/O Test
! 5 = DIP Test
! 6 = PROBE Test
! 9 = Run UUT
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!

PROGRAM 0
   DPY-DONKEY KONG JR TST
   DPY-+-PRESS CONT
   STOP

MAINLOOP:

   DPY- 1-RAM 2-ROM 3-SND 4-IO 5-DIP
   IF REG1 = 1 GOTO RAMTEST
   IF REG1 = 2 GOTO ROMTEST
   IF REG1 = 3 GOTO SNDTEST
   IF REG1 = 4 GOTO IOTEST
   IF REG1 = 5 GOTO DIPTEST
   IF REG1 = 6 GOTO PRBTEST
   IF REG1 = 9 GOTO RTEST
   GOTO MAINLOOP

RAMTEST:
   EX RAMTST
   GOTO MAINLOOP
ROMTEST:
   EX ROMTST
   GOTO MAINLOOP
SNDTEST:
   EX SNDTST
   GOTO MAINLOOP
IOTEST:
   EX IOTST
   GOTO MAINLOOP
DIPTEST:
   EX DIPTST
   GOTO MAINLOOP
PRBTEST:
   EX PRBTST
   GOTO MAINLOOP
RTEST:
   EX RUNTST
   GOTO MAINLOOP

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
      !RAM TEST

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!

PROGRAM RAMTST
   DPY-TESTING CPU RAM 3A 4A#
   RAM SHORT @ 6800-6BFF
   DPY-TESTING CPU RAM 3B 4B#
   RAM SHORT @ 6400-67FF
   DPY-TESTING CPU RAM 3C 4C#
   RAM SHORT @ 6000-63FF
   DPY-TESTING VID RAM 6R 6P#
   RAM SHORT @ 7000-77FF

   DPY-+-PRESS CONT#
   STOP

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
      !ROM TEST

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!

PROGRAM ROMTST

0: LABEL 0
   DPY-ROM VERSION 1 OR 2 ? /1
   IF REG1 = 1 GOTO 1
   IF REG1 = 2 GOTO 2
   GOTO 0
2: LABEL 2

! DONKEY KONG JR ROMS 5B/5C/5E F-2
! NOTICE THESE ROMS ARE INTERLEAVED!
!

   DPY-TESTING ROM 5B
   ROM TEST @ 0-FFF SIG 3F16
   ROM TEST @ 3000-3FFF SIG 4C8F
   DPY-TESTING ROM 5C
   ROM TEST @ 1000-17FF SIG AEDA
   ROM TEST @ 2000-27FF SIG 49FF
   ROM TEST @ 4800-4FFF SIG 3FB8
   ROM TEST @ 5800-5FFF SIG 734C
   DPY-TESTING ROM 5E
   ROM TEST @ 4000-47FF SIG 57D1
   ROM TEST @ 2800-2FFF SIG 2799
   ROM TEST @ 5000-57FF SIG 56BC
   ROM TEST @ 1800-1FFF SIG 8EEC

   GOTO F
1: LABEL 1
F: LABEL F
   DPY-ROM TEST COMPLETE
   STOP

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
      !SND TEST

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!

PROGRAM SNDTST

   REG1 = 40
   DPY-Rivet SND. CONT=NEXT
   DPY-+ SND%1#
0: LABEL 0
   WRITE @7C00 = 05
   IF REG1 = 25 GOTO 1
   GOTO 0
1: LABEL 1
   REG1 = 40
   DPY-Springs SND. CONT=NEXT SND%1#
2: LABEL 2
   WRITE @ 7C00 = 0A
   IF REG1 = 25 GOTO 3
   GOTO 2
3: LABEL 3
   REG1 = 40
   DPY-JUMP SND. CONT=NEXT
   DPY-+ SND%1#
4: LABEL 4
   WRITE @ 7D01 = FF
   IF REG1 = 25 GOTO 5
   GOTO 4
5: LABEL 5
   REG1 = 40
   DPY-STOMP SND.CONT=NEXT
   DPY-+ SND%1#
6: LABEL 6
   WRITE @ 7D02 = FF
   IF REG1 = 25 GOTO 7
   GOTO 6
7: LABEL 7
   REG1 = 40
   DPY-COIN SND. CONT=
   DPY-+NEXT SND%1#
8: LABEL 8
   WRITE @ 7D03 = FF
   IF REG1 = 25 GOTO 9
   GOTO 8
9: LABEL 9
   REG1 = 40
   DPY-PRIZE SND. CONT=NEXT
   DPY-+ SND%1#
A: LABEL A
   WRITE @ 7D05 = FF
   IF REG1 = 25 GOTO B
   GOTO A
B: LABEL B
   REG1 = 40
   DPY-DEAD SND. CONT=NEXT SND%1#
C: LABEL C
   WRITE @ 7D80 = FF
   IF REG1 = 25 GOTO F
   GOTO C
F: LABEL F
   REG1 = 40
   DPY-SND TESTS COMPLETE. PRESS
   DPY-+ CONT%1#
   STOP

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
      !I/O TEST

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!

PROGRAM IOTST
   STOP

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
      !DIP SWITCH TEST
!
! For the DIP Test I was imagining a All on & All off test
! Perhaps a on/off/on/off/on/off/on/off then reverse test would be better?
!
! Final setup should be factory settings?
!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!

PROGRAM DIPTST

SWITCHLOOP:
   INC REGF
   INC REG2
   READ @REGF
   IF REGE AND 1 >0 GOTO SW6KOFF
   GOTO SW6KON
NEXTSW:
   IF REGE AND 2 >0 GOTO SW6JOFF
   GOTO SW6JON
ADDTEST:
   IF REGF >6807 GOTO CONT
   GOTO SWITCHLOOP

SW6KON:
   DPY-#
   DPY-6K NUMBER $2 ON
   STOP
   GOTO NEXTSW

SW6JON:
   IF REGF=6807 GOTO CONT
   DPY-#
   DPY-6J NUMBER $2 ON
   STOP
   GOTO ADDTEST

SW6KOFF:
   DPY-#
   DPY-6K NUMBER $2 OFF
   STOP
   GOTO NEXTSW

SW6JOFF:
   IF REGF=6807 GOTO CONT
   DPY-#
   DPY-6J NUMBER $2 OFF
   STOP
   GOTO ADDTEST

CONT:

  DPY-#
  DPY-DIP TEST COMPLETE
  STOP

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
      !PROBE TEST

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!

PROGRAM PRBTST

   SYNC ADDRESS
   DPY-PLACE PROBE ON POINTS
   DPY-+ SHOWN.#
   STOP
   DPY-FLIP 5J-6.#
   STOP
   REGB = 1
   REG9 = 7D82
   REGB = 40
   EXECUTE PROGRAM 65
   STOP

PROGRAM 65 116 BYTES

   READ PROBE
   REG1 = REGB
1: LABEL 1
   IF REG8 = 0 GOTO 2
   READ @ REG9
   GOTO 3
2: LABEL 2
   WRITE @ REG9 = REGA
3: LABEL 3
   DEC REG1
   IF REG1 > 0 GOTO 1
   READ PROBE
   REG0 = REG0 AND 7F
   IF REG0 = REGB GOTO 4
   DPY-+CNT BAD.
   GOTO 5
4: LABEL 4
   DPY-+ OK.
5: LABEL 5
   DPY-+COUNT @0=@B#
   STOP

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
      !RUN UUT TEST

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!

PROGRAM RUNTST
   DPY-RUNNING BOARD
   RUN UUT
   STOP
Received on Fri Mar 01 12:52:53 2002

This archive was generated by hypermail 2.1.8 : Tue Dec 02 2003 - 18:40:41 EST