Mercurial > hg > Members > kono > nitros9-code
changeset 238:d6c4f9985571
We can now build a Dragon 64 kernel
author | roug |
---|---|
date | Thu, 18 Jul 2002 19:46:07 +0000 |
parents | 6a8f855fb173 |
children | 8b71b12c468f |
files | level1/modules/boot_d64.asm level1/modules/co32.hp level1/modules/makefile |
diffstat | 3 files changed, 240 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/level1/modules/boot_d64.asm Thu Jul 18 19:46:07 2002 +0000 @@ -0,0 +1,233 @@ +******************************************************************** +* progname - program module +* +* $Id$ +* +* Ed. Comments Who YY/MM/DD +* ------------------------------------------------------------------ +* - Original Dragon Data distribution version +* +* $Log$ +* Revision 1.1 2002/07/18 19:46:07 roug +* We can now build a Dragon 64 kernel +* +* Revision 1.1 2002/04/21 21:27:50 roug +* These are the kernel modules from Dragon 64's OS9Boot. +* OS9 and OS9p2 are older than what's in ../MODULES so I checked them +* in as well. +* +* + + nam Boot + ttl os9 system module + +* Disassembled 02/04/21 22:37:43 by Disasm v1.6 (C) 1988 by RML + + ifp1 + use defsfile + endc +tylg set Systm+Objct +atrv set ReEnt+rev +rev set $01 +edition set 1 + mod eom,name,tylg,atrv,start,size +u0000 rmb 2 +u0002 rmb 1 +u0003 rmb 1 +u0004 rmb 1 +size equ . +name equ * + fcs /Boot/ + fcb edition + +* First, we make a stack... +start clra + ldb #size +MakeStak pshs a + decb + bne MakeStak + + tfr s,u + ldx #$FF40 +u001F lda #$D0 +u0021 sta ,x +u0023 lbsr L0178 + lda ,x + lda >$FF22 + lda #$FF + sta u0004,u + leax >L0105,pcr + stx >$010A + lda #$7E + sta >$0109 + lda #$04 + sta >$FF48 + +* delay loop +u0040 ldd #$C350 +L0043 nop + nop + subd #$0001 +u0048 bne L0043 + + pshs u,x,b,a + clra + clrb + ldy #$0001 + ldx <u001F+1 + ldu <u0021+1 + os9 F$SchBit + bcs L009C + exg a,b + ldu $04,s + std u0002,u + clrb +* go get LSN0 + ldx #$0000 + bsr L00B9 + bcs L009C + +* get bootfile size from LSN0 and allocate memory for it + ldd <$18,y + std ,s + os9 F$SRqMem + bcs L009C + stu $02,s + ldu $04,s + ldx $02,s + stx u0002,u + ldx <$16,y + ldd <$18,y + beq L0095 + +* this loop reads a sector at a time from the bootfile +L0083 pshs x,b,a + clrb + bsr L00B9 + bcs L009A + puls x,b,a + inc u0002,u + leax $01,x + subd #$0100 + bhi L0083 +L0095 clrb + puls b,a + bra L009E +L009A leas $04,s +L009C leas $02,s +L009E puls u,x + leas $05,s + rts +L00A3 clr ,u + clr u0004,u + lda #$05 +L00A9 ldb #$43 + pshs a + bsr L00B6 + puls a + deca + bne L00A9 + ldb #$03 +L00B6 lbra L0164 +L00B9 lda #$91 + cmpx #$0000 + bne L00D1 + bsr L00D1 + bcs L00C8 + ldy u0002,u + clrb +L00C8 rts + +L00C9 bcc L00D1 + pshs x,b,a + bsr L00A3 + puls x,b,a +L00D1 pshs x,b,a + bsr L00DC + puls x,b,a + bcc L00C8 + lsra + bne L00C9 +L00DC bsr L011B + bcs L00C8 + ldx u0002,u + orcc #$50 + pshs y,dp,cc + lda #$FF + tfr a,dp + lda #$34 + sta <u0003 + lda #$37 + sta <u0023 + lda <u0021+1 + ldb #$88 + stb <u0040 + ldb #$24 + stb <u0048 +L00FC sync + lda <L0043 + ldb <u0021+1 + sta ,x+ + bra L00FC +L0105 leas $0C,s + lda #$04 + sta <u0048 + lda #$34 + sta <u0023 + ldb <u0040 + puls y,dp,cc + bitb #$04 + beq L015E +L0117 comb + ldb #$F4 + rts +L011B clr ,u + tfr x,d + cmpd #$0000 + beq L0134 + clr ,-s + bra L012B +L0129 inc ,s +L012B subd #$0012 + bcc L0129 + addb #$12 + puls a +L0134 incb +L0135 stb >$FF42 + bsr L0178 + cmpb >$FF42 + bne L0135 + ldb u0004,u + stb >$FF41 + cmpa u0004,u + beq L015C + sta u0004,u + sta >$FF43 + ldb #$13 + bsr L0164 + pshs x + ldx #$222E +L0156 leax -$01,x + bne L0156 + puls x +L015C clrb + rts +L015E bitb #$98 + bne L0117 + clrb + rts +L0164 bsr L0176 +L0166 ldb >$FF40 + lsrb + bcs L0166 + rts +L016D lda #$04 + sta >$FF48 + stb >$FF40 + rts +L0176 bsr L016D +L0178 lbsr L017B +L017B lbsr L017E +L017E rts + emod +eom equ *
--- a/level1/modules/co32.hp Wed Jul 17 15:23:28 2002 +0000 +++ b/level1/modules/co32.hp Thu Jul 18 19:46:07 2002 +0000 @@ -1,3 +1,1 @@ -CO32 - I/O Subroutine Module - to handle 32 column text - output to television. +CO32 - I/O Subroutine Module to handle 32 column text output to television. \ No newline at end of file
--- a/level1/modules/makefile Wed Jul 17 15:23:28 2002 +0000 +++ b/level1/modules/makefile Thu Jul 18 19:46:07 2002 +0000 @@ -3,7 +3,7 @@ DEPENDS = ./Makefile TPB = ../../3rdparty/booters -BOOTERS = oscode oscode_d64 boot_1773 $(TPB)/boot_rom_l1 rom_vectors +BOOTERS = oscode oscode_d64 boot_1773 boot_d64 $(TPB)/boot_rom_l1 rom_vectors KERNELS = os9 os9p2 SYSMODS = rominfo ioman init CLOCKS = clock.60hz clock.50hz @@ -20,6 +20,7 @@ ssc.hp t1.hp t2.hp t3.hp term32.hp term80.hp config.hp KERNEL_1773 = oscode os9 os9p2 init boot_1773 +KERNEL_D64 = oscode_d64 os9 os9p2 init boot_d64 KERNEL_ROM = oscode os9 os9p2 init $(TPB)/boot_rom_l1 BOOT_TRACKS = kernel_1773 kernel_rom @@ -39,6 +40,10 @@ $(MERGE) $(KERNEL_1773)>$@ $(PADROM) \$$1200 $@ -c=\$$E5 +kernel_d64: $(KERNEL_D64) $(DEPENDS) + $(MERGE) $(KERNEL_D64)>$@ + $(PADROM) \$$1000 $@ -c=\$$E5 + oscode: oscode.asm $(AS) $(AFLAGS) $(ASOUT)$@ $< -aDragon64=0