home *** CD-ROM | disk | FTP | other *** search
- e
- _*********************************************************
- _* *
- _* module name : RUN.ASM *
- _* *
- _* Maintenance log *
- _* --------------- *
- _* *
- _* date time action *
- _* ---- ---- ------ *
- _* 24/02/89 00:30 initial coding *
- _* 28/03/89 22:35 update message no. *
- _* 12/05/89 16:30 updated 0 - 1 prg running logic *
- _* 19/05/89 20:20 major update to the execution *
- _* of the first program *
- _* 18/06/89 19:00 place info straight on stack *
- _* 05/07/89 22:00 page 0 and 1 now in any ram blk *
- _*********************************************************
-
-
- _*********************************************************
- _* *
- _* routine : RUN - starts a program executing *
- _* *
- _* entry *
- _* ----- *
- _* CHARBUFF - command buffer with command and name *
- _* Y - pointer in character buffer *
- _*.......................................................*
- _* used *
- _* ---- *
- _* A,Y *
- _*.......................................................*
- _* exit *
- _* ---- *
- _* none *
- _*********************************************************
-
- run equ *
- £ readname _ get name of program
- £ locname _ locate name in table
- ä runit _ if found, run it
-
- _ program not found, display message
-
- ¥ #2
- ¢ dispmess
-
- runit equ *
- ƒ #flag
- ¥ #prgrun _ set program to running in table
- » [tabpntr],y
-
- _ special entry from the loader routine
-
- loadrun equ * _ loader has already set the flag
- ÿ progrun
- ¥ progrun
- æ #1
- à specprog
- ¢ notspec
-
- _ We have one program running, so this is the program we return to.
-
- specprog equ *
- ¥ tabpntr
- » current
- ¥ tabpntr+1
- » current+1 _ set this program to the current on
- _
- _ The Program interrupted was the looping program which runs with the system
- _ stack.
- _
-
- _
- _ Put new information on the saved stack information, so as to simulate
- _ the program we want to run had been interrupted
- _
-
- runcurr equ *
- ƒ #oneram _ point to prg's stack
- ¥ [current],y
- » savep1h _ changed the saved address of
- ƒ #oneoff _ interrupted stack address
- ¥ [current],y
- » savep1l
- ƒ #regsp
- ¥ [tabpntr],y
- » savestk
-
-
- _
- _ set page 0 for NMI return routine. Note that Page 1 has already been set
- _ By the loader when the program is first loaded.
- _
-
-
- ƒ #zeroram
- ¥ [current],y
- » savep0h
- ƒ #zerooff
- ¥ [current],y
- » savep0l
-
-
- notspec equ *
- ¬
-
- IEND
-
-