Skip to content
Permalink
Browse files

cleanups; added version byte and signature

  • Loading branch information...
mist64 committed Apr 12, 2019
1 parent 724a3be commit 4bc08d26204e037b3a21a137188cabc3117f06b2
Showing with 140 additions and 178 deletions.
  1. +0 −1 basic/basic.s
  2. +1 −1 basic/code25.s
  3. +4 −3 basic/declare.s
  4. +1 −1 basic/tokens.s
  5. +48 −66 kernal/declare.s
  6. +0 −43 kernal/irqfile.s
  7. +2 −1 kernal/kernal.s
  8. +39 −0 kernal/patches.s
  9. +11 −4 kernal/vectors.s
  10. +34 −58 rom.cfg
@@ -1,6 +1,5 @@
.feature labels_without_colons, pc_assignment

.segment "S0000b" : zeropage
.include "declare.s"
.include "tokens.s"
.include "token2.s"
@@ -1,4 +1,4 @@
.segment "SE000" ;start of vic-40 kernal rom
.segment "HIBASIC" ;start of vic-40 kernal rom

; continuation of exponent routine
;
@@ -9,6 +9,7 @@ clmwid =10 ;print window 10 chars
pi =255
numlev =23
strsiz =3
.segment "ZPBASIC" : zeropage
blank0 .res 3 ;6510 register area
adray1 .res 2 ;convert float->integer
adray2 .res 2 ;convert integer->float
@@ -120,12 +121,13 @@ txtptr .res 6
qnum .res 10
chrrts .res 1
rndx .res 5
.segment "S00FF" : zeropage

.segment "STRTMP" : zeropage
lofbuf .res 1
fbuffr .res 1
strng1 =arisgn
;
.segment "S0300b" ;basic indirects
.segment "BVECTORS" ;basic indirects
ierror .res 2 ;indirect error (output error in .x)
imain .res 2 ;indirect main (system direct loop)
icrnch .res 2 ;indirect crunch (tokenization routine)
@@ -139,5 +141,4 @@ sxreg .res 1 ;.x reg
syreg .res 1 ;.y reg
spreg .res 1 ;.p reg
usrpok .res 3 ;user function dispatch
.segment "S0314b" ;system indirects follow

@@ -1,4 +1,4 @@
.segment "SA000"
.segment "LOBASIC"
.word init ;c000 hard reset
.word panic ;c000 soft reset
.byt "CBMBASIC"
@@ -1,19 +1,8 @@
.segment "S0000k" : zeropage ;declare 6510 ports
d6510 .res 1 ;6510 data direction register
r6510 .res 1 ;6510 data register
.segment "S0002" : zeropage ;miss 6510 regs
;virtual regs for machine language monitor
pch .res 1
pcl .res 1
flgs .res 1
acc .res 1
xr .res 1
yr .res 1
sp .res 1
invh .res 1 ;user modifiable irq
invl .res 1
;declare 6510 ports
d6510 = 0 ;6510 data direction register
r6510 = 1 ;6510 data register

.segment "S0090" : zeropage
.segment "ZPKERNAL" : zeropage
status .res 1 ;i/o operation status byte
; crfac .res 2 ;correction factor (unused)
stkey .res 1 ;stop key flag
@@ -114,9 +103,9 @@ robuf .res 2 ;rs-232 output buffer pointer
frekzp .res 4 ;free kernal zero page 9/24/80
baszpt .res 1 ;location ($00ff) used by basic

.segment "S0100"
.segment "STACK"
bad .res 1
.segment "S0200"
.segment "KVAR"
buf .res 89 ;basic/monitor buffer

; tables for open files
@@ -186,8 +175,7 @@ stupid .res 1 ;temp d1irq indicator for cassette read
lintmp .res 1 ;temporary for line index
palnts .res 1 ;pal vs ntsc flag 0=ntsc 1=pal

.segment "S0300k" ;rem program indirects(10)
.segment "S0314k" ;rem kernal/os indirects(20)
.segment "KVECTORS";rem kernal/os indirects(20)
cinv .res 2 ;irq ram vector
cbinv .res 2 ;brk instr ram vector
nminv .res 2 ;nmi ram vector
@@ -205,61 +193,55 @@ usrcmd .res 2
iload .res 2
isave .res 2 ;savesp

.segment "S033C"
tbuffr .res 192 ;cassette data buffer
tbuffr =$033C ;cassette data buffer

.segment "S0400"
vicscn .res 1024
ramloc
vicscn =$0400

; i/o devices
;
.segment "SD000"
vicreg =* ;vic registers
vicreg =$d000

.segment "SD400"
sidreg =* ;sid registers
sidreg =$d400

.segment "SD800"
viccol .res 1024 ;vic color nybbles
viccol =$d800 ;vic color nybbles

.segment "SDC00" ;device1 6526 (page1 irq)
colm ;keyboard matrix
d1pra .res 1
rows ;keyboard matrix
d1prb .res 1
d1ddra .res 1
d1ddrb .res 1
d1t1l .res 1
d1t1h .res 1
d1t2l .res 1
d1t2h .res 1
d1tod1 .res 1
d1tods .res 1
d1todm .res 1
d1todh .res 1
d1sdr .res 1
d1icr .res 1
d1cra .res 1
d1crb .res 1
cia1 =$dc00 ;device1 6526 (page1 irq)
d1pra =cia1+0
colm =d1pra ;keyboard matrix
d1prb =cia1+1
rows =d1prb ;keyboard matrix
d1ddra =cia1+2
d1ddrb =cia1+3
d1t1l =cia1+4
d1t1h =cia1+5
d1t2l =cia1+6
d1t2h =cia1+7
d1tod1 =cia1+8
d1tods =cia1+9
d1todm =cia1+10
d1todh =cia1+11
d1sdr =cia1+12
d1icr =cia1+13
d1cra =cia1+14
d1crb =cia1+15

.segment "SDD00" ;device2 6526 (page2 nmi)
d2pra .res 1
d2prb .res 1
d2ddra .res 1
d2ddrb .res 1
d2t1l .res 1
d2t1h .res 1
d2t2l .res 1
d2t2h .res 1
d2tod1 .res 1
d2tods .res 1
d2todm .res 1
d2todh .res 1
d2sdr .res 1
d2icr .res 1
d2cra .res 1
d2crb .res 1
cia2 =$dd00 ;device2 6526 (page2 nmi)
d2pra =cia2+0
d2prb =cia2+1
d2ddra =cia2+2
d2ddrb =cia2+3
d2t1l =cia2+4
d2t1h =cia2+5
d2t2l =cia2+6
d2t2h =cia2+7
d2tod1 =cia2+8
d2tods =cia2+9
d2todm =cia2+10
d2todh =cia2+11
d2sdr =cia2+12
d2icr =cia2+13
d2cra =cia2+14
d2crb =cia2+15

timrb =$19 ;6526 crb enable one-shot tb

@@ -38,46 +38,3 @@ piokey lda #$81 ;enable t1 irq's
ora #%00010001 ;enable timer1
sta d1cra
jmp clklo ;release the clock line***901227-03***
.segment "SE4EC"
;
; baudop - baud rate table for pal
; .985248e6/baud-rate/2-100
;
baudop .word 9853-cbit ;50 baud
.word 6568-cbit ;75 baud
.word 4478-cbit ;110 baus
.word 3660-cbit ;134.6 baud
.word 3284-cbit ;150 baud
.word 1642-cbit ;300 baud
.word 821-cbit ;600 baud
.word 411-cbit ;1200 baud
.word 274-cbit ;1800 baud
.word 205-cbit ;2400 baud

.segment "SE4E0" ;(20-12)
; fpatch - tape filename timeout
;
fpatch adc #2 ;time is (8 to 13 sec of display)
fpat00 ldy stkey ;check for key down on last row...
iny
bne fpat01 ;key...exit loop
cmp time+1 ;watch timer
bne fpat00
fpat01 rts

.segment "SE4DA" ;(32-6)
; cpatch - fix to clear line...modified 901227-03
; prevents white character flash...
cpatch ;always clear to current foregnd color
lda color
sta (user),y
rts

.segment "SE4D3" ;(38-7)
; prtyp - rs232 parity patch...added 901227-03
;
prtyp sta rinone ;good receiver start...disable flag
lda #1 ;set parity to 1 always
sta riprty
rts

@@ -1,7 +1,7 @@
.feature labels_without_colons, pc_assignment

.include "declare.s"
.segment "SE500" ;start of vic-40 kernal
.segment "KERNAL" ;start of vic-40 kernal
.include "editor.1.s"
.include "editor.2.s"
.include "editor.3.s"
@@ -26,5 +26,6 @@
.include "init.s"
.include "rs232nmi.s"
.include "irqfile.s"
.include "patches.s"
.include "vectors.s"

@@ -0,0 +1,39 @@
.segment "KPATCH"
; prtyp - rs232 parity patch...added 901227-03
;
prtyp sta rinone ;good receiver start...disable flag
lda #1 ;set parity to 1 always
sta riprty
rts

; cpatch - fix to clear line...modified 901227-03
; prevents white character flash...
cpatch ;always clear to current foregnd color
lda color
sta (user),y
rts

; fpatch - tape filename timeout
;
fpatch adc #2 ;time is (8 to 13 sec of display)
fpat00 ldy stkey ;check for key down on last row...
iny
bne fpat01 ;key...exit loop
cmp time+1 ;watch timer
bne fpat00
fpat01 rts

;
; baudop - baud rate table for pal
; .985248e6/baud-rate/2-100
;
baudop .word 9853-cbit ;50 baud
.word 6568-cbit ;75 baud
.word 4478-cbit ;110 baus
.word 3660-cbit ;134.6 baud
.word 3284-cbit ;150 baud
.word 1642-cbit ;300 baud
.word 821-cbit ;600 baud
.word 411-cbit ;1200 baud
.word 274-cbit ;1800 baud
.word 205-cbit ;2400 baud
@@ -1,11 +1,15 @@
.segment "SFF81"
.segment "JMPTBL"

;KERNAL revision
.byte 3

jmp pcint
jmp ioinit
jmp ramtas
.segment "SFF8A";new vectors for basic

jmp restor ;restore vectors to initial system
jmp vector ;change vectors for user
.segment "SFF90"

jmp setmsg ;control o.s. messages
jmp secnd ;send sa after listen
jmp tksa ;send sa after talk
@@ -41,7 +45,10 @@ jscrog jmp scrorg ;screen org
jplot jmp plot ;read/set x,y coord
jiobas jmp iobase ;return i/o base

.segment "SFFFA"
;signature
.byte "RRBY"

.segment "VECTORS"
.word nmi ;program defineable
.word start ;initialization code
.word puls ;interrupt handler

0 comments on commit 4bc08d2

Please sign in to comment.
You can’t perform that action at this time.