# HG changeset patch # User roug # Date 1025989148 0 # Node ID 9c16042bc3827cfb55dc041fd033ce1d08aab728 # Parent b381d07d9b78becf7dcd54ce229c0ae76cb283d1 Disassembled the COCO version of os9gen diff -r b381d07d9b78 -r 9c16042bc382 level1/cmds/os9gen_cc.asm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/level1/cmds/os9gen_cc.asm Sat Jul 06 20:59:08 2002 +0000 @@ -0,0 +1,467 @@ +******************************************************************** +* OS9gen - Build and Link a Bootstrap File +* +* $Id$ +* +* Ed. Comments Who YY/MM/DD +* ------------------------------------------------------------------ +* 7 Original Tandy distribution version +* +* OS9gen is hardware dependent. On COCO the track to write is 34 + + nam OS9gen + ttl Build and Link a Bootstrap File + +* Disassembled 02/07/06 22:40:22 by Disasm v1.6 (C) 1988 by RML + + ifp1 + use defsfile + endc +tylg set Prgrm+Objct +atrv set ReEnt+rev +rev set $01 + mod eom,name,tylg,atrv,start,size +u0000 rmb 2 +u0002 rmb 1 +u0003 rmb 1 +u0004 rmb 1 +u0005 rmb 1 +u0006 rmb 2 +u0008 rmb 1 +u0009 rmb 2 +u000B rmb 2 +u000D rmb 2 +u000F rmb 2 +u0011 rmb 2 +u0013 rmb 7 +u001A rmb 3 +u001D rmb 17 +u002E rmb 2 +u0030 rmb 10 +u003A rmb 2 +u003C rmb 1 +u003D rmb 451 +u0200 rmb 16 +u0210 rmb 1 +u0211 rmb 7 +u0218 rmb 1000 +size equ . +name equ * + fcs /OS9gen/ + fcb $07 +L0014 fcb C$LF + fcc "Use (CAUTION): OS9GEN [-s]" + fcb C$LF + fcc " ..reads (std input) pathnames until EOF," + fcb C$LF + fcc " merging paths into New OS9Boot file." + fcb C$LF + fcc " -s = single drive operation" + fcb C$LF + fcb C$CR + fcc "Can't find: " +L00B7 fcb C$LF + fcc "Error writing kernel track" + fcb C$CR +L00D3 fcb C$LF + fcc "Error - cannot gen to hard disk" + fcb C$CR +L00F4 fcb C$CR +L00F5 fcb $07 +L00F6 fcb C$LF + fcc "Warning - file(s) present" + fcb C$LF + fcc "on track 34 - this track" + fcb C$LF + fcc "not rewritten." + fcb C$CR +L0139 fcb C$LF + fcc "Error - OS9boot file fragmented" + fcb C$CR +L015A fcc "Ready SOURCE, hit C to continue: " +L017B fcc "Ready DESTINATION, hit C to continue: " +L01A1 fcc "RENAME " +L01A8 fcc "TempBoot " + fcb $FF +L01B2 fcc "OS9Boot" + fcb C$CR + fcb $FF + +start equ * + clrb + stb u0200,u + pshs u + tfr y,d + subd ,s++ + subd #$0200 + clrb + std L00D3,pcr + lbra L0507 +L024D ldx L01A8,pcr + lda #$2F +L0255 sta ,x+ + lda ,y+ + bpl L0255 + leay >L01B2,pcr +L025F lda ,y+ + sta ,x+ + bpl L025F + tfr x,d + leax u0200,u + ldy #$0400 + os9 I$ReadLn + bcs L0322 + lda ,x + ldb #$D3 + cmpa #$0D + beq L0322 + lda #$01 + os9 I$Open + bcs L0310 + sta u0200,u + ldy #$0100 + os9 I$Read + lbcs L0514 +L02DD lda #$00 + lbsr L0517 +L02E2 lda u0200,u + ldy u0200,u + ldy #$0100 + lda #$02 + os9 I$WritLn +L031F lbra L0514 +L0322 cmpb #$D3 + bne L031F + lda #$01 + lbsr L0517 + leax u0200,u + ldy #$0100 + os9 I$Read + lbcs L0514 + ldd >u0218,u + lbne L0577 + lda L01B2,pcr + lda #$2F +L03A7 sta ,x+ + lda ,y+ + bpl L03A7 + leax L01A8,pcr + lda #$2F +L03BB sta ,x+ + lda ,y+ + bpl L03BB +L03C1 tst L01A1,pcr + os9 F$Load + lbcs L0514 + tfr u,d + ldu L01A1,pcr + ldy u0210,u + stb u0211,u + std u0200,u + ldy #$0100 + os9 I$Read + lbcs L0507 + leax >u0200,u + lda <$4C,x + bita #$0F + beq L04AE + lda u0200,u + ldy #$0064 + os9 I$Write + bcs L0507 + pshs u + ldx #$0002 + ldu #$6400 + os9 I$Seek + puls u + ldx #$EF00 + ldy #$0F80 + os9 I$Write + bcs L04FC + os9 I$Close + bcs L0503 + clrb + bra L0514 +L04FC leax >L00B7,pcr + clrb + bra L0507 +L0503 leax >L0014,pcr +L0507 pshs b + lda #$02 + ldy #$0100 + os9 I$WritLn + puls b +L0514 os9 F$Exit +L0517 tst L015A,pcr + ldy #$0021 + bra L0534 +L052C leax >L017B,pcr + ldy #$0026 +L0534 bsr L0560 + leax ,-s + ldy #$0001 + lda #$02 + os9 I$Read + lda ,s+ + eora #$43 + anda #$DF + beq L0559 + leax >L00F5,pcr + ldy #$0001 + bsr L0560 + bsr L0566 + puls a + bne L051D +L0559 bsr L0566 + puls a + puls y,x +L055F rts +L0560 lda #$01 + os9 I$WritLn + rts +L0566 pshs y,x,a + lda #$01 + leax >L00F4,pcr + ldy #$0050 + os9 I$WritLn + puls pc,y,x,a +L0577 leax >L0139,pcr + clrb + bra L0507 +L057E pshs u + lda L00F6,pcr + clrb + lbra L0507 + emod +eom equ *