                    /Midas one pass patch

ps5555=ps5

gtch=175363
6265/	jda hack
7650/
hack,	0
	jmp i .+1
	hack1 i
hack2,	gtch
	jmp i .+1
	hack3 i

27400/
0
hack1|	dac hack4
	lac i (pss
	sza
	jmp pa2
pa1,	jmp i (hack2
hack3|	dio chara
	szs 10
	jmp hack4-1
	lac (and i
	dac pa2i
	dac pa2o
	lac (jmp pa2 1
	dac pa2
	law 300-17
	dac obp
	lac bip
	sma
	jmp hack5
	law i 777
	and i bip
	ior chara
	dac i bip
incccc,	lac (add
	adm bip
	sad (37400
	jmp unload
hack6,	clo
	lac hack4
	add hack4
	lac i (hack
	lio chara
	esm
	jmp i .+1
hack4,	0
hack5,	rcr 9s
	jmp incccc-1

       
                                        unload,	lac (and i
	dac bip
	dac bop
	law 17
	adm bno
	jda posit
	law i 17
	dac bkcnr
	dzm cksum
unloa2,	lio (43 i
	mse
	mlc
unloa1,	jsp datafg
	jmp wcksum
	lio i bop
	mwr
	rcl 9s
	rcl 9s
	cma
	adm cksum
	idx bop
	jmp unloa1
wcksum,	lio cksum
	mwr
	isp bkcnr
	jmp unloa2-1
	lac bop
	sas (37400
prglos,	hlt>>05<<stf 7
wcksux,	jmp hack7
bno,	300-17
hack7,	cli
	law i 20
	dac cksum
	isp cksum
	jmp .-1
	mlc
	jmp hack6
datafg,	dap datax
	mrs
	spi
	jmp ret
	ril 1
	spi
datax,	jmp .
	ril 7s
	spi
	jsp err
	jmp datafg+1
ret,	idx datax
	xct datax

readsm,	mrd
	rcl 9s
	rcl 9s
	add cksum
	sza
	jsp err
	isp pa2r
	jmp readan
	cli
	mlc
	lac (and i
	dac pa2i
	dac pa2o
getfcr,	law .+2
	dap pa2
	jsp getchr
	dio chara
	sas (37400
	jmp hack6
	law reload
	dap pa2
	jmp hack6

       
x                                        
getchr,	dap getchx
	lac (and i
	dac bip
	dac bop
	law 300-17
	dac bno
	law hack7
	dap wcksux
	lio pa2o
foosh,	lac i pa2o
	spi
	ral 9s
	cli
	rcl 9s
	lac (add
	adm pa2o
getchx,	jmp .

pa2,	jmp .+1
	law 300-17
	sad bno
	jmp getfcr
	law .+3
	dap wcksux
	jmp unload
reload,	law 17
	adm obp
	jda posit
	law i 17
	dac pa2r
readan,	dzm cksum
	lio (42
	mlc
	jsp datafg
	hlt
	mrd
pa21,	jsp datafg
	jmp readsm
	mrd
	dio i pa2i
	idx pa2i
	rcl 9s
	rcl 9s
	adm cksum
	jmp pa21

obp,	300-17
pa2i,	30000
pa2o,	30000
bkcnr,	0
cksum,	0
pa2r,	0
posit,	0
	dap positx
	lac pos3+1
	dac cksum
	isp cksum
	jmp .-1
	lsm
	lio foosh
	mse
posit1,	cla
	lio pos3
	dap positx-1
	mlc
	jsp datafg
	hlt
	mrd
	cla
pos4,	rcr 741
	rcr 7s
pos3,	rar 761
	sub posit
	sza i
positx,	jmp .
	sma
	jmp posit1
	law sza-skp
	lio pos4
	jmp posit1 2
bip,	30000
bop,	30000
err,	dap erxxxx
	hlt
erxxxx,	jmp .
chara,	0

zzzz=.+and
27300/
in9999,	37400
out999,	27400
beginn|	eem
	lac i out999
	dac i in9999
	idx in9999
	idx out999
	sas (27776
	jmp .-5
	jmp i .+1
	ps5555

zzzz/

constants
0/
	eem
	jmp i . 1
	beginn

start
       
4                                                                                                                                                       
