Browse Source

added DISK_MONITOR

pull/5/head
Michael Steil 4 years ago
parent
commit
de7f7ce149
  1. 91
      DISK_MONITOR/mon.cmd
  2. 77
      DISK_MONITOR/mon.def
  3. 96
      DISK_MONITOR/mon.df
  4. 170
      DISK_MONITOR/mon.gprw
  5. 193
      DISK_MONITOR/mon.job
  6. 10
      DISK_MONITOR/mon.lib
  7. 3
      DISK_MONITOR/mon.nl
  8. 88
      DISK_MONITOR/mon.pars
  9. 106
      DISK_MONITOR/mon.twi
  10. 128
      DISK_MONITOR/mon.utl
  11. 127
      DISK_MONITOR/mon.va
  12. 12
      README.md
  13. 5
      build.sh

91
DISK_MONITOR/mon.cmd

@ -0,0 +1,91 @@
.PAGE 'MON.CMD'
;
;
; DISK MONITOR 2040 V1.0
;
; THIS MONITOR ALLOWS YOU TO
; PEEK AND POKE THE DISK
;
; MONITOR COMMANDS ARE :
;
; $R - READ T,S,D,B
; $W - WRITE T,S,D,B
; $G - GET DISK MEMORY IMAGE TO PET
; $P - PUT PET MEMORY IMAGE TO DISK
; $V - VIEW DISK MEMORY
; $: - MODIFY DISK MEMORY
; $> - DIRECT DISK COMMAND
; $T - TRACE FILE LINKS
; $I - INIT JOB HEADER
;
;
; THIS ADDS ITSELF TO THE PET
; MONITOR
;
;
START LDA #<DSKMON
STA ERRJMP ; UPDATE PET MONITOR
LDA #>DSKMON
STA ERRJMP+1 ; INDIRECT ERROR
;
BRK
; DISK MON 1.0 2/10/80
;
DSKMON CMP #'$' ;TEST IF '$'
BEQ DSKMN
JMP ERROR ; BAD COMMAND
;
DSKMN JSR RDOC ; ENTRY FROM PET MONITOR ON A '$' SYMBOL
;
CMP #SPC ; IGNORE SPACE
BEQ DSKMN
;
DSK002 LDX #NUMCMD-1 ; COMMAND TABLE LOOKUP INDEX
DSK003 CMP CMDTBL,X
BNE DSK004
;
TXA
ASL A ; 2*INDEX FOR COMMAND JUMP ADDRESS
TAX
;
LDA JMPTBL+1,X
PHA
LDA JMPTBL,X ; PUSH RETURN ADDRESS AND THE RTS ON IT
PHA
RTS ; OFF TO THE COMMAND
;
DSK004 DEX
BPL DSK003
;
JMP ERROR ; BAD COMMAND PRINT '?
;
;
; COMMAND LIST
CMDTBL .BYTE 'RWGPV:>ITFD'
; $R: READ
; $W: WRITE
; $G: GET
; $P: PUT
; $V: VIEW
; $:: ALTER DISK MEMORY
; $>: DIRECT DISK COMMAND
; $I: INIT JOB HEADER
; $T: TRACE FILE LINKS
; $F: FETCH SECTOR TO MEMORY
; $D: DUMP MEMORY TO DISK
;
;
JMPTBL .WORD READ-1
.WORD WRITE-1
.WORD GET-1
.WORD PUT-1
.WORD VIEW-1
.WORD ALTER-1
.WORD WEDGE-1
.WORD INIT-1
.WORD TRACE-1
.WORD FETCH-1
.WORD DUMP-1
;
;
.END

77
DISK_MONITOR/mon.def

@ -0,0 +1,77 @@
.PAGE 'MON.DEF'
;
;
; DEFS FOR DISK MON 1.0
;
;
; EXTERNAL ROUTINES
;
CIOUT =$F19E ; CHAR OUT PUT IEEE
RDOC =$D798 ; GET CHAR IEEE
WROC =$F266 ; CHAR OUT TO PET
WROB =$D722 ; WRITE OUT HEX BYTE
RDOB =$D763 ; READ HEX BYTE
ERROR =$D7A4 ;BAD SYNTAX ERROR
RDOA =$D754 ; READ HEX ADDRESS
SECND =$F143 ; SEND SA ON IEEE
WRTWO =$D731 ; WRITE 2 CHAR
STRT =$D4BA ; TOP OF MONITOR
BASIN =$F215 ; GET CHAR FROM OS
SA =$D3 ; SECONDARY ADDRESS
FA =$D4 ; PRIMARY ADDRESS
ERRJMP =$03FA ; INDIRECT ERROR JMP
CRLF =$D534 ; PRINT CRLF
SPACE =$D531 ; PRINT SPACE OUT
UNLSN =$F1B9 ; UNLISTEN LISTENER
TMPO =$FB
;
;
;
; IEEE CONTROL ROUTINES
;
TALK =$F0D2 ; TALK ADDRESS
LISTN =$F0D5
TKSA =$F193
ACPTR =$F1C0
;
;
;
; CONSTANTS
;
;
SPC =$20 ;SPACE CHAR
CR =$0D ; CARRIAGE RETURN
NUMCMD =11 ; NUMBER OF MON COMMANDS
NUMPRM =5 ; NUMBER OF PARMS
VARBLK =$0
RDJOB =$80 ; CONTROLLER READ JOB
WRTJOB =$90 ; CONTROLLER WRITE JOB
SEEK =$B0 ; SEEK JOB
;
;
;
; VARIABLES
;
;
* =VARBLK
;
VAL *=*+2 ; EVALUATION RETURN
LEN *=*+1 ; LEN OF BUFFER
BUF *=*+40 ; CMD BUF
DEVNUM *=*+1 ; IEEE DEVICE #
ADR1 *=*+2 ; POINTER
ADR2 *=*+2 ; POINTER
ADR3 *=*+2 ; POINTER
ADR4 *=*+2 ; TEMP POINTER
JOB *=*+1 ; JOB CODE
TRACK *=*+1 ;
SECTOR *=*+1
DRIVE *=*+1
JOBNUM *=*+1
RECOV *=*+1
PRMPTR *=*+1 ; POINTER TO PARM
;
;
;
*= $6000
.END

96
DISK_MONITOR/mon.df

@ -0,0 +1,96 @@
;
.PAGE 'MON.DF'
;
;
;
; *DUMP
;
; WRITE BLOCK OF MEMORY TO DISK
;
; $D ADR1 TXX SXX DXX RXX
;
;
;
; DUMP PAGE (ADR1) TO DISK D.T.S
;
;
DUMP JSR GETADR ; GET ADR1 PART
;
LDA TMPO
STA ADR1
STA ADR2
;
LDA TMPO+1
STA ADR1+1 ; SET ADR1
STA ADR2+1
INC ADR2+1 ; SET ADR2=ADR1+$100
;
LDA #0 ; SET ADR3 =$1100
STA ADR3
LDA #$11
STA ADR3+1
;
JSR PARMS ; READ PARMS
;
LDA #0 ; USE ONLY JOBNUM 0
STA JOBNUM
;
JSR MEMWRT ; TRANSFER PET TO DISK
;
LDA #SEEK ; SET UP JOB HEADER
JSR DOIT
;
LDA #WRTJOB ; WRITE TO DISK
JSR DOIT
;
JMP PRTERR ; READ ERROR CHANNEL
;
;
;
;
;
; *FETCH
;
; READ TRACK.SECTOR INTO PET
;
;
; $F ADR1 PARMS
;
; .$F 1000 T01 S01 D00 R04
;
;
;
FETCH JSR GETADR ; GET ADR1
LDA TMPO ; SETUP ADR3
STA ADR3
LDA TMPO+1
STA ADR3+1
;
JSR PARMS ; GET REST OF PARMS
;
LDA #0 ; FORCE JOBNUM 0
STA JOBNUM
;
LDA #SEEK
JSR DOIT ; INIT HEADER
;
LDA #RDJOB ; READ SECTOR IN
JSR DOIT
;
LDA #0 ; SET UP ADR1 AND ADR2
STA ADR1
STA ADR2
;
LDA #$11 ; ADR1= $1100
STA ADR1+1
STA ADR2+1 ; ADR2= $1200
INC ADR2+1
;
JSR MEMRD ; READ IT IN
;
JMP STRT
;
;
;
;
.END

170
DISK_MONITOR/mon.gprw

@ -0,0 +1,170 @@
.PAGE 'MON.GPRW'
;
;
;
; GET/PUT COMMANDS
; WRITE/READ COMMANDS
;
; GET - GET DISK MEMORY IMAGE AND
; PUT INTO PET MEMORY
;
; .$G ADR1,ADR2,ADR3
;
; GET DISK MEMORY (ADR1) TO (ADR2)
; AND PUT INTO PET MEMORY STARTING AT (ADR3)
;
;
GET JSR RDADR3 ; GET 3 ADDRESS PARMS
JSR MEMRD ; READ THE RANGE OVER
JMP STRT ; BACK TO MONITOR
;
;
;
; PUT - PUT PET MEMORY IMAGE INTO DISK MEMORY
;
;
; .$P ADR1,ADR2,ADR3
;
; PUT PET MEMORY IMAGE FROM (ADR1) TO (ADR2) INTO DISK MEMORY
; STARTING AT (ADR3)
;
;
PUT JSR RDADR3 ;READ 3 ADDRESS PARMS
JSR MEMWRT ; WRITE MEMORY TO DISK
JMP STRT ; BACK TO MONITOR
;
;
;
;
;
; READ COMMAND
;
; .$R T,S,D,B
;
; READ (TRACK),(SECTOR),(DRIVE),(BUFFER)
;
;
READ JSR PARMS ; READ JOB PARMS
;
LDA #RDJOB ; DO A READ JOB
JSR DOIT
;
JSR PRTERR ; PRINT ERROR CHANNEL
;
JMP STRT
;
;
;
;
;
; WRITE COMMAND
;
; SYNTAX - $W (TRACK),(SECTOR),(DRIVE),(BUFFER)
;
; WRITE TRACK,SECTOR,DRIVE,BUFFER TO DISK
;
;
;
WRITE JSR PARMS ; READ JOB PARMS
;
LDA #WRTJOB ; DO A WRITE SECTOR
;
JSR DOIT
;
JSR PRTERR ; PRINT ERROR CHANNEL
JMP STRT
;
;
;
; MEMWRT
; WRITE (ADR1)-(ADR2) TO DISK AT
; (ADR3)
;
MEMWRT JSR SETMW ; STORE M-W
;
INC ADR2 ; INC ADR2 FOR TEST LATER
BNE MEMW10
INC ADR2+1
;
MEMW10 LDA ADR3 ; STORE ADDRESS
STA BUF+3
LDA ADR3+1
STA BUF+4
;
; NUMBER OF CHARS STORED LATER AT BUF+5
;
LDX #6 ; STORE DATA STARTING AT 6
LDY #0
;
MEMW20 LDA (ADR1),Y ;GET DATA
STA BUF,X
;
INC ADR1 ; INC FETCH ADRS
BNE MEMW30
INC ADR1+1
;
MEMW30 JSR TSAD12 ; TEST IF DONE
;
BCC MEMW40 ; NOT YET
BCS MEMW70 ; END OF MEM WRITE
;
MEMW40 CPX #39 ; TEST IF BUFFER FULL
BCS MEMW60 ;YUP , SEND THE BUFFER
;
INX ; NOT YET, KEEP ON STUFFIN
BNE MEMW20
;
MEMW60 LDA #34
STA BUF+5 ; SET NUMBER OF CHARS
;
JSR SNDCMD ; SEND THE BUFFER
;
LDA ADR3 ; UPDATE POINTER
CLC ; ADVANCE DISK MEM POINTER
ADC #34 ; 34 MORE BYTES
STA ADR3
BCC MEMW80
INC ADR3+1
;
;
MEMW80 JMP MEMW10 ; BACK TO THE TOP
;
;
MEMW70 STX LEN ; SET BUFFER LEN
TXA
SEC ; SUB 'M-WLHN' FROM LEN
SBC #6
STA BUF+5 ; SET N
;
JMP SNDCMD ; SEND IT AND RETURN
;
;
RDADR3 JSR RDADR2 ; READ 3 ADDR PARMS
;
JSR GETADR
LDA TMPO ; GET ADR3
STA ADR3
LDA TMPO+1
STA ADR3+1
;
RTS
;
;
;
RDADR2 JSR GETADR ; READ 3 ADDR PARMS
LDA TMPO ; GET ADR1
STA ADR1
LDA TMPO+1
STA ADR1+1
;
JSR GETADR
LDA TMPO ; GET ADR2
STA ADR2
LDA TMPO+1
STA ADR2+1
;
RTS
;
;
;
.END

193
DISK_MONITOR/mon.job

@ -0,0 +1,193 @@
.PAGE 'MON.JOB'
;
;
;
; JOB UTILITY CONTROL
;
;
; *DOIT
; INPUTS: JOB#, JOB, DRIVE, TRACK
; SECTOR
;
;
; 1. SETHDR(TRACK,SECTOR)
;
; 2. SETTRK(TRACK)
;
; 3. DOJOB(JOB,DRIVE)
;
;
DOIT STA JOB ;SAVE JOBCODE
JSR SETMW ; PREPARE MEMORY WRITE
LDA JOBNUM ; GET HEADER POINTER
JSR GETHDR
;
CLC ; TRACK,SECTOR AT +2
ADC #2
STA BUF+3
STX BUF+4 ; STORE LOW,HI ADDRESS
;
LDA #2
STA BUF+5 ; NUMBER OF BYTES SENT
;
LDA TRACK ; SET DATA(TRACK,SECTOR)
STA BUF+6
LDA SECTOR
STA BUF+7
;
LDX #7 ; SEND 7 CHAR IN BUF
JSR SNDCMD
;
;
LDA JOBNUM ; GET POINTER TO TRKS
JSR GETTRK
;
STA BUF+3
STX BUF+4
;
LDA #1 ; NUMBER OF DATA BYTES TO SEND
STA BUF+5
;
LDA TRACK ; SET DATA(TRACK)
STA BUF+6
;
LDX #6 ; SEND 6 CHARS IN BUF
JSR SNDCMD
;
;
DOJOB LDA JOBNUM ; GET JOB ADDRESS
JSR GETJOB
STA BUF+3 ;LOW BYTE
;
STX BUF+4 ;HI BYTE
;
LDA #1 ; NUMBER OF BYTES
STA BUF+5
;
LDA DRIVE ; JOB=JOB+(DRIVEAND1)
AND #1
ORA JOB
STA BUF+6
;
LDX #6 ; SEND THE BUFFER
JSR SNDCMD
;
; WAIT OF JOB
JSR WAIT
;
CMP #1 ; TEST OK JOB RESULT
BNE DOERR ; NOPE,JOB ERROR
;
RTS ;OK, RETURN
;
;
DOERR JSR JOBERR ; PRINT ERROR #
;
DEC RECOV ; TEST FOR REATTEMPT
BPL DOJOB ; DO IT AGAIN SAM
;
JMP STRT ; NO MORE HARRY
;
;
;
; *GETHDR
;
; RETURN POINTER TO HEADER
; .A LOW BYTE
; .X HI BYTE
;
;
GETHDR ASL A ; POINTER=$1000+8*JOBNUM+$21
ASL A
ASL A
;
CLC
ADC #$21
;
LDX #$10
RTS
;
;
;
; *GETTRK
;
; RETURN TRKS POINTER
;
; .A LOW BYTE
; .X HI BYTE
;
;
GETTRK CLC
ADC #$12 ;OFFSET
;
LDX #$10
RTS
;
;
;
; *WAIT
;
; WAIT FOR JOB(.X) TO FINISH
;
; RETURN JOB RESULT IN .A
;
;
WAIT JSR SETMR ; PREPARE FOR M-R
;
LDA JOBNUM
JSR GETJOB ; POINTER TO JOB
;
STA BUF+3
STX BUF+4
;
WAIT10 JSR SNDCMD ; SEND M-RLH
;
JSR RDCMD ; GET RETURN
;
ORA #0 ; TEST IF MINUS
BMI WAIT10
;
RTS
;
;
;
;
; *JOBERR
;
; PRINT CRLF ERROR #
;
JOBERR PHA ;SAVE ERROR #
;
JSR CRLF
;
PLA
JMP WROB
;
;
;
SETMR LDA #'M ; STORE M-R IN BUF
STA BUF
LDA #'-
STA BUF+1
LDA #'R
STA BUF+2
RTS
;
;
;
SETMW JSR SETMR ; STORE M-W IN BUF
LDA #'W
STA BUF+2
RTS
;
;
;
GETJOB CLC ; POINTER TO JOB QUE
ADC #3
;
LDX #$10
RTS
;
;
;
.END

10
DISK_MONITOR/mon.lib

@ -0,0 +1,10 @@
.LIB MON.DEF
.LIB MON.CMD
.LIB MON.PARS
.LIB MON.UTL
.LIB MON.GPRW
.LIB MON.JOB
.LIB MON.TWI
.LIB MON.DF
.LIB MON.VA
.END

3
DISK_MONITOR/mon.nl

@ -0,0 +1,3 @@
.OPT NOLIST
.FILE MON.LIB
.END

88
DISK_MONITOR/mon.pars

@ -0,0 +1,88 @@
.PAGE 'MON.PARS'
;
;
;
; PARSER FOR THE MONITOR
;
PARMS LDA #0 ; DEFAULT ERROR RECOVERY ATTEMPTS OF 0
STA RECOV
;
PAR002 JSR BASIN ;GET NEXT CHAR
CMP #SPC ; IGNORE SPACE
BEQ PAR002
CMP #', ; IGNORE ,
BEQ PAR002
CMP #CR ; END OF LINE
BNE PAR005
RTS
;
PAR005 LDX #NUMPRM-1 ; PARM LOOKUP INDEX
PAR003 CMP PRMTBL,X ; TEST IF PARM LETTER
BNE PAR004 ; NOPE
;
TXA ; YES GET VAR. ADDRESS
ASL A
TAX
;
LDA PRMADR,X
STA PRMPTR
LDA PRMADR+1,X
STA PRMPTR+1
;
JSR RDOB ; GET THE VALUE
;
LDY #0 ; STORE TWO BYTE VALUE
STA (PRMPTR),Y
JMP PAR002
;
PAR004 DEX
BPL PAR003 ; TEST IF DONE
;
JMP ERROR ; BAD COMMAND
;
;
; *GETADR
;
; CHECK FOR ' ' OR ','
;
; THEN READ HEX ADDRESS
;
;
GETADR JSR SYNCHK ; TEST FOR SPC OR ,
JMP RDOA ;GET ADR
;
;
SYNCHK JSR RDOC ; GET CHAR
CMP #SPC
BEQ SYNC10 ; OK
;
CMP #',
BEQ SYNC10 ; OK
;
JMP ERROR ; BAD SYNTAXXX
;
SYNC10 RTS
;
;
;
;
;
;
;
;
PRMTBL .BYTE 'TSDJR'
;
; T: TRACK
; S: SECTOR
; D: DRIVE
; J: JOB #
; R: ROCOVERY
;
PRMADR .WORD TRACK
.WORD SECTOR
.WORD DRIVE
.WORD JOBNUM
.WORD RECOV
;
;
.END

106
DISK_MONITOR/mon.twi

@ -0,0 +1,106 @@
.PAGE 'MON.TWI'
;
;
;
;
; *TRACE
;
; TRACE AND PRINT FILE LINKS
;
; $T TXX SXX DXX
;
;
TRACE JSR PARMS ; GET REQUIRED PARMS
LDA #0 ; DOIT IN JOB 0
STA JOBNUM
;
LDA #SEEK ; INIT THE JOB HEADER
JSR DOIT
JSR CRLF ; NEXT LINE PLEASE
;
TRAC10 LDA #RDJOB ; READ FIRST T,S
JSR DOIT
;
LDA #0 ; SET ADR1,ADR2,ADR3
STA ADR1
LDA #$11 ; ADR1 =$1100
STA ADR1+1
STA ADR2+1 ; ADR2= $1102
;
LDA #02
STA ADR2
;
LDA #<BUF+10
STA ADR3
LDA #>BUF ; ADR3 =BUF+10
STA ADR3+1
;
JSR MEMRD ; GO READ DISK INTO PET
;
LDA BUF+10 ; GET TRACK LINK
STA TRACK
JSR WROB ; WRITE OUT BYTE
LDA #'. ; WRITE TT.SS
JSR WROC
;
LDA BUF+11 ;GET SECTOR LINK
STA SECTOR
JSR WROB ; WRITE OUT SECTOR
JSR SPACE
JSR SPACE
JSR SPACE
;
LDA TRACK
BNE TRAC10
;
JMP STRT
;
;
;
;
;
;
;
; *WEDGE
;
; $>[COMMAND]
;
; SEND A DIRECT DISK COMMAND
;
WEDGE LDX #0 ; BUF POINTER
;
WEDG10 JSR BASIN ; GET COMMAND
CMP #CR
BEQ WEDG20 ;DONE
;
STA BUF,X ; SAVE AWAY
INX
BNE WEDG10
;
WEDG20 DEX ; DEC BUF LEN
;
JSR SNDCMD
JMP PRTERR
;
;
;
;
;
;
; *INIT
;
; $IXX
;
; INIT JOB HEADER WITH DISK ID
;
;
INIT JSR PARMS
;
LDA #SEEK ; DO A SEEK ON JOB
JSR DOIT
JMP PRTERR ; READ ERR CHANNEL
;
;
;
;
.END

128
DISK_MONITOR/mon.utl

@ -0,0 +1,128 @@
.PAGE 'MON.UTL'
;
;
; MONITOR UTILITY ROUTINES
;
;
;ROUTINE: SNDCMD
;
; SEND BUF TO COMMAND CHANNEL OF DISK
;
;
SNDCMD STX LEN ; LEN OF BUFFER
;
LDA #$28 ; SETUP LISTEN FA
STA FA
;
LDA #$60+15 ; SETUP SA
STA SA
;
JSR LISTN ; TELL DISK TO LISTEN
LDA SA
JSR SECND ; TO COMMAND CHANNEL
;
LDX #0 ; ZERO BUFFER POINTR
;
SNDC10 LDA BUF,X ; GET CHAR
JSR CIOUT ; SEND THE CHAR
;
INX ; ADVANCE BUFFER POINTER
;
DEC LEN ;TEST IF DONE
BPL SNDC10
JMP UNLSN ; UNLISTEN DISK
;
;
;
;
; ROUTINE: RDCMD
;
; READ ONE CHAR FROM COMMAND CHANNEL
;
;
RDCMD LDA #$48 ; SET UP TALK FA
STA FA
;
JSR TALK ; TELL DISK TO TALK
LDA #$6F ; SPECIFY SEC ADR
JSR TKSA
;
JMP ACPTR ; GET THE CHAR
;
;
;
;
; ROUTINE: MEMRD
;
; READ DISK MEMORY FROM (ADR1)-(ADR2) INTO (ADR3)
;
; DONE USING MEMORY READ COMMAND
;
MEMRD JSR SETMR ; PUT M-R IN BUF
;
MEMR10 LDA ADR1 ; GET LOW BYTE
STA BUF+3
;
LDA ADR1+1 ; GET HI BYTE
STA BUF+4
;
LDX #4 ; SEND BUF(4)
JSR SNDCMD
;
JSR RDCMD ; READ CHAR BACK
;
LDY #0
STA (ADR3),Y ; STORE IT AWAY
;
INC ADR3 ; ADVANCE POINTER
BNE MEMR15
INC ADR3+1
;
MEMR15 JSR TSAD12 ; TEST IF DONE
;
BCC MEMR20 ; NOT YET
;
RTS ; IT IS DONE
;
MEMR20 INC ADR1
BNE MEMR10
INC ADR1+1
JMP MEMR10
;
;
;
;
;
; ROUTINE: PRTERR
;
; READ AND PRINT DISK ERROR CHANNEL TO PET
;
;
PRTERR JSR CRLF ; DO CRLF
PRTE10 JSR RDCMD
JSR WROC ; WRITE OUT CHAR(.A)
CMP #CR
BNE PRTE10
JMP STRT
;
;
;
;
; *TSAD12
;
; CMP ADR1 AND ADR2
;
; .C=1 ADR1>=ADR2
;
; .C=0 ADR1<ADR2
;
TSAD12 SEC
LDA ADR1
SBC ADR2
LDA ADR1+1
SBC ADR2+1
RTS
;
;
;
.END

127
DISK_MONITOR/mon.va

@ -0,0 +1,127 @@
.PAGE 'MON.VA'
;
;
;
;
; *VIEW
;
; $V ADR1 ADR2
;
; DISPLAY DISK MEMORY (ADR1)-(ADR2)
;
;
VIEW JSR RDADR2 ; GET ADR1 ADR2
;
LDA ADR2 ; SAVE ENDING ADR
STA ADR4
LDA ADR2+1
STA ADR4+1
;
VIEW10 LDA ADR1 ; SET UP FOR M-R
CLC ; READ EIGHT BYTES IN
ADC #8
STA ADR2
LDA ADR1+1
ADC #0 ; TAKE CARE OF CARRY
STA ADR2+1
;
LDA #<BUF+10 ; ADR3 =BUF+10
STA ADR3
LDA #>BUF
STA ADR3+1
;
JSR CRLF ; PRINT (CRLF).$: ADR1
;
LDA #'. ; PROMT
JSR WROC
LDA #'$
JSR WROC
LDA #':
JSR WROC
JSR SPACE
;
LDA ADR1+1 ; HI BYTE
JSR WROB
LDA ADR1 ; LOW BYTE
JSR WROB
;
JSR MEMRD ; READ THE BYTES
;
LDX #0
STX PRMPTR ; TEMP BUF POINTER
;
VIEW30 JSR SPACE
LDX PRMPTR ; GET BUFFER POINTER
LDA BUF+10,X
JSR WROB ; WRITE OUT DATA BYTE
INC PRMPTR
LDA PRMPTR
CMP #8 ;TEST IF DONE
BNE VIEW30 ; NOT YET
;
SEC ;TEST IF DONE
LDA ADR2
SBC ADR4
LDA ADR2+1
SBC ADR4+1
BCC VIEW10
;
JMP STRT ; DONE WITH IT
;
;
;
;
;
; *ALTER
;
; $: ADR1 DD DD DD DD DD DD DD DD
;
;
; CHANGE DATA TO DD DD AT ADR1
;
;
ALTER JSR GETADR ; GET ADR1
;
LDA TMPO ; LET ADR3=TMP
STA ADR3
LDA TMPO+1
STA ADR3+1
;
LDA #0 ; PRMPTR TMP BUFFER POINTER
STA PRMPTR
;
ALTR10 JSR GETBYT ; GET DATA BYTES
LDX PRMPTR ; LOAD POINTER
STA BUF+20,X
;
INC PRMPTR
LDA PRMPTR
CMP #8 ; TEST IF DONE
BNE ALTR10
;
LDA #<BUF+20 ; SET UP START-END FOR MEMORY WRITE COMMAND
STA ADR1
LDA #<BUF+20+8
STA ADR2 ; STORE 8 BYTES
LDA #>BUF
STA ADR1+1
STA ADR2+1
;
JSR MEMWRT
JMP STRT
;
;
;
;
;
; *GETBYT
;
; READ NEXT HEX BYTE INTO .A
;
;
GETBYT JSR SYNCHK ; TEST SYNTAX
JMP RDOB
;
;
;
.END

12
README.md

@ -120,10 +120,6 @@ The "CBM 8032 EURO SCREEN EDITOR 4V2E (E-901474-03)" ROM. Extracted from UNKN008
The C64 monitor program. Extracted from ml-monitor-source.d64 from Steve Gray's [Dennis Jarvis Page](http://6502.org/users/sjgray/dj/) and converted to LF line breaks and LST-style indenting. The symbol `WALKON` in the file `micii4` was changed from `1` to `0` so the source builds.
## ASSEMBLER_TED
A version of the Commodore Resident Assembler for the TED series (Plus/4, C16 and C116). Extracted from [ted_kernal_basic_src.tar.gz](http://www.zimmers.net/anonftp/pub/cbm/src/plus4/ted_kernal_basic_src.tar.gz).
## DOS_4040
The CBM 4040/2040 DOS V2.1 source (1980). Extracted from 4040-source.d64 from Steve Gray's [Dennis Jarvis Page](http://6502.org/users/sjgray/dj/) and converted to LF line breaks.
@ -241,6 +237,14 @@ The [CBM 8023P](http://www.zimmers.net/anonftp/pub/cbm/firmware/printers/8023P-M
The source contains a 90 degree rotated 6x8 pixel variant of the PETSCII character/graphics set.
## DISK_MONITOR
"DISK MONITOR 2040 V1.0", an extension to the PET monitor for disk commands (see mon.cmd). Extracted from UNKN008.D80 from [Ruud Baltissen's ICPUG disks](http://www.pagetable.com/docs/CBM2_Sources.zip) and converted to LF line breaks and LST-style indenting.
## ASSEMBLER_TED
A version of the Commodore Resident Assembler for the TED series (Plus/4, C16 and C116). Extracted from [ted_kernal_basic_src.tar.gz](http://www.zimmers.net/anonftp/pub/cbm/src/plus4/ted_kernal_basic_src.tar.gz).
## MONITOR_KIM
The KIM-1 "monitor" ROM (1975) from the [zimmers.net archive](http://www.zimmers.net/anonftp/pub/cbm/src/kim-1/kim.asm), converted to LF line breaks. The missing closing `'` characters have been added to the `KIM` and `ERR` lines.

5
build.sh

@ -103,8 +103,6 @@ build1 BASIC_CBM2_1984-01-04 cbm256 # cbm128 cbm192 cbm256 cbm64 pet128 pet192 p
build1 MONITOR_C64 micii4
build2 MONITOR_C128 monitor
build2 ASSEMBLER_TED assembler
build1 CONTROLLER_8250 lib
build1 CONTROLLER_1001 single.src
@ -141,3 +139,6 @@ build2 DOS_1541C_03 serlib
# build2 RAMDOS a
build1 PRINTER_8023P us.ptr.src
build2 ASSEMBLER_TED assembler
build1 DISK_MONITOR mon.lib

Loading…
Cancel
Save