Mercurial > hg > Members > kono > nitros9-code
changeset 2824:1647f1874cdf lwtools-port
Added Kreidier C library
line wrap: on
line diff
--- a/level1/cmds/inetd.as Wed May 22 20:05:20 2013 -0500 +++ b/level1/cmds/inetd.as Thu May 23 05:49:13 2013 -0500 @@ -47,7 +47,6 @@ tmodeparams rmb 128 endsect -* psect inetd_a,$01,$80,1,200,start section code DEBUG equ 1
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/Makefile.old Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,34 @@ +AS = rma + +%.r: %.a + $(AS) $(ASFLAGS) $< -O=$@ + +SRCFILES = prof.r pwent.r getopt.r adump.r defdrive.r popen.r swab.r\ + pwcryp.r bsearch.r dirutil.r errmsg.r rgname.r datmods.r\ + utime.r devtyp.r skip.r sets.r pflinit.r pffinit.r fopen.r\ + puts.r gets.r mktemp.r fread.r fwrite.r printf.r scanf.r\ + setbuf.r fseek.r putc.r ftelldummy.r getc.r fflush.r setbase.r\ + findstr.r pfldummy.r pffdummy.r htoi.r htol.r ltoa.r xtoa.r\ + system.r reverse.r strings.r strcmp.r strlen.r strncpy.r\ + strncat.r strncmp.r strhcpy.r strtok.r strpbrk.r strspn.r index.r\ + patmatch.r stringsu.r strucmp.r strnucmp.r case.r strclr.r\ + memccpy.r memchr.r memcmp.r memcpy.r memset.r atol.r atoi.r\ + iobata_a.r chcodes.r l3tol.r ltol3.r qsort.r sleep.r setjmp.r\ + strass.r realloc.r calloc.r memory.r rand.r atof.r scale.r\ + gs1.r gs2.r ss1.r ss2.r ss3.r dtrig.r hyp.r log.r trnser.r\ + dsqrt.r dinc.r dtype.r dmul.r ddiv.r daddsub.r dser.r dcmpr.r\ + abs.r minmax.r uminmax.r clmul.r cldiv.r claddsub.r clcompare.r\ + clbits.r clnegcompl.r clconvert.r clmove.r clincdec.r clshifts.r\ + clcommon.r ccmult.r ccmod.r ccdiv.r cshifts.r rpterr.r abort.r\ + signal.r chown.r chmod.r stat.r access.r create.r open.r read.r\ + write.r lseek.r misc.r mod.r dir.r mem.r time.r process.r id.r\ + intercept.r syscall.r syscommon.r cfinish.r profdummy.r tidyup.r + +clib.l: $(SRCFILES) + @cat $(SRCFILES) >clib.l + @echo didit + +$(SRCFILES): + +clean: + rm -f *.r clib.l
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/_prgname.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,16 @@ +* Disassembly by Os9disasm of _prgname.r + + section code + +_prgname: leax btext,pcr + ldd 2,x + leax d,x + leax -4,x +L000a lda ,-x + bne L000a + leax 1,x + tfr x,d + rts + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/abort.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,62 @@ +* Disassembly by Os9disasm of abort.r + + section code + +* OS-9 system function equates + +F$Exit equ $06 +I$Write equ $8a + +abort: pshs d,x,y,u + leax >L0048,pcr + ldb #3 + clra + pshs d + pshs x + lbsr creat + cmpd #-1 + bne L001d + ldd errno,y + os9 F$Exit +L001d leas 4,s + pshs b + leax 1,s + ldd #$0010 + bsr L004e + leax _cstart,pcr + ldd #etext + subd #_cstart + bsr L004e + tfr dp,a + clrb + tfr d,x + subd memend,x + nega + negb + sbca #0 + bsr L004e + ldb #255 + os9 F$Exit +L0048 com 15,s + fcb $72 + fcb $65 + bra L005b +L004e pshs d,x + lda 6,s + leax 2,s + ldy #2 + os9 I$Write +L005b leax ,s + lda 6,s + ldy #2 + os9 I$Write + puls y + puls x + cmpy #0 + beq L0075 + lda 2,s + os9 I$Write +L0075 rts + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/abs.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,13 @@ +* Disassembly by Os9disasm of abs.r + + section code + +abs: ldd 2,s + bpl L0008 + nega + negb + sbca #0 +L0008 rts + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/access.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,37 @@ +* Disassembly by Os9disasm of access.r + + section code + +* OS-9 system function equates + +I$Dup equ $82 +I$Open equ $84 +I$MakDir equ $85 +I$Close equ $8f +I$DeletX equ $90 + +access: ldx 2,s + lda 5,s + os9 I$Open + bcs L000c + os9 I$Close +L000c lbra _sysret +mknod: ldx 2,s + ldb 5,s + os9 I$MakDir + lbra _sysret +unlinkx: lda 5,s + bra L001f +unlink: lda #2 +L001f ldx 2,s + os9 I$DeletX + lbra _sysret +dup: lda 3,s + os9 I$Dup + lblo _os9err + tfr a,b + clra + rts + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/adump.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,257 @@ +* Disassembly by Os9disasm of adump.r + + section code + +* class X standard named label equates + +D.Tasks equ $0020 + +* class D external label equates + +D0000 equ $0000 +D000d equ $000d +D0020 equ $0020 + +_dump: pshs u + leas -5,s + ldd 9,s + pshs d + leax L0192,pcr + pshs x + leax _iob+26,y + pshs x + lbsr fprintf + leas 6,s + leax L0197,pcr + pshs x + leax _iob+26,y + pshs x + lbsr fprintf + leas 4,s + clra + clrb + std 2,s + ldu 11,s + bra L005a +L0032 stu ,s + tfr u,d + clra + andb #$0f + pshs d + leax L019e,pcr + pshs x + leax _iob+26,y + pshs x + lbsr fprintf + leas 6,s + ldd 2,s + addd #1 + std 2,s + subd #1 + tfr u,d + leau 1,u +L005a ldd 2,s + cmpd #$0010 + blt L0032 + leax L01a4,pcr + pshs x + leax _iob+26,y + pshs x + lbsr fprintf + leas 4,s + clra + clrb + std 2,s + ldu 11,s + bra L00a3 +L007b stu ,s + tfr u,d + clra + andb #$0f + pshs d + leax L01a6,pcr + pshs x + leax _iob+26,y + pshs x + lbsr fprintf + leas 6,s + ldd 2,s + addd #1 + std 2,s + subd #1 + tfr u,d + leau 1,u +L00a3 ldd 2,s + cmpd #$0010 + blt L007b + leax _iob+26,y + pshs x + ldd #$000d + pshs d + lbsr putc + leas 4,s + leax L01aa,pcr + pshs x + leax _iob+26,y + pshs x + lbsr fprintf + leas 4,s + lbra L0178 +L00cf ldd 11,s + pshs d + leax L01f3,pcr + pshs x + leax _iob+26,y + pshs x + lbsr fprintf + leas 6,s + clra + clrb + std 2,s + ldu 11,s + bra L0109 +L00ec ldb ,u+ + clra + pshs d + leax L01fa,pcr + pshs x + leax _iob+26,y + pshs x + lbsr fprintf + leas 6,s + ldd 2,s + addd #1 + std 2,s +L0109 ldd 2,s + cmpd #$0010 + blt L00ec + leax L0200,pcr + pshs x + leax _iob+26,y + pshs x + lbsr fprintf + leas 4,s + clra + clrb + std 2,s + ldu 11,s + bra L0157 +L012a ldb ,u+ + clra + andb #$7f + stb 4,s + cmpb #$20 + blt L013a + ldb 4,s + sex + bra L013d +L013a ldd #$002e +L013d pshs d + leax L0202,pcr + pshs x + leax _iob+26,y + pshs x + lbsr fprintf + leas 6,s + ldd 2,s + addd #1 + std 2,s +L0157 ldd 2,s + cmpd #$0010 + blt L012a + leax _iob+26,y + pshs x + ldd #$000d + pshs d + lbsr putc + leas 4,s + stu 11,s + ldd 13,s + subd #$0010 + std 13,s +L0178 ldd 13,s + lbgt L00cf + leax _iob+26,y + pshs x + ldd #$000d + pshs d + lbsr putc + leas 4,s + leas 5,s + puls u,pc +*L0192 bcs L0207 +* tst D000d +* neg D0020 +*L0197 equ *-1 +* bra L01ba +* bra L01bc +* bra L019e +*L019e bra L01c5 +* leay -8,s +* bra L01a4 +*L01a4 bra L01a6 +*L01a6 bcs L01d9 +* asl D.Tasks +*L01aa equ *-1 +* bra L01cd +* bra L01cf +* bra L01de +* blt L01d3 +* blt L01e2 +* bra L01e4 +* blt L01d9 +* blt L01e8 +*L01ba equ *-1 +* bra L01ea +*L01bc equ *-1 +* blt L01df +* blt L01ee +* bra L01f0 +* blt L01e5 +*L01c5 blt L01f4 +* bra L01f6 +* blt L01eb +* blt L01fa +*L01cd bra L01fc +*L01cf blt L01f1 +* blt L0200 +*L01d3 bra L0202 +* blt L01f7 +* blt L0206 +*L01d9 bra L0208 +* blt L01fd +* blt L020c +*L01de equ *-1 +*L01df bra L0201 +* blt L0210 +*L01e2 equ *-1 +* blt L0212 +*L01e4 equ *-1 +*L01e5 blt L0214 +* blt L0216 +*L01e8 equ *-1 +* blt L0218 +L01ea equ *-1 +*L01eb blt L021a +* blt L021c +*L01ee equ *-1 +* blt L021e +*L01f0 equ *-1 +*L01f1 tst D0000 +*L01f3 bcs L0225 +*L01f4 equ *-1 +* pshs dp,x,y,u +*L01f6 equ *-1 +*L01f7 abx +* bra L01fa +*L01fa bcs L022c +*L01fc leas -8,s +*L01fd equ *-1 +* bra L0200 +*L0200 bra L0202 +*L0201 equ *-1 +*L0202 bcs L0267 +* fcb $00 +* + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/atof.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,184 @@ +* Disassembly by Os9disasm of atof.r + + section code + +atof: pshs u + ldu 4,s + ldb #$10 + clra +L0007 pshs a + decb + bne L0007 +L000c ldb ,u+ + cmpb #$20 + beq L000c + cmpb #9 + beq L000c + cmpb #$2d + bne L001e + inc 4,s + bra L002a +L001e cmpb #$2b + beq L002a + bra L002c +L0024 sex + leax 8,s + lbsr L00e4 +L002a ldb ,u+ +L002c cmpb #$30 + blt L0034 + cmpb #$39 + ble L0024 +L0034 cmpb #$2e + beq L0042 + bra L004c +L003a sex + leax 8,s + lbsr L00e4 + inc 1,s +L0042 ldb ,u+ + cmpb #$30 + blt L004c + cmpb #$39 + ble L003a +L004c leax 8,s + ldb #$b8 + stb 7,x + pshs x + pshs x + lbsr _dnorm + leas 2,s + lbsr _dmove + ldb -1,u + cmpb #$65 + beq L0068 + cmpb #$45 + bne L00a1 +L0068 inc 2,s + ldb ,u+ + cmpb #$2b + beq L0089 + cmpb #$2d + bne L008b + clr 2,s + bra L0089 +L0078 sex + pshs d + ldd 8,s + pshs d + ldd #$000a + lbsr ccmult + addd ,s++ + std 6,s +L0089 ldb ,u+ +L008b subb #$30 + bcs L0093 + cmpb #9 + ble L0078 +L0093 ldd 6,s + tst 2,s + beq L009d + nega + negb + sbca #0 +L009d addd ,s + std ,s +L00a1 clr 2,s + ldd ,s + bge L00b2 + nega + negb + sbca #0 + std ,s + ldd #1 + std 2,s +L00b2 leax 8,s + ldd 2,s + pshs d,x + ldd 4,s + pshs d + leax 14,s + lbsr _dstack + lbsr scale + leas 12,s + lbsr _dmove + ldd 4,s + beq L00d4 + leax 8,s + lbsr _dneg + bra L00d6 +L00d4 leax 8,s +L00d6 leau _flacc,y + pshs u + lbsr _dmove + leas 16,s + puls u,pc +L00e4 pshs d + leas -8,s + ldd 5,x + lslb + rola + std 5,x + std 5,s + ldd 3,x + rolb + rola + std 3,x + std 3,s + ldd 1,x + rolb + rola + std 1,x + std 1,s + lda ,x + rola + sta ,x + sta ,s + asl 6,x + rol 5,x + rol 4,x + rol 3,x + rol 2,x + rol 1,x + rol ,x + asl 6,x + rol 5,x + rol 4,x + rol 3,x + rol 2,x + rol 1,x + rol ,x + ldd 5,x + addd 5,s + std 5,x + ldd 3,x + adcb 4,s + adca 3,s + std 3,x + ldd 1,x + adcb 2,s + adca 1,s + std 1,x + ldb ,x + adcb ,s + stb ,x + ldd 8,s + andb #$0f + addd 5,x + std 5,x + ldd #0 + adcb 4,x + adca 3,x + std 3,x + ldd #0 + adcb 2,x + adca 1,x + std 1,x + lda #0 + adca ,x + sta ,x + leas 10,s + rts + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/atoi.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,51 @@ +* Disassembly by Os9disasm of atoi.r + + section code + +atoi: pshs u + ldu 4,s + clra + clrb + pshs d + pshs b +L000a ldb ,u+ + cmpb #$20 + beq L000a + cmpb #9 + beq L000a + cmpb #$2d + bne L001c + stb ,s + bra L0037 +L001c cmpb #$2b + bne L0039 + bra L0037 +L0022 ldd 1,s + lslb + rola + lslb + rola + addd 1,s + lslb + rola + pshs d + ldb -1,u + clra + subb #$30 + addd ,s++ + std 1,s +L0037 ldb ,u+ +L0039 cmpb #$30 + bcs L0041 + cmpb #$39 + bls L0022 +L0041 tst ,s+ + puls d + beq L004b + nega + negb + sbca #0 +L004b puls u,pc + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/atol.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,65 @@ +* Disassembly by Os9disasm of atol.r + + section code + +* class D external label equates + +D0000 equ $0000 +D000a equ $000a + +atol: pshs u + ldu 4,s + clra + clrb + pshs b + pshs d + pshs d +L000c ldb ,u+ + cmpb #$20 + beq L000c + cmpb #9 + beq L000c + cmpb #$2d + bne L001e + stb 4,s + bra L0045 +L001e cmpb #$2b + bne L0047 + bra L0045 +L0024 ldd 2,s + pshs d + ldd 2,s + pshs d + leax >L006c,pcr + lbsr _lmul + ldb -1,u + clra + subb #$30 + addd 2,x + std 2,s + ldd #0 + adcb 1,x + adca ,x + std ,s +L0045 ldb ,u+ +L0047 clra + leax _chcodes,y + ldb d,x + andb #8 + bne L0024 + tst 4,s + beq L005d + leax ,s + lbsr _lneg + bra L005f +L005d leax ,s +L005f leau _flacc,y + pshs u + lbsr _lmove + leas 5,s + puls u,pc +L006c neg D0000 + neg D000a + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/bsearch.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,43 @@ +* Disassembly by Os9disasm of bsearch.r + + section code + +bsearch: pshs d,x,y,u + ldu 10,s + clra + clrb +L0006 addd #1 + std 2,s + ldd 14,s +L000d subd 2,s + bmi L003d + ldd 14,s + addd 2,s + lsra + rorb + std 4,s + addd #-1 + pshs d + ldd 18,s + lbsr ccmult + addd 12,s + std ,s + pshs u + jsr [20,s] + std ,s++ + beq L0041 + asla + ldd 4,s + bcc L0006 + addd #-1 + std 14,s + bra L000d +L003d clra + clrb + bra L0043 +L0041 ldd ,s +L0043 leas 6,s + puls u,pc + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/calloc.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,23 @@ +* Disassembly by Os9disasm of calloc.r + + section code + +calloc: pshs u + ldd 4,s + ldx 6,s + pshs x + lbsr ccmult + pshs d + lbsr malloc + std -2,s + beq L001e + ldx ,s + tfr d,u +L0018 clr ,u+ + leax -1,x + bne L0018 +L001e leas 2,s + puls u,pc + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/case.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,27 @@ +* Disassembly by Os9disasm of case.r + + section code + +toupper: clra + ldb 3,s + leax _chcodes,y + lda d,x + anda #4 + beq L0022 + andb #$df + clra + rts +tolower: clra + ldb 3,s + leax _chcodes,y + lda d,x + anda #2 + beq L0022 + orb #$20 + clra + rts +L0022 ldd 2,s + rts + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/ccdiv.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,75 @@ +* Disassembly by Os9disasm of ccdiv.r + + section code + +ccudiv: subd #0 + beq L000f + pshs d + leas -2,s + clr ,s + clr 1,s + bra L003d +L000f puls d + std ,s + ldd #$002d + lbra _rpterr +ccdiv: subd #0 + beq L000f + pshs d + leas -2,s + clr ,s + clr 1,s + tsta + bpl L0031 + nega + negb + sbca #0 + com 1,s + std 2,s +L0031 ldd 6,s + bpl L003d + nega + negb + sbca #0 + com 1,s + std 6,s +L003d lda #1 +L003f inca + asl 3,s + rol 2,s + bpl L003f + sta ,s + ldd 6,s + clr 6,s + clr 7,s +L004e subd 2,s + bcc L0058 + addd 2,s + andcc #254 + bra L005a +L0058 orcc #1 +L005a rol 7,s + rol 6,s + lsr 2,s + ror 3,s + dec ,s + bne L004e + std 2,s + tst 1,s + beq L0074 + ldd 6,s + nega + negb + sbca #0 + std 6,s +L0074 ldx 4,s + ldd 6,s + std 4,s + stx 6,s + ldx 2,s + ldd 4,s + leas 6,s + rts + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/ccmod.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,44 @@ +* Disassembly by Os9disasm of ccmod.r + + section bss + +* Uninitialized data (class B) +B0000 rmb 1 +B0001 rmb 2 +* Initialized Data (class G) + + endsect + + section code + +ccumod: clr B0000,y + leax ccudiv,pcr + stx B0001,y + bra L0022 +ccmod: leax ccdiv,pcr + stx B0001,y + clr B0000,y + tst 2,s + bpl L0022 + inc B0000,y +L0022 subd #0 + bne L002d + puls x + ldd ,s++ + jmp ,x +L002d ldx 2,s + pshs x + jsr [B0001,y] + ldd ,s + std 2,s + tfr x,d + tst B0000,y + beq L0045 + nega + negb + sbca #0 +L0045 std ,s++ + rts + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/ccmult.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,51 @@ +* Disassembly by Os9disasm of ccmult.r + + section code + +ccmult: tsta + bne L0015 + tst 2,s + bne L0015 + lda 3,s + mul + ldx ,s + stx 2,s + ldx #0 + std ,s + puls d,pc +L0015 pshs d + ldd #0 + pshs d + pshs d + lda 5,s + ldb 9,s + mul + std 2,s + lda 5,s + ldb 8,s + mul + addd 1,s + std 1,s + bcc L0032 + inc ,s +L0032 lda 4,s + ldb 9,s + mul + addd 1,s + std 1,s + bcc L003f + inc ,s +L003f lda 4,s + ldb 8,s + mul + addd ,s + std ,s + ldx 6,s + stx 8,s + ldx ,s + ldd 2,s + leas 8,s + rts + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/cfinish.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,15 @@ +* Disassembly by Os9disasm of cfinish.r + + section code + +* OS-9 system function equates + +F$Exit equ $06 + +exit: lbsr _dumprof + lbsr _tidyup +_exit: ldd 2,s + os9 F$Exit + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/cfloats.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,818 @@ +* Disassembly by Os9disasm of cfloats.r + + section code + +* class D external label equates + +D0000 equ $0000 +D0010 equ $0010 +D0011 equ $0011 +D0012 equ $0012 +D0013 equ $0013 +D0014 equ $0014 +D0015 equ $0015 +D0016 equ $0016 +D0017 equ $0017 +D0018 equ $0018 +D0019 equ $0019 +D001c equ $001c +D001d equ $001d +D001e equ $001e +D0022 equ $0022 +D0023 equ $0023 +D0024 equ $0024 +D0025 equ $0025 +D0026 equ $0026 +D0027 equ $0027 +D0028 equ $0028 +D0029 equ $0029 +D002a equ $002a +D0081 equ $0081 + +_dnorm: ldx 2,s + lbsr _dstack + bsr L0008 + rts +L0008 pshs u + leas -30,s + tfr s,u + clr D001d,u + clr D0019,u + lbsr L028f + lbra L00b4 +_dneg: ldb #7 + clra +L001e ora b,x + decb + bpl L001e + tsta + lbeq _xtofla + ldd ,x + eora #$80 + lbra L064d +_dadd: lbsr L04a7 + lbsr L0189 + lbra L00b4 +_dsub: lbsr L04a7 + lbsr L015f + lbra L00b4 +_dmul: lbsr L04a7 + lbsr L0302 + bra L00b4 +_ddiv: lbsr L04a7 + lbsr L032e + bra L00b4 +_dtol: lbsr _xtofla + lbra L054b +_dtoi: bsr _dtol + ldd 2,x + rts +_ltod: ldd ,x + std _flacc,y + ldd 2,x + leax _flacc,y + std 2,x + lbra L04eb +_itod: leax _flacc,y + std 2,x + tfr a,b + sex + tfr a,b + std ,x + lbra L04eb +_utod: leax _flacc,y + std 2,x + clr ,x + clr 1,x + lbra L04eb +_dtof: ldd ,x + std _flacc,y + lda 2,x + ldb 7,x + leax _flacc,y + std 2,x + rts +_ftod: ldd ,x + std _flacc,y + ldd 2,x + leax _flacc,y + sta 2,x + stb 7,x + clr 3,x + clr 4,x + clr 5,x + clr 6,x + rts +L00b4 leax _flacc,y + ldd D0022,u + std ,x + ldd D0024,u + std 2,x + ldd D0026,u + std 4,x + ldd D0028,u + std 6,x + leas D001e,u + puls u + puls d + std 6,s + leas 6,s + rts +_dcmpr: lda 2,s + eora ,x + bmi L0147 + lda 2,s + bmi L011a + lda 9,s + beq L0113 + ldb 7,x + beq L014b + cmpa 7,x + bne L011e + ldd 2,s + cmpd ,x + bne L011e + ldd 4,s + cmpd 2,x + bne L011e + ldd 6,s + cmpd 4,x + bne L011e + lda 8,s + anda #254 + pshs a + ldb 6,x + andb #254 + cmpa ,s+ + bne L011e + bra L014f +L0113 lda 7,x + bne L015a + clra + bra L014f +L011a lda 7,x + cmpa 9,s +L011e bhi L014b + bcs L015a + ldd ,x + cmpd 2,s + bne L011e + ldd 2,x + cmpd 4,s + bne L011e + ldd 4,x + cmpd 6,s + bne L011e + lda 6,x + anda #254 + pshs a + lda 8,s + anda #254 + cmpa ,s+ + bne L011e + bra L014f +L0147 lda ,x + bpl L015a +L014b lda #1 + andcc #254 +L014f pshs cc + ldd 1,s + std 9,s + puls cc + leas 8,s + rts +L015a clra + cmpa #1 + bra L014f +L015f lda D0017,u + beq L0180 + ldb D001c,u + eorb #$80 + stb D001c,u + eorb D0018,u + stb D0019,u + ldb D0029,u + bne L0192 + lbsr L061b + lda D0022,u + lbra L02d2 +L0180 lda D0022,u + ldb D0018,u + lbra L02d5 +L0189 lbeq L061b + lda D0017,u + beq L0180 +L0192 suba D0029,u + beq L01c3 + sta ,u + bcs L01c9 + ldb D0017,u + stb D0029,u + ldd D0022,u +L01a4 lsra + rorb + ror D0024,u + ror D0025,u + ror D0026,u + ror D0027,u + ror D0028,u + dec ,u + bne L01a4 + std D0022,u +L01bc lda D0019,u + bmi L0238 + bra L01e9 +L01c3 inc ,u + orcc #1 + bra L01bc +L01c9 ldd D0010,u +L01cc lsra + rorb + ror D0012,u + ror D0013,u + ror D0014,u + ror D0015,u + ror D0016,u + inc ,u + bne L01cc + std D0010,u + lda D0019,u + bmi L023b +L01e9 ldd D0027,u + adcb D0016,u + adca D0015,u + std D0027,u + ldd D0025,u + adcb D0014,u + adca D0013,u + std D0025,u + ldb D0024,u + adcb D0012,u + stb D0024,u + ldd D0022,u + adcb D0011,u + adca D0010,u + std D0022,u + bcc L0230 + inc D0029,u + ror D0022,u + ror D0023,u + ror D0024,u + ror D0025,u + ror D0026,u + ror D0027,u + ror D0028,u +L0230 lda D001c,u + sta D0019,u + bra L028f +L0238 rola + coma + asra +L023b ldd D0027,u + sbcb D0016,u + sbca D0015,u + std D0027,u + ldd D0025,u + sbcb D0014,u + sbca D0013,u + std D0025,u + ldd D0023,u + sbcb D0012,u + sbca D0011,u + std D0023,u + lda D0022,u + sbca D0010,u + sta D0022,u + lda D0018,u + bcc L028c + com D0022,u + com D0023,u + com D0024,u + com D0025,u + com D0026,u + com D0027,u + com D0028,u + lda ,u + beq L0289 + lbsr L05d8 +L0289 lda D001c,u +L028c sta D0019,u +L028f clr ,u +L0291 lda D0022,u + bmi L02d2 + ora D0023,u + ora D0024,u + ora D0025,u + ora D0026,u + ora D0027,u + ora D0028,u + beq L02e6 + ldd D0022,u +L02ad dec D0029,u + bne L02b5 + dec D001d,u +L02b5 asl ,u + rol D0028,u + rol D0027,u + rol D0026,u + rol D0025,u + rol D0024,u + rolb + rola + bpl L02ad + stb D0023,u + ldb D0029,u + beq L02ea +L02d2 ldb D0019,u +L02d5 anda #$7f + andb #$80 + pshs b + adda ,s+ + sta D0022,u + tst D001d,u + bne L02ea +L02e5 rts +L02e6 sta D0029,u + rts +L02ea lda D001d,u + ldb D0029,u + subd #0 + beq L02fd + bmi L02fd +L02f7 ldd #$0028 + lbra _rpterr +L02fd lbsr L0328 + bra L02f7 +L0302 beq L0328 + lda D0017,u + beq L0328 + lbsr L03a4 + clra + ldb D0029,u + addb D0017,u + adca #0 + subd #$0080 + stb D0029,u + sta D001d,u + lbsr L0291 + lda ,u + bpl L02e5 + lbra L05d8 +L0328 clra + sta D0029,u + bra L038e +L032e ldb D0017,u + bne L0339 + ldd #$0029 + lbra _rpterr +L0339 tsta + beq L0328 + lbsr L0402 + clra + ldb D0029,u + subb D0017,u + sbca #0 + addd #$0081 + sta D001d,u + stb D0029,u + lda 6,u + coma + asra + ror D0022,u + ror D0023,u + ror D0024,u + ror D0025,u + ror D0026,u + ror D0027,u + ror D0028,u + ror ,u + lbsr L0291 + lda ,u + bpl L03a3 + lbra L05d8 +L0376 pshs a + ldd D0022,u + std ,u + ldd D0024,u + std 2,u + ldd D0026,u + std 4,u + ldb D0028,u + stb 6,u + puls a +L038e sta D0022,u + sta D0023,u + sta D0024,u + sta D0025,u + sta D0026,u + sta D0027,u + sta D0028,u +L03a3 rts +L03a4 clra + bsr L0376 + ldb #$38 + stb 8,u +L03ab lda 6,u + lsra + bcc L03da + ldd D0027,u + addd D0015,u + std D0027,u + ldd D0025,u + adcb D0014,u + adca D0013,u + std D0025,u + ldd D0023,u + adcb D0012,u + adca D0011,u + std D0023,u + lda D0022,u + adca D0010,u + sta D0022,u +L03da ror D0022,u + ror D0023,u + ror D0024,u + ror D0025,u + ror D0026,u + ror D0027,u + ror D0028,u + ror ,u + ror 1,u + ror 2,u + ror 3,u + ror 4,u + ror 5,u + ror 6,u + dec 8,u + bne L03ab + rts +L0402 clra + lbsr L0376 + ldb #$39 + stb 8,u +L040a ldb ,u + cmpb D0010,u + bcs L0441 + ldd 5,u + subd D0015,u + std 13,u + ldd 3,u + sbcb D0014,u + sbca D0013,u + std 11,u + ldb 2,u + sbcb D0012,u + stb 10,u + ldd ,u + sbcb D0011,u + sbca D0010,u + bcs L0441 + std ,u + lda 10,u + sta 2,u + ldd 11,u + std 3,u + ldd 13,u + std 5,u +L0441 rol D0028,u + rol D0027,u + rol D0026,u + rol D0025,u + rol D0024,u + rol D0023,u + rol D0022,u + rol 6,u + rol 5,u + rol 4,u + rol 3,u + rol 2,u + rol 1,u + rol ,u + dec 8,u + bhi L040a + beq L048f + ldd 5,u + subd D0015,u + std 5,u + ldd 3,u + sbcb D0014,u + sbca D0013,u + std 3,u + ldd 1,u + sbcb D0012,u + sbca D0011,u + std 1,u + lda ,u + sbca D0010,u + sta ,u + clra + bra L0441 +L048f ror ,u + com D0022,u + com D0023,u + com D0024,u + com D0025,u + com D0026,u + com D0027,u + com D0028,u + rts +L04a7 puls d + pshs u + leas -30,s + tfr s,u + pshs d + clr D001d,u + ldd 6,x + std D0016,u + ldd 4,x + std D0014,u + ldd 2,x + std D0012,u + ldd ,x + stb D0011,u + tfr a,b + sta D001c,u + ora #$80 + sta D0010,u + eorb D0022,u + stb D0019,u + lda D0022,u + sta D0018,u + ora #$80 + sta D0022,u + lda D0029,u + rts + leax D0022,u +L04eb lda #$a0 + sta 7,x + clr 4,x + clr 5,x + clr 6,x + lda ,x + tfr a,b + orb 1,x + orb 2,x + orb 3,x + beq L0537 + ldb 1,x + tsta + bpl L0519 + pshs d + clra + clrb + subd 2,x + std 2,x + ldd #0 + sbcb 1,s + sbca ,s + leas 2,s + bvs L0523 +L0519 dec 7,x + asl 3,x + rol 2,x + rolb + rola + bpl L0519 +L0523 anda #$7f + tst ,x + bpl L052b + ora #$80 +L052b std ,x + rts + leax D0022,u + clr 4,x + clr 5,x + clr 6,x +L0537 clr 7,x +L0539 clr ,x + clr 1,x + clr 2,x + clr 3,x + rts +L0542 ldd #$002a + lbra _rpterr + leax D0022,u +L054b ldb 7,x + beq L0539 + subb #$81 + bcs L05ca + negb + addb #$1f + bmi L0542 + bne L056f + ldd ,x + cmpd #$8000 + bne L0542 + lda 2,x + ora 3,x + ora 4,x + ora 5,x + ora 6,x + bne L0542 + rts +L056f pshs b + ldd ,x + bmi L0585 + ora #$80 +L0577 lsra + rorb + ror 2,x + ror 3,x + dec ,s + bne L0577 + std ,x + puls b,pc +L0585 clr ,-s +L0587 lsra + rorb + ror 2,x + ror 3,x + ror 4,x + ror 5,x + ror 6,x + bcc L0597 + inc ,s +L0597 dec 1,s + bne L0587 + std ,x + ldd ,s++ + bne L05a9 + lda 4,x + ora 5,x + ora 6,x + beq L05ba +L05a9 ldd 2,x + addd #1 + std 2,x + ldd ,x + adcb #0 + adca #0 + bcs L0542 + std ,x +L05ba clra + clrb + subd 2,x + std 2,x + ldd #0 + sbcb 1,x + sbca ,x + std ,x + rts +L05ca lda ,x + lbpl L0539 + ldd #-1 + std 2,x + std ,x + rts +L05d8 inc D0028,u + bne L060e + inc D0027,u + bne L060e + inc D0026,u + bne L060e + inc D0025,u + bne L060e + inc D0024,u + bne L060e + inc D0023,u + bne L060e + ldb D0022,u + tfr b,a + anda #$7f + inca + bpl L0605 + inc D0029,u + anda #$7f +L0605 andb #$80 + pshs b + adda ,s+ + sta D0022,u +L060e rts +L060f neg D0000 + neg D0000 + neg D0000 + neg D0081 + leax >L060f,pcr +L061b pshs a + ldd ,x + std D0022,u + ldd 2,x + std D0024,u + ldd 4,x + std D0026,u + ldd 6,x + std D0028,u + puls a,pc +L0633 pshs a + ldd D0022,u + std ,x + ldd D0024,u + std 2,x + ldd D0026,u + std 4,x + ldd D0028,u + std 6,x + puls a,pc +_xtofla: ldd ,x +L064d std _flacc,y + ldd 2,x + std _flacc+2,y + ldd 4,x + std _flacc+4,y + ldd 6,x + leax _flacc,y + std 6,x + rts +_dinc: pshs x + bsr _dstack + leax <L060f,pcr + pshs x + lbsr L04a7 + lbsr L0189 +L0675 ldx D002a,u + bsr L0633 + ldx D001e,u + leas D002a,u + tfr x,u + puls x,pc +_ddec: pshs x + bsr _dstack + leax >L060f,pcr + pshs x + lbsr L04a7 + lbsr L015f + bra L0675 +_finc: pshs x + bsr _fstack + leax L060f,pcr + pshs x + lbsr L04a7 + lbsr L0189 +L06a6 ldx D002a,u + ldd D0022,u + std ,x + lda D0024,u + ldb D0029,u + std 2,x + ldx D001e,u + leas D002a,u + tfr x,u + puls x,pc +_fdec: pshs x + bsr _fstack + leax L060f,pcr + pshs x + lbsr L04a7 + lbsr L015f + bra L06a6 +_fstack: leas -8,s + ldd 8,s + std ,s + clra + clrb + std 5,s + std 7,s + ldd ,x + std 2,s + ldd 2,x + sta 4,s + stb 9,s + rts +_dstack: leas -8,s + ldd 8,s + std ,s + ldd ,x + std 2,s + ldd 2,x + std 4,s + ldd 4,x + std 6,s + ldd 6,x + std 8,s + rts +_fmove: pshs u + ldu 4,s + exg x,u + ldd ,u + std ,x + ldd 2,u + std 2,x + bra L0726 +_dmove: pshs u + ldu 4,s + exg x,u + ldd ,u + std ,x + ldd 2,u + std 2,x + ldd 4,u + std 4,x + ldd 6,u + std 6,x +L0726 puls u + puls d + std ,s + rts + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/chcodes.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,136 @@ +* Disassembly by Os9disasm of chcodes.r + + section bss + +* Initialized Data (class G) +_chcodes: fcb $01 + fcb $01 + fcb $01 + fcb $01 + fcb $01 + fcb $01 + fcb $01 + fcb $01 + fcb $01 + fcb $11 + fcb $11 + fcb $11 + fcb $11 + fcb $11 + fcb $01 + fcb $01 + fcb $01 + fcb $01 + fcb $01 + fcb $01 + fcb $01 + fcb $01 + fcb $01 + fcb $01 + fcb $01 + fcb $01 + fcb $01 + fcb $01 + fcb $01 + fcb $01 + fcb $01 + fcb $01 + fcb $30 + fcb $20 + fcb $20 + fcb $20 + fcb $20 + fcb $20 + fcb $20 + fcb $20 + fcb $20 + fcb $20 + fcb $20 + fcb $20 + fcb $20 + fcb $20 + fcb $20 + fcb $20 + fcb $48 + fcb $48 + fcb $48 + fcb $48 + fcb $48 + fcb $48 + fcb $48 + fcb $48 + fcb $48 + fcb $48 + fcb $20 + fcb $20 + fcb $20 + fcb $20 + fcb $20 + fcb $20 + fcb $20 + fcb $42 + fcb $42 + fcb $42 + fcb $42 + fcb $42 + fcb $42 + fcb $02 + fcb $02 + fcb $02 + fcb $02 + fcb $02 + fcb $02 + fcb $02 + fcb $02 + fcb $02 + fcb $02 + fcb $02 + fcb $02 + fcb $02 + fcb $02 + fcb $02 + fcb $02 + fcb $02 + fcb $02 + fcb $02 + fcb $02 + fcb $20 + fcb $20 + fcb $20 + fcb $20 + fcb $20 + fcb $20 + fcb $44 + fcb $44 + fcb $44 + fcb $44 + fcb $44 + fcb $44 + fcb $04 + fcb $04 + fcb $04 + fcb $04 + fcb $04 + fcb $04 + fcb $04 + fcb $04 + fcb $04 + fcb $04 + fcb $04 + fcb $04 + fcb $04 + fcb $04 + fcb $04 + fcb $04 + fcb $04 + fcb $04 + fcb $04 + fcb $04 + fcb $20 + fcb $20 + fcb $20 + fcb $20 + fcb $01 + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/chmod.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,47 @@ +* Disassembly by Os9disasm of chmod.r + + section code + +* OS-9 system function equates + +F$ID equ $0c +I$Open equ $84 +I$GetStt equ $8d +I$SetStt equ $8e +I$Close equ $8f + +chmod: pshs y,u + leas -16,s + bsr L0035 + bcs L002d + pshs a,y + os9 F$ID + cmpy #0 + beq L001c + ldb #$d6 + cmpy 1,x + orcc #1 + bne L002d +L001c ldb 28,s + stb ,x + puls a,y + ldb #$0f + os9 I$SetStt + bcs L002d + os9 I$Close +L002d leas 16,s + puls y,u + lbra _sysret +L0035 lda #2 + ldx 24,s + os9 I$Open + bcc L0040 + rts +L0040 leax 2,s + ldy #$0010 + ldb #$0f + os9 I$GetStt + rts + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/chown.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,46 @@ +* Disassembly by Os9disasm of chown.r + + section code + +* OS-9 system function equates + +F$ID equ $0c +I$Open equ $84 +I$GetStt equ $8d +I$SetStt equ $8e +I$Close equ $8f + +chown: pshs y,u + leas -16,s + os9 F$ID + bcs L002a + ldb #$d6 + cmpy #0 + orcc #1 + bne L002a + bsr L0032 + bcs L002a + pshs a + ldd 25,s + std 1,x + puls a + ldb #$0f + os9 I$SetStt + bcs L002a + os9 I$Close +L002a leas 16,s + puls y,u + lbra _sysret +L0032 lda #2 + ldx 24,s + os9 I$Open + bcc L003d + rts +L003d leax 2,s + ldy #$0010 + ldb #$0f + os9 I$GetStt + rts + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/claddsub.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,23 @@ +* Disassembly by Os9disasm of claddsub.r + + section code + +_ladd: ldd 4,s + addd 2,x + std _flacc+2,y + ldd 2,s + adcb 1,x + adca ,x + std _flacc,y + lbra _lbexit +_lsub: ldd 4,s + subd 2,x + std _flacc+2,y + ldd 2,s + sbcb 1,x + sbca ,x + std _flacc,y + lbra _lbexit + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/clbits.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,44 @@ +* Disassembly by Os9disasm of clbits.r + + section code + +_land: ldd 2,s + anda ,x + andb 1,x + std _flacc,y + ldd 4,s + anda 2,x + andb 3,x + std _flacc+2,y + lbra _lbexit +_lor: ldd 2,s + ora ,x + orb 1,x + std _flacc,y + ldd 4,s + ora 2,x + orb 3,x + std _flacc+2,y + lbra _lbexit +_lxor: ldd 2,s + eora ,x + eorb 1,x + std _flacc,y + ldd 4,s + eora 2,x + eorb 3,x + std _flacc+2,y + lbra _lbexit +_lnot: lda ,x + ora 1,x + ora 2,x + ora 3,x + beq L0052 + clrb + clra + rts +L0052 ldd #1 + rts + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/clcommon.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,20 @@ +* Disassembly by Os9disasm of clcommon.r + + section code + +_lbexit: tfr cc,a + puls x + stx 2,s + leas 2,s + leax _flacc,y + tfr a,cc + rts +_ltoacc: ldd ,x + std _flacc,y + ldd 2,x + leax _flacc,y + std 2,x + rts + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/clcompare.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,25 @@ +* Disassembly by Os9disasm of clcompare.r + + section code + +_lcmpr: ldd 2,s + cmpd ,x + bne L0019 + ldd 4,s + cmpd 2,x + beq L0019 + bcs L0016 + lda #1 + andcc #254 + bra L0019 +L0016 clra + cmpa #1 +L0019 pshs cc + ldd 1,s + std 5,s + puls cc + leas 4,s + rts + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/clconvert.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,19 @@ +* Disassembly by Os9disasm of clconvert.r + + section code + +_litol: leax _flacc,y + std 2,x + tfr a,b + sex + tfr a,b + std ,x + rts +_lutol: leax _flacc,y + std 2,x + clr ,x + clr 1,x + rts + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/cldiv.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,110 @@ +* Disassembly by Os9disasm of cldiv.r + + + section bss + +* Uninitialized data (class B) +B0000 rmb 1 +* Initialized Data (class G) + + endsect + + section code + +_ldiv: bsr L0048 + lda 1,s + beq L0009 +L0006 lbsr _lnegx +L0009 leas 8,s + lbra _lbexit +_lmod: lda ,x + ora 1,x + ora 2,x + ora 3,x + bne L0029 + ldd ,x + std _flacc,y + ldd 2,x + leax _flacc,y + std 2,x + lbra _lbexit +L0029 lda 2,s + sta B0000,y + bsr L005e + ldd 10,s + leax _flacc,y + std ,x + ldd 12,s + std 2,x + tst B0000,y + bmi L0006 + leas 8,s + lbra _lbexit +L0048 lda ,x + ora 1,x + ora 2,x + ora 3,x + bne L005e + ldd 2,s + std 6,s + leas 6,s + ldd #$002d + lbra _rpterr +L005e ldd ,x + ldx 2,x + pshs d,x + ldd #0 + pshs d + std _flacc,y + std _flacc+2,y + tst 2,s + bpl L007c + leax 2,s + lbsr _lnegx + inc 1,s +L007c tst 10,s + bpl L0087 + leax 10,s + lbsr _lnegx + com 1,s +L0087 leax _flacc,y + lda #1 +L008d inca + asl 5,s + rol 4,s + rol 3,s + rol 2,s + bpl L008d + sta ,s +L009a ldd 12,s + subd 4,s + std 12,s + ldd 10,s + sbcb 3,s + sbca 2,s + std 10,s + bcc L00bc + ldd 12,s + addd 4,s + std 12,s + ldd 10,s + adcb 3,s + adca 2,s + std 10,s + andcc #254 + bra L00be +L00bc orcc #1 +L00be rol 3,x + rol 2,x + rol 1,x + rol ,x + lsr 2,s + ror 3,s + ror 4,s + ror 5,s + dec ,s + bne L009a + jmp [6,s] + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/clincdec.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,23 @@ +* Disassembly by Os9disasm of clincdec.r + + section code + +_linc: ldd #1 + addd 2,x + std 2,x + ldd ,x + adcb #0 + adca #0 + std ,x + rts +_ldec: ldd 2,x + subd #1 + std 2,x + ldd ,x + sbcb #0 + sbca #0 + std ,x + rts + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/clmove.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,18 @@ +* Disassembly by Os9disasm of clmove.r + + section code + +_lmove: pshs y + ldy 4,s + ldd ,x + std ,y + ldd 2,x + std 2,y + puls x + exg y,x + puls d + std ,s + rts + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/clmul.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,69 @@ +* Disassembly by Os9disasm of clmul.r + + section code + +_lmul: ldd 2,x + pshs d + ldd ,x + pshs d + leax _flacc,y + clr ,x + clr 1,x + lda 9,s + ldb 3,s + mul + std 2,x + lda 9,s + ldb 2,s + mul + addd 1,x + std 1,x + bcc L0024 + inc ,x +L0024 lda 8,s + ldb 3,s + mul + addd 1,x + std 1,x + bcc L0031 + inc ,x +L0031 lda 9,s + ldb 1,s + mul + addd ,x + std ,x + lda 8,s + ldb 2,s + mul + addd ,x + std ,x + lda 7,s + ldb 3,s + mul + addd ,x + std ,x + lda 9,s + ldb ,s + mul + addb ,x + stb ,x + lda 8,s + ldb 1,s + mul + addb ,x + stb ,x + lda 7,s + ldb 2,s + mul + addb ,x + stb ,x + lda 6,s + ldb 3,s + mul + addb ,x + stb ,x + leas 4,s + lbra _lbexit + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/clnegcompl.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,26 @@ +* Disassembly by Os9disasm of clnegcompl.r + + section code + +_lneg: lbsr _ltoacc +_lnegx: ldd #0 + subd 2,x + std 2,x + ldd #0 + sbcb 1,x + sbca ,x + std ,x + rts +_lcompl: ldd ,x + coma + comb + std _flacc,y + ldd 2,x + coma + comb + leax _flacc,y + std 2,x + rts + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/clshifts.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,37 @@ +* Disassembly by Os9disasm of clshifts.r + + section code + +_lshl: ldx 2,s + pshs b + lbsr _ltoacc + puls b + tstb + beq L0017 +L000c asl 3,x + rol 2,x + rol 1,x + rol ,x + decb + bne L000c +L0017 puls d + std ,s + rts +_lshr: ldx 2,s + pshs b + lbsr _ltoacc + puls b + tstb + beq L0033 +L0028 asr ,x + ror 1,x + ror 2,x + ror 3,x + decb + bne L0028 +L0033 puls d + std ,s + rts + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/create.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,60 @@ +* Disassembly by Os9disasm of create.r + + section code + +* OS-9 system function equates + +I$Create equ $83 +I$Open equ $84 +I$Delete equ $87 +I$SetStt equ $8e +I$Close equ $8f + +creat: ldx 2,s + lda 5,s + tfr a,b + andb #$24 + orb #$0b + os9 I$Create + bcc L005d + cmpb #$da + bne L0039 + lda 5,s + bita #$80 + bne L0039 + anda #7 + ldx 2,s + os9 I$Open + bcs L0039 + pshs a,u + ldx #0 + leau ,x + ldb #2 + os9 I$SetStt + puls a,u + bcc L005d + pshs b + os9 I$Close + puls b +L0039 lbra _os9err +create: ldx 2,s + lda 5,s + ldb 7,s + os9 I$Create + bcs L0039 + bra L005d +L0049 cmpb #$da + bne L0039 + os9 I$Delete + bcs L0039 +ocreat: ldx 2,s + lda 5,s + ldb 7,s + os9 I$Create + bcs L0049 +L005d tfr a,b + clra + rts + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/cshifts.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,34 @@ +* Disassembly by Os9disasm of cshifts.r + + section code + +ccasr: tstb + beq L0022 +L0003 asr 2,s + ror 3,s + decb + bne L0003 + bra L0022 +cclsr: tstb + beq L0022 +L000f lsr 2,s + ror 3,s + decb + bne L000f + bra L0022 +ccasl: tstb + beq L0022 +L001b asl 3,s + rol 2,s + decb + bne L001b +L0022 ldd 2,s + pshs d + ldd 2,s + std 4,s + ldd ,s + leas 4,s + rts + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/datmods.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,71 @@ +* Disassembly by Os9disasm of datmods.r + + section code + +* OS-9 system function equates + +F$Link equ $00 +F$Load equ $01 +F$UnLink equ $02 + +lockdata: ldx 2,s + pshs cc + orcc #$10 + inc ,x + beq L001d + ldb ,x + dec ,x +L000e sex + puls cc,pc +unlkdata: ldx 2,s + pshs cc + orcc #$10 + ldb ,x + bne L000e + dec ,x +L001d clra + clrb + puls cc,pc +datlink: pshs y,u + clr ,-s + clr ,-s + ldx 8,s + lda #$40 + os9 F$Link + bcc L0045 + cmpb #$dd + beq L003a + coma +L0035 puls x,y,u + lbra _os9err +L003a ldx 8,s + lda #$40 + os9 F$Load + bcs L0035 + inc 1,s +L0045 pshs y + tfr u,d + subd ,s++ + std ,y++ + sty [10,s] + addd 2,u + subd #5 + std [12,s] + ldd ,s + beq L0067 + pshs y + bsr lockdata + std ,s++ + beq L0067 + clr 1,s +L0067 puls d,y,u,pc +dunlink: pshs u + ldu 4,s + ldd ,--u + leau d,u + os9 F$UnLink + puls u + lbra _sysret + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/defdrive.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,73 @@ +* Disassembly by Os9disasm of defdrive.r + +* class D external label equates + +D0000 equ $0000 + +* class X external label equates + +X0000 equ $0000 + + section bss + +* Uninitialized data (class B) +B0000 rmb 12 +* Initialized Data (class G) + + endsect + + section code + +getdrive: pshs u + leas -7,s + clra + clrb + pshs d + ldd #$000c + pshs d + leax >L0061,pcr + pshs x + lbsr modlink + leas 6,s + std ,s + cmpd #-1 + beq L005b + ldd ,s + ldx ,s + addd 16,x + std 5,s + leau B0000,y + bra L0033 +L002f ldb 4,s + stb ,u+ +L0033 ldx 5,s + leax 1,x + stx 5,s + ldb -1,x + stb 4,s + bgt L002f + ldb 4,s + clra + andb #$7f + stb ,u+ + clra + clrb + stb ,u + ldd ,s + pshs d + lbsr munlink + leas 2,s + leax B0000,y + tfr x,d + bra L005d +L005b clra + clrb +L005d leas 7,s + puls u,pc +L0061 rola + jmp 9,s + fcb $74 + fcb $00 + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/devtyp.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,31 @@ +* Disassembly by Os9disasm of devtyp.r + + section code + +* OS-9 system function equates + +I$GetStt equ $8d + +isatty: ldd 2,s + pshs d + bsr devtyp + std ,s++ + beq L000c + clrb + rts +L000c incb + rts +devtyp: lda 3,s + clrb + leas -32,s + leax ,s + os9 I$GetStt + lda ,s + leas 32,s + lblo _os9err + tfr a,b + clra + rts + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/dir.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,17 @@ +* Disassembly by Os9disasm of dir.r + + section code + +* OS-9 system function equates + +I$ChgDir equ $86 + +chdir: lda #1 +L0002 ldx 2,s + os9 I$ChgDir + lbra _sysret +chxdir: lda #4 + bra L0002 + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/dirutil.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,92 @@ +* Disassembly by Os9disasm of dirutil.r + +* class D external label equates + +D001d equ $001d +D001e equ $001e + + section bss + +* Uninitialized data (class B) +B0000 rmb 4 +B0004 rmb 30 +* Initialized Data (class G) + + endsect + + section code + +closedir: ldx 2,s + ldd ,x + pshs d,x + lbsr close + leas 2,s + lbsr free + puls x,pc +opendir: pshs u + ldd #$0022 + pshs d + lbsr malloc + std ,s + beq L0037 + ldx #$0081 + ldd 6,s + pshs d,x + lbsr open + leas 4,s + std [,s] + bge L0037 + ldd ,s + lbsr free + clra + clrb + std ,s +L0037 puls d,u,pc +readdir: pshs u + ldu 4,s + leau 2,u +L003f ldd #$0020 + pshs d + ldd -2,u + pshs d,u + lbsr read + leas 6,s + std -2,s + bgt L0055 + clra + clrb + puls u,pc +L0055 ldb ,u + beq L003f + leax B0004,y + pshs x,u + lbsr strhcpy + leas 4,s + leax B0000,y + clra + ldb D001d,u + std ,x + ldd D001e,u + std 2,x + tfr x,d + puls u,pc +seekdir: clra + clrb + pshs d + ldd 8,s + pshs d + ldd 8,s + bra L008b +telldir: ldd #1 + pshs d + clrb + pshs d +L008b pshs d + ldd [8,s] + pshs d + lbsr lseek + leas 8,s + rts + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/errmsg.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,29 @@ +* Disassembly by Os9disasm of errmsg.r + + section code + +_errmsg: pshs u + lbsr _prgname + pshs d + leau >L002f,pcr + leax _iob+26,y + pshs x,u + lbsr fprintf + leas 6,s + ldu 12,s + ldx 10,s + ldd 8,s + pshs d,x,u + ldu 12,s + leax _iob+26,y + pshs x,u + lbsr fprintf + leas 10,s + ldd 4,s + puls u,pc +*L002f bcs L00a4 +* abx +* bra L0034 + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/fflush.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,8 @@ +* Disassembly by Os9disasm of fflush.r + + section code + +fflush: rts + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/findstr.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,49 @@ +* Disassembly by Os9disasm of findstr.r + + section code + +findstr: pshs y,u + bsr L002c + bra L0008 +L0006 bsr L000e +L0008 ldb ,x + bne L0006 + bra L0046 +L000e pshs x,y + bsr findastr + puls x,y + bne L001b + leau 1,u + leax 1,x + rts +L001b tfr u,d + puls x,y,u,pc +findnstr: pshs y,u + bsr L002c +L0023 bsr L000e + cmpu 12,s + ble L0023 + bra L0046 +L002c ldu 8,s + tfr u,d + ldx 10,s + leax d,x + leax -1,x + ldy 12,s + rts +findastr: pshs y,u + ldu 6,s + ldx 8,s + bra L004a +L0042 cmpb ,u+ + beq L004a +L0046 clra + clrb + puls y,u,pc +L004a ldb ,x+ + bne L0042 + ldd #1 + puls y,u,pc + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/fopen.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,144 @@ +* Disassembly by Os9disasm of fopen.r + + section code + +L0000 pshs d + stu -2,s + bne L0022 + leau _iob,y + lda #$10 +L000c ldb 7,u + andb #3 + beq L0022 + leau 13,u + deca + bne L000c + ldd #$00c8 + std errno,y + clra + clrb + puls x,pc +L0022 puls d + std 8,u + ldd 1,x + tsta + beq L0037 + cmpa #$2b + beq L0033 + cmpb #$2b + bne L0037 +L0033 ldb #3 + bra L0047 +L0037 ldb ,x + cmpb #$72 + beq L0041 + cmpb #$64 + bne L0045 +L0041 ldb #1 + bra L0047 +L0045 ldb #2 +L0047 orb 7,u + stb 7,u + ldd 2,u + addd 11,u + std ,u + std 4,u + tfr u,d + rts +L0056 clra + clrb + pshs d,u + ldd 1,x + tsta + beq L007a + cmpa #$78 + bne L0071 + cmpb #$2b + bne L006c + ldd #7 + bra L0078 +L006c ldd #4 + bra L0078 +L0071 cmpa #$2b + bne L00c7 + ldd #3 +L0078 std ,s +L007a ldb ,x + cmpb #$72 + bne L0086 + ldd ,s + orb #1 + bra L00d7 +L0086 cmpb #$61 + bne L00b2 + ldd ,s + orb #2 + pshs d + pshs u + lbsr open + leas 4,s + std 2,s + cmpd #-1 + beq L00b6 + ldu #2 + ldx #0 + pshs x,u + pshs d,x + lbsr lseek + puls d + leas 6,s + bra L00e0 +L00b2 cmpb #$77 + bne L00c3 +L00b6 ldd ,s + orb #2 + pshs d + pshs u + lbsr creat + bra L00de +L00c3 cmpb #$64 + beq L00d3 +L00c7 ldd #$00cb + std errno,y + ldd #-1 + bra L00e0 +L00d3 ldd ,s + orb #$81 +L00d7 pshs d + pshs u + lbsr open +L00de leas 4,s +L00e0 leas 4,s + rts +fdopen: pshs u + ldu #0 + ldx 6,s + ldd 4,s + bra L011c +fopen: pshs u + ldx 6,s + ldu 4,s + lbsr L0056 + ldu #0 + std -2,s + bpl L011a +L00fe clra + clrb + puls u,pc +freopen: pshs u + ldd 8,s + pshs d + lbsr fclose + leas 2,s + ldx 6,s + ldu 4,s + lbsr L0056 + std -2,s + bmi L00fe + ldu 8,s +L011a ldx 6,s +L011c lbsr L0000 + puls u,pc + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/fread.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,32 @@ +* Disassembly by Os9disasm of fread.r + + section code + +fread: pshs d,x,u + ldu 8,s + clra + clrb + bra L002b +L0008 ldd 10,s + bra L0022 +L000c ldd 14,s + pshs d + lbsr getc + leas 2,s + cmpd #-1 + beq L0032 + stb ,u+ + ldd ,s + subd #1 +L0022 std ,s + bne L000c + ldd 2,s + addd #1 +L002b std 2,s + cmpd 12,s + blt L0008 +L0032 leas 2,s + puls d,u,pc + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/fseek.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,194 @@ +* Disassembly by Os9disasm of fseek.r + + section code + +* class D external label equates + +D0000 equ $0000 + +* class X external label equates + +X4f5f equ $4f5f +Xffff equ $ffff + +fseek: pshs u + ldu 4,s + leas -6,s + lbeq L0114 + ldd 6,u + bitb #3 + lbeq L0114 + bita #$80 + bne L0020 + pshs u + lbsr _setbase + leas 2,s + lbra L00e5 +L0020 bita #1 + beq L003a + pshs u + lbsr fflush + leas 2,s + lda 6,u + anda #254 + sta 6,u + ldd 2,u + addd 11,u + std 4,u + lbra L00e3 +L003a ldd ,u + cmpd 4,u + lbhs L00e5 + leax 2,s + pshs x + leax 14,s + lbsr _lmove + ldx 16,s + beq L0059 + cmpx #1 + beq L0072 + lbra L00c8 +L0059 leax 2,s + pshs x + ldd 2,x + pshs d + ldd ,x + pshs d + pshs u + lbsr ftell + leas 2,s + lbsr _lsub + lbsr _lmove +L0072 ldd 11,u + lbsr _litol + ldd 2,x + pshs d + ldd ,x + pshs d + leax 6,s + ldd 2,x + pshs d + ldd ,x + pshs d + leax L011f,pcr + lbsr _lcmpr + bge L0099 + leax 6,s + lbsr _lneg + bra L009b +L0099 leax 6,s +L009b lbsr _lcmpr + blt L00bf + ldd 4,s + addd ,u + std ,s + cmpd 2,u + bcs L00bf + ldd ,s + cmpd 4,u + bcc L00bf + ldd ,s + std ,u + ldb 7,u + andb #$ef + stb 7,u + lbra L0119 +L00bf ldd 16,s + cmpd #1 + bne L00e1 +L00c8 leax 12,s + pshs x + ldd 2,x + pshs d + ldd ,x + pshs d + ldd 4,u + subd ,u + lbsr _litol + lbsr _lsub + lbsr _lmove +L00e1 ldd 4,u +L00e3 std ,u +L00e5 ldb 7,u + andb #$ef + stb 7,u + ldd 16,s + pshs d + leax 14,s + ldd 2,x + pshs d + ldd ,x + pshs d + ldd 8,u + pshs d + lbsr lseek + leas 8,s + ldd 2,x + pshs d + ldd ,x + pshs d + leax >L0123,pcr + lbsr _lcmpr + bne L0119 +L0114 ldd #-1 + bra L011b +L0119 clra + clrb +L011b leas 6,s + puls u,pc +L011f neg D0000 + neg D0000 +L0123 stu Xffff + stu X4f5f +rewind equ *-2 + tfr d,x + pshs d,x + ldd 6,s + pshs d,x + lbsr fseek + leas 8,s + rts +ftell: pshs u + ldu 4,s + beq L0143 + ldd 6,u + andb #3 + bne L0150 +L0143 leax _flacc,y + ldd #-1 + std ,x + std 2,x + puls u,pc +L0150 anda #$80 + bne L015b + pshs u + lbsr _setbase + leas 2,s +L015b ldd #1 + pshs d + clrb + pshs d + pshs d + ldd 8,u + pshs d + lbsr lseek + leas 8,s + ldd 2,x + pshs d + ldd ,x + pshs d + lda 6,u + anda #1 + beq L0180 + ldd 2,u + bra L0182 +L0180 ldd 4,u +L0182 pshs d + ldd ,u + subd ,s++ + lbsr _litol + lbsr _ladd + puls u,pc + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/ftelldummy.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,13 @@ +* Disassembly by Os9disasm of ftelldummy.r + + section code + +ftell: leax _flacc,y + clra + clrb + std ,x + std 2,x + rts + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/fwrite.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,32 @@ +* Disassembly by Os9disasm of fwrite.r + + section code + +fwrite: pshs d,x,u + ldu 8,s + clra + clrb + bra L002b +L0008 ldd 10,s + bra L0022 +L000c ldx 14,s + ldb ,u+ + pshs d,x + lbsr putc + leas 4,s + cmpd #-1 + beq L0032 + ldd ,s + subd #1 +L0022 std ,s + bne L000c + ldd 2,s + addd #1 +L002b std 2,s + cmpd 12,s + blt L0008 +L0032 leas 2,s + puls d,u,pc + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/getc.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,104 @@ +* Disassembly by Os9disasm of getc.r + + section code + +getc: pshs u + ldu 4,s + beq L005f + lda 6,u + anda #1 + bne L005f + ldx ,u + cmpx 4,u + bcc L0064 +L0012 ldb ,x+ +L0014 stx ,u + clra + puls u,pc +ungetc: pshs u + ldu 6,s + beq L005f + ldb 7,u + andb #1 + beq L005f + ldd 4,s + cmpd #-1 + beq L005f + ldx ,u + cmpx 2,u + beq L005f + stb ,-x + bra L0014 +getw: pshs u + ldu 4,s + pshs u,pc + bsr getc + std 2,s + cmpd #-1 + beq L0051 + bsr getc + cmpd #-1 + beq L0051 + lda 3,s +L0051 leas 4,s + puls u,pc +L0055 ldb #$10 + bra L005b +L0059 ldb #$20 +L005b orb 7,u + stb 7,u +L005f ldd #-1 + puls u,pc +L0064 ldd 6,u + anda #$80 + andb #$31 + cmpb #1 + bne L005f + cmpa #$80 + beq L0079 + pshs u + lbsr _setbase + leas 2,s +L0079 leax _iob,y + pshs x + cmpu ,s++ + bne L0095 + ldb 7,u + andb #$40 + beq L0095 + leax _iob+13,y + pshs x + lbsr fflush + leas 2,s +L0095 ldb 7,u + andb #8 + beq L00b0 + ldd 11,u + pshs d + ldx 2,u + ldd 8,u + pshs d,x + ldb 7,u + andb #$40 + beq L00bd + lbsr readln + bra L00c0 +L00b0 ldd #1 + pshs d + leax 10,u + stx 2,u + ldd 8,u + pshs d,x +L00bd lbsr read +L00c0 leas 6,s + std -2,s + beq L0055 + bmi L0059 + ldx 2,u + leax d,x + stx 4,u + ldx 2,u + lbra L0012 + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/getopt.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,189 @@ +* Disassembly by Os9disasm of getopt.r + +* class D external label equates + +D0000 equ $0000 +D003a equ $003a + +* class X external label equates + +X2061 equ $2061 +X7469 equ $7469 + + section bss + +* Uninitialized data (class B) +optopt: rmb 2 +optarg: rmb 2 +* Initialized Data (class G) +opterr: fcb $00 + fcb $01 +optind: fcb $00 + fcb $01 +G0004 fdb L0156 + + endsect + + section code + +getopt: pshs u + ldb [G0004,y] + bne L004f + ldd optind,y + cmpd 4,s + bge L004a + ldd optind,y + lslb + rola + ldx 6,s + leax d,x + ldd ,x + std G0004,y + tfr d,x + ldb ,x + cmpb #$2d + bne L004a + ldx G0004,y + leax 1,x + stx G0004,y + ldb ,x + beq L004a + ldb [G0004,y] + cmpb #$2d + bne L004f + ldd optind,y + addd #1 + std optind,y +L004a ldd #-1 + puls u,pc +L004f ldx G0004,y + leax 1,x + stx G0004,y + ldb -1,x + sex + std optopt,y + cmpd #$003a + beq L007b + ldd optopt,y + pshs d + ldd 10,s + pshs d + lbsr strchr + leas 4,s + tfr d,u + stu -2,s + bne L00a8 +L007b ldb [G0004,y] + bne L008c + ldd optind,y + addd #1 + std optind,y +L008c leax _iob+26,y + pshs x + ldd [8,s] + pshs d + lbsr fputs + leas 4,s + leax _iob+26,y + pshs x + leax L0157,pcr + bra L0100 +L00a8 leau 1,u + ldb ,u + cmpb #$3a + beq L00c1 + clra + clrb + std optarg,y + ldb [G0004,y] + lbne L0150 + lbra L0145 +L00c1 ldb [G0004,y] + beq L00ce + ldd G0004,y + lbra L0139 +L00ce ldd optind,y + addd #1 + std optind,y + cmpd 4,s + blt L012d + leax L016c,pcr + stx G0004,y + leax _iob+26,y + pshs x + ldd [8,s] + pshs d + lbsr fputs + leas 4,s + leax _iob+26,y + pshs x + leax >L016d,pcr +L0100 pshs x + lbsr fputs + leas 4,s + leax _iob+26,y + pshs x + ldd optopt,y + pshs d + lbsr putc + leas 4,s + leax _iob+26,y + pshs x + ldd #$000d + pshs d + lbsr putc + leas 4,s + ldd #$003f + puls u,pc +L012d ldd optind,y + lslb + rola + ldx 6,s + leax d,x + ldd ,x +L0139 std optarg,y + leax >L018f,pcr + stx G0004,y +L0145 ldd optind,y + addd #1 + std optind,y +L0150 ldd optopt,y + puls u,pc +* neg D003a +*L0157 equ *-1 +* bra L01c3 +* inc 12,s +* fcb $65 +* asr 1,s +* fcb $6c +* bra L01d1 +* neg X7469 +* clr 14,s +* bra L0196 +* blt L018b +* neg D0000 +*L016c equ *-1 +*L016d abx +* bra L01df +* neg X7469 +* clr 14,s +* bra L01e9 +* fcb $65 +* fcb $71 +* fcb $75 +* rol -14,s +* fcb $65 +* com X2061 +* fcb $6e +* bra L01e4 +* fcb $72 +* asr -11,s +* tst 5,s +* jmp -12,s +* bra L01b9 +*L018b equ *-1 +* blt L01ae +* neg D0000 + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/gets.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,55 @@ +* Disassembly by Os9disasm of gets.r + + section code + +gets: pshs u + ldu 4,s + bra L0008 +L0006 stb ,u+ +L0008 leax _iob,y + pshs x + lbsr getc + leas 2,s + cmpb #$0d + beq L0021 + cmpd #-1 + bne L0006 + clra + clrb + bra L0025 +L0021 clr ,u + ldd 4,s +L0025 puls u,pc +fgets: pshs u + ldx 4,s + clr ,x + ldu 6,s + beq L0060 + pshs x + bra L003f +L0035 ldx ,s + stb ,x+ + stx ,s + cmpb #$0d + beq L0054 +L003f leau -1,u + stu -2,s + beq L0054 + ldd 10,s + pshs d + lbsr getc + leas 2,s + cmpd #-1 + bne L0035 +L0054 clr [,s] + cmpd #-1 + bne L0060 + clra + clrb + bra L0062 +L0060 ldd 6,s +L0062 leas 2,s + puls u,pc + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/gs1.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,26 @@ +* Disassembly by Os9disasm of gs1.r + + section code + +* OS-9 system function equates + +I$GetStt equ $8d + +_gs_size: ldb #2 + bra L0006 +_gs_pos: ldb #5 +L0006 pshs u + lda 5,s + os9 I$GetStt + bcc L0019 + ldx #-1 + tfr x,u + clra + std errno,y +L0019 stx _flacc,y + leax _flacc,y + stu 2,x + puls u,pc + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/gs2.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,43 @@ +* Disassembly by Os9disasm of gs2.r + + section code + +* OS-9 system function equates + +I$GetStt equ $8d + +_gs_rdy: ldb #1 + lda 3,s + os9 I$GetStt + lblo _os9err + clra + rts +_gs_eof: ldb #6 + bra L0015 +_gs_opt: ldb #0 + ldx 4,s +L0015 lda 3,s + os9 I$GetStt + bra L0042 +_gs_devn: ldb #$0e + ldx 4,s + lda 3,s + os9 I$GetStt + bcs L0042 +L0027 lda ,x+ + bpl L0027 + anda #$7f + sta -1,x + clr ,x + rts +_gs_gfd: pshs y + ldb #$0f + lda 5,s + ldx 6,s + ldy 8,s + os9 I$GetStt + puls y +L0042 lbra _sysret + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/htoi.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,45 @@ +* Disassembly by Os9disasm of htoi.r + + section code + +htoi: clra + clrb + pshs d,u + ldu 6,s + leax _chcodes,y +L000a ldb ,u + cmpb #$20 + beq L0014 + cmpb #9 + bne L003b +L0014 leau 1,u + bra L000a +L0018 ldd ,s + lslb + rola + lslb + rola + lslb + rola + lslb + rola + std ,s + ldb ,u+ + subb #$30 + cmpb #9 + ble L0034 + subb #7 + cmpb #$0f + ble L0034 + subb #$20 +L0034 clra + addd ,s + std ,s + ldb ,u +L003b ldb b,x + andb #$40 + bne L0018 + puls d,u,pc + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/htol.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,50 @@ +* Disassembly by Os9disasm of htol.r + + section code + +htol: pshs y,u + leax _flacc,y + leay _chcodes,y + ldu 6,s + clra + clrb + std ,x + std 2,x +L0012 ldb ,u + cmpb #$20 + beq L001c + cmpb #9 + bne L004e +L001c leau 1,u + bra L0012 +L0020 lda #4 +L0022 asl 3,x + rol 2,x + rol 1,x + rol ,x + deca + bne L0022 + ldb ,u+ + subb #$30 + cmpb #9 + ble L003d + subb #7 + cmpb #$0f + ble L003d + subb #$20 +L003d andcc #254 + lda #3 + bra L0045 +L0043 ldb #0 +L0045 adcb a,x + stb a,x + deca + bpl L0043 + ldb ,u +L004e ldb b,y + andb #$40 + bne L0020 + puls y,u,pc + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/id.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,46 @@ +* Disassembly by Os9disasm of id.r + + section code + +* OS-9 system function equates + +F$ID equ $0c +F$SUser equ $1c + +* class X external label equates + +X004b equ $004b + +getpid: pshs y + os9 F$ID + puls y + tfr a,b + clra + rts +getuid: pshs y + os9 F$ID + tfr y,d + puls y,pc +asetuid: pshs y + bra L0027 +setuid: pshs y + bsr getuid + std -2,s + beq L0027 + ldb #$d6 +L0022 puls y + lbra _os9err +L0027 ldy 4,s + os9 F$SUser + bcc L003b + cmpb #$d0 + bne L0022 + tfr y,d + ldy X004b + std 9,y +L003b clra + clrb + puls y,pc + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/index.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,28 @@ +* Disassembly by Os9disasm of index.r + + section code + +strchr: ldx 2,s +L0002 ldb ,x+ + beq L000e + cmpb 5,s + bne L0002 + tfr x,d + bra L0025 +L000e clra + rts +strrchr: ldx 2,s + ldd #1 + pshs d + bra L001f +L0019 cmpb 7,s + bne L001f + stx ,s +L001f ldb ,x+ + bne L0019 + puls d +L0025 subd #1 + rts + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/intercept.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,33 @@ +* Disassembly by Os9disasm of intercept.r + +* OS-9 system function equates + +F$Icpt equ $09 + + section bss + +* Uninitialized data (class B) +B0000 rmb 2 +* Initialized Data (class G) + + endsect + + section code + +intercept: pshs u + tfr y,u + ldx 4,s + stx B0000,y + leax >L0016,pcr + os9 F$Icpt + puls u + lbra _sysret +L0016 tfr u,y + clra + pshs d + jsr [B0000,y] + leas 2,s + rti + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/iob_data.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,216 @@ +* Disassembly by Os9disasm of iob_data.r + + section code + +* Initialized Data (class G) +_iob: fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $01 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $02 + fcb $00 + fcb $01 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $46 + fcb $00 + fcb $02 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/l3tol.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,30 @@ +* Disassembly by Os9disasm of l3tol.r + + section code + +l3tol: pshs u + ldu 4,s + ldd 6,s + addd #1 + bra L0021 +L000b clra + clrb + stb ,u + ldx 6,s + ldb -1,x + stb 1,u + ldd [6,s] + std 2,u + leau 4,u + ldd 6,s + addd #3 +L0021 std 6,s + ldd 8,s + addd #-1 + std 8,s + subd #-1 + bgt L000b + puls u,pc + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/lseek.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,54 @@ +* Disassembly by Os9disasm of lseek.r + + section code + +* OS-9 system function equates + +I$Seek equ $88 +I$GetStt equ $8d + +lseek: pshs u + ldd 10,s + bne L000e + ldu #0 + ldx #0 + bra L0042 +L000e cmpd #1 + beq L0039 + cmpd #2 + beq L002e + ldb #247 +L001c clra + std errno,y + ldd #-1 + leax _flacc,y + std ,x + std 2,x + puls u,pc +L002e lda 5,s + ldb #2 + os9 I$GetStt + bcs L001c + bra L0042 +L0039 lda 5,s + ldb #5 + os9 I$GetStt + bcs L001c +L0042 tfr u,d + addd 8,s + std _flacc+2,y + tfr d,u + tfr x,d + adcb 7,s + adca 6,s + bmi L001c + tfr d,x + std _flacc,y + lda 5,s + os9 I$Seek + bcs L001c + leax _flacc,y + puls u,pc + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/ltoa.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,57 @@ +* Disassembly by Os9disasm of ltoa.r + + section code + +* class D external label equates + +D0000 equ $0000 +D000a equ $000a + +ltoa: clra + clrb + pshs d,u + ldu 10,s + tst 6,s + bpl L0018 + inc ,s + leax 6,s + pshs x + leax 8,s + lbsr _lneg + lbsr _lmove +L0018 ldd 8,s + pshs d + ldd 8,s + pshs d + leax >L005e,pcr + lbsr _lmod + ldb 3,x + addb #$30 + stb ,u+ + leax 6,s + pshs x + ldd 2,x + pshs d + ldd ,x + pshs d + leax >L005e,pcr + lbsr _ldiv + lbsr _lmove + ldd 8,s + addd 6,s + bne L0018 + tst ,s + beq L0051 + ldb #$2d + stb ,u+ +L0051 clr ,u + ldd 10,s + pshs d + lbsr reverse + leas 4,s + puls u,pc +L005e neg D0000 + neg D000a + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/ltol3.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,27 @@ +* Disassembly by Os9disasm of ltol3.r + + section code + +ltol3: pshs u + ldu 4,s + leau 1,u + bra L001d +L0008 ldx 6,s + ldb 1,x + stb -1,u + ldx 6,s + ldd 2,x + std ,u + ldd 6,s + addd #4 + std 6,s + leau 3,u +L001d ldd 8,s + addd #-1 + std 8,s + subd #-1 + bgt L0008 + puls u,pc + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/makefile Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,45 @@ +# Makefile to create assembler library +include $(NITROS9DIR)/rules.mak + +MODS = _prgname.o abort.o abs.o access.o adump.o atof.o atoi.o atol.o \ + bsearch.o \ + calloc.o case.o ccdiv.o ccmod.o ccmult.o cfinish.o cfloats.o \ + chcodes.o chmod.o chown.o claddsub.o clbits.o clcommon.o \ + clcompare.o clconvert.o cldiv.o clincdec.o clmove.o clmul.o \ + clnegcompl.o clshifts.o create.o cshifts.o \ + datmods.o defdrive.o devtyp.o dir.o dirutil.o \ + errmsg.o \ + fflush.o findstr.o fopen.o fread.o fseek.o ftelldummy.o \ + fwrite.o \ + getc.o getopt.o gets.o gs1.o gs2.o \ + htoi.o htol.o \ + id.o index.o intercept.o iob_data.o \ + l3tol.o lseek.o ltoa.o ltol3.o \ + mem.o memccpy.o memchr.o memcmp.o memcpy.o memory.o \ + memset.o minmax.o misc.o mktemp.o mod.o \ + open.o \ + patmatch.o pffdummy.o pfldummy.o \ + popen.o printf.o process.o prof.o profdummy.o putc.o \ + puts.o pwcryp.o pwent.o \ + rand.o read.o realloc.o reverse.o rpterr.o \ + scale.o setbase.o setbuf.o setjmp.o sets.o signal.o skip.o \ + sleep.o ss1.o ss2.o ss3.o stat.o strass.o strclr.o strcmp.o \ + strhcpy.o strings.o stringsu.o strlen.o strncat.o strncmp.o \ + strncpy.o strnucmp.o strpbrk.o strspn.o strtok.o strucmp.o \ + swab.o syscall.o syscommon.o system.o \ + tidyup.o time.o \ + uminmax.o utime.o \ + write.o \ + xtoa.o + +NOTYET = pffinit.o plfinit.o + +all: ../clib.a + +../clib.a: $(MODS) + lwar -c $@ $? + +dskclean: clean + +clean: + $(RM) *.o ../clib.a
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/mem.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,85 @@ +* Disassembly by Os9disasm of mem.r + +* OS-9 system function equates + +F$Mem equ $07 + + section bss + +* Uninitialized data (class B) +_spare: rmb 2 +* Initialized Data (class G) + + endsect + + section code + +sbrk: ldd memend,y + pshs d + ldd 4,s + cmpd _spare,y + bcs L0035 + pshs y + clra + clrb + os9 F$Mem + addd 6,s + os9 F$Mem + tfr y,d + puls y + bcc L0027 + ldd #-1 + leas 2,s + rts +L0027 std memend,y + addd _spare,y + subd ,s + std _spare,y +L0035 leas 2,s + ldd _spare,y + pshs d + subd 4,s + std _spare,y + ldd memend,y + subd ,s++ + pshs d + clra + ldx ,s +L004e sta ,x+ + cmpx memend,y + bcs L004e + puls d,pc +ibrk: ldd 2,s + addd _mtop,y + bcs L0081 + cmpd _stbot,y + bcc L0081 + pshs d + ldx _mtop,y + clra +L006e cmpx ,s + bcc L0076 + sta ,x+ + bra L006e +L0076 ldd _mtop,y + puls x + stx _mtop,y + rts +L0081 ldd #-1 + rts +unbrk: ldd 2,s + pshs y + os9 F$Mem + bcc L0093 + ldd #-1 + puls y,pc +L0093 tfr y,d + puls y + std memend,y + clra + clrb + std _spare,y + rts + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/memccpy.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,22 @@ +* Disassembly by Os9disasm of memccpy.r + + section code + +memccpy: pshs y,u + ldu 8,s + ldx 6,s + ldy 12,s + beq L001b +L000b lda ,u+ + sta ,x+ + cmpa 11,s + bne L0017 + tfr u,d + bra L001d +L0017 leay -1,y + bne L000b +L001b tfr y,d +L001d puls y,u,pc + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/memchr.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,22 @@ +* Disassembly by Os9disasm of memchr.r + + section code + +memchr: pshs x,u + ldu 6,s + ldx 10,s + beq L0018 +L0008 lda ,u+ + cmpa 9,s + bne L0014 + leau -1,u + tfr u,d + bra L001a +L0014 leax -1,x + bne L0008 +L0018 clra + clrb +L001a puls x,u,pc + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/memcmp.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,25 @@ +* Disassembly by Os9disasm of memcmp.r + + section code + +memcmp: pshs y,u + ldx 6,s + cmpx 8,s + beq L001d + ldu 8,s + ldy 10,s + beq L001d +L000f ldb ,u+ + subb ,x+ + beq L0019 + negb + sex + bra L001f +L0019 leay -1,y + bne L000f +L001d clra + clrb +L001f puls y,u,pc + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/memcpy.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,25 @@ +* Disassembly by Os9disasm of memcpy.r + + section code + +memcpy: pshs y,u + ldu 6,s + ldy 8,s + ldd 10,s + lsra + rorb + tfr d,x + bcc L0013 + lda ,y+ + sta ,u+ +L0013 stx -2,s + beq L001f +L0017 ldd ,y++ + std ,u++ + leax -1,x + bne L0017 +L001f ldd 6,s + puls y,u,pc + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/memory.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,144 @@ +* Disassembly by Os9disasm of memory.r + + section bss + +* Uninitialized data (class B) +B0000 rmb 2 +B0002 rmb 2 +* Initialized Data (class G) +G0000 fcb $00 + fcb $00 + + endsect + + section code + +L0000 ldd 2,s + addd #$00ff + clrb + pshs d + lslb + rola + lslb + rola + pshs d + lbsr sbrk + leas 2,s + puls u + cmpd #-1 + beq L002b + exg d,u + std 2,u + leau 4,u + pshs u + bsr free + leas 2,s + ldu G0000,y +L002b rts +malloc: pshs d,u + ldd 6,s + addd #3 + lsra + rorb + lsra + rorb + addd #1 + std ,s + ldx G0000,y + bne L0054 + leax B0000,y + stx G0000,y + stx B0000,y + clra + clrb + std B0002,y +L0054 ldu ,x + bra L005c +L0058 tfr u,x + ldu ,u +L005c ldd 2,u + cmpd ,s + bcs L0085 + bne L006b + ldd ,u + std ,x + bra L007b +L006b ldd 2,u + subd ,s + std 2,u + lslb + rola + lslb + rola + leau d,u + ldd ,s + std 2,u +L007b stx G0000,y + leau 4,u + tfr u,d + bra L0093 +L0085 cmpu G0000,y + bne L0058 + lbsr L0000 + bne L0058 + clra + clrb +L0093 leas 2,s + puls u,pc +free: pshs d,u + ldu 6,s + leau -4,u + ldx G0000,y + bra L00b3 +L00a3 cmpx ,x + bcs L00b1 + cmpu ,s + bhi L00bf + cmpu ,x + bcs L00bf +L00b1 ldx ,x +L00b3 stx ,s + cmpu ,s + bls L00a3 + cmpu ,x + bcc L00a3 +L00bf pshs u + ldd 2,u + lslb + rola + lslb + rola + addd ,s++ + cmpd ,x + bne L00de + pshs x + ldx ,x + ldd 2,x + puls x + addd 2,u + std 2,u + ldd [,x] + bra L00e0 +L00de ldd ,x +L00e0 std ,u + ldd 2,x + lslb + rola + lslb + rola + addd ,s + pshs d + cmpu ,s++ + bne L00fd + ldd 2,x + addd 2,u + std 2,x + ldd ,u + std ,x + bra L00ff +L00fd stu ,x +L00ff stx G0000,y + bra L0093 + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/memset.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,17 @@ +* Disassembly by Os9disasm of memset.r + + section code + +memset: pshs u + ldu 4,s + ldx 8,s + beq L0010 + ldb 7,s +L000a stb ,u+ + leax -1,x + bne L000a +L0010 ldd 4,s + puls u,pc + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/minmax.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,17 @@ +* Disassembly by Os9disasm of minmax.r + + section code + +min: ldd 2,s + cmpd 4,s + ble L0009 + ldd 4,s +L0009 rts +max: ldd 2,s + cmpd 4,s + bge L0013 + ldd 4,s +L0013 rts + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/misc.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,35 @@ +* Disassembly by Os9disasm of misc.r + + section code + +* OS-9 system function equates + +F$Sleep equ $0a +F$PErr equ $0f +F$CRC equ $17 + +lock: rts +pause: ldx #0 + clrb + os9 F$Sleep + lbra _os9err +sync: rts +crc: pshs y,u + ldx 6,s + ldy 8,s + ldu 10,s + os9 F$CRC + puls y,u,pc +prerr: lda 3,s + ldb 5,s + os9 F$PErr + lblo _os9err + rts +tsleep: ldx 2,s + os9 F$Sleep + lblo _os9err + tfr x,d + rts + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/mktemp.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,26 @@ +* Disassembly by Os9disasm of mktemp.r + + section code + +mktemp: pshs u + ldu 4,s +L0004 ldb ,u+ + beq L0024 + cmpb #$58 + bne L0004 + leau -1,u + pshs u + ldd #5 +L0013 sta ,u+ + decb + bne L0013 + puls u + lbsr getpid + pshs d,u + lbsr itoa + leas 4,s +L0024 ldd 4,s + puls u,pc + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/mod.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,41 @@ +* Disassembly by Os9disasm of mod.r + + section code + +* OS-9 system function equates + +F$Link equ $00 +F$Load equ $01 +F$UnLink equ $02 + +modlink: pshs y,u + ldx 6,s + lda 9,s + asla + asla + asla + asla + ora 11,s + os9 F$Link +L000f tfr u,d + puls y,u + lblo _os9err + rts +modload: pshs y,u + ldx 6,s + lda 9,s + asla + asla + asla + asla + ora 11,s + os9 F$Load + bra L000f +munlink: pshs u + ldu 4,s + os9 F$UnLink + puls u + lbra _sysret + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/open.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,22 @@ +* Disassembly by Os9disasm of open.r + + section code + +* OS-9 system function equates + +I$Open equ $84 +I$Close equ $8f + +open: ldx 2,s + lda 5,s + os9 I$Open + lblo _os9err + tfr a,b + clra + rts +close: lda 3,s + os9 I$Close + lbra _sysret + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/patmatch.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,59 @@ +* Disassembly by Os9disasm of patmatch.r + + section code + +patmatch: pshs u + ldu 6,s + leas -2,s + bra L0041 +L0008 cmpb #$2a + bne L0023 +L000c ldb 11,s + clra + pshs d + pshs u + ldd 10,s + pshs d + bsr patmatch + leas 6,s + bne L005b + ldb ,u+ + bne L000c + bra L0060 +L0023 tst ,u + beq L0060 + cmpb #$3f + bne L002f + leau 1,u + bra L0041 +L002f ldb ,u+ + tst 11,s + beq L003d + clra + pshs d + lbsr toupper + leas 2,s +L003d cmpb 1,s + bne L0060 +L0041 ldx 6,s + ldb ,x+ + stx 6,s + tst 11,s + beq L0053 + clra + pshs d + lbsr toupper + leas 2,s +L0053 stb 1,s + bne L0008 + ldb ,u + bne L0060 +L005b ldd #1 + bra L0062 +L0060 clra + clrb +L0062 leas 2,s + puls u,pc + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/pffdummy.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,15 @@ +* Disassembly by Os9disasm of pffdummy.r + + section code + +* class D external label equates + +D0000 equ $0000 + +pffloat: leax >L0007,pcr + tfr x,d + rts +L0007 fcb $00 + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/pffinit.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,703 @@ +* Disassembly by Os9disasm of pffinit.r + + section bss + +* Uninitialized data (class D) +D0000 rmb 1 +* Initialized Data (class H) + + endsect + + + section bss + +* Uninitialized data (class B) +B0000 rmb 1 +B0001 rmb 29 +B001e rmb 0 +* Initialized Data (class G) +G0000 fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $81 + fcb $4c + fcb $cc + fcb $cc + fcb $cc + fcb $cc + fcb $cc + fcb $cd + fcb $7d + fcb $23 + fcb $d7 + fcb $0a + fcb $3d + fcb $70 + fcb $a3 + fcb $d7 + fcb $7a + fcb $03 + fcb $12 + fcb $6e + fcb $97 + fcb $8d + fcb $4f + fcb $df + fcb $77 + fcb $51 + fcb $b7 + fcb $17 + fcb $58 + fcb $e2 + fcb $19 + fcb $65 + fcb $73 + fcb $27 + fcb $c5 + fcb $ac + fcb $47 + fcb $1b + fcb $47 + fcb $84 + fcb $70 + fcb $06 + fcb $37 + fcb $bd + fcb $05 + fcb $af + fcb $6c + fcb $6a + fcb $6d + fcb $56 + fcb $bf + fcb $94 + fcb $d5 + fcb $e5 + fcb $7a + fcb $43 + fcb $69 + fcb $2b + fcb $cc + fcb $77 + fcb $11 + fcb $84 + fcb $61 + fcb $cf + fcb $66 + fcb $09 + fcb $70 + fcb $5f + fcb $41 + fcb $36 + fcb $b4 + fcb $a6 + fcb $63 + fcb $5b + fcb $e6 + fcb $fe + fcb $ce + fcb $bd + fcb $ed + fcb $d6 + fcb $5f + fcb $2f + fcb $eb + fcb $ff + fcb $0b + fcb $cb + fcb $24 + fcb $ab + fcb $5c + fcb $0c + fcb $bc + fcb $cc + fcb $09 + fcb $6f + fcb $50 + fcb $89 + fcb $59 + fcb $61 + fcb $2e + fcb $13 + fcb $42 + fcb $4b + fcb $b4 + fcb $0e + fcb $55 + fcb $34 + fcb $24 + fcb $dc + fcb $35 + fcb $09 + fcb $5c + fcb $d8 + fcb $52 + fcb $10 + fcb $1d + fcb $7c + fcb $f7 + fcb $3a + fcb $b0 + fcb $ad + fcb $4f + fcb $66 + fcb $95 + fcb $94 + fcb $be + fcb $c4 + fcb $4d + fcb $e1 + fcb $4b + fcb $38 + fcb $77 + fcb $aa + fcb $32 + fcb $36 + fcb $a4 + fcb $b4 + fcb $48 + fdb G0090 + + endsect + + section code + +pffinit: pshs u + puls u,pc +pffloat: pshs d,u + ldx 6,s + bra L001a +L000a ldd #1 + bra L0016 +L000f ldd #-1 + bra L0016 +L0014 clra + clrb +L0016 std ,s + bra L0037 +L001a cmpx #'f + beq L000a + cmpx #'e + beq L000f + cmpx #'E + lbeq L000f + cmpx #'g + beq L0014 + cmpx #'G + lbeq L0014 +L0037 ldd 6,s + leax _chcodes,y + leax d,x + ldb ,x + clra + andb #2 + pshs d + ldd 2,s + pshs d + ldd 12,s + pshs d + ldd [16,s] + addd #8 + std [16,s] + subd #8 + pshs d + bsr L0064 + leas 8,s + leas 2,s + puls u,pc +L0064 pshs u + leas -32,s + ldd #1 + std 8,s + leax ,s + pshs x + ldx 38,s + lbsr _dmove + leau ,s + ldb 7,u + bne L008f + clra + clrb + std 24,s + std 26,s + std 18,s + leax 32,s + lbra L0181 +L008f ldb 7,u + clra + addd #-128 + std 22,s + bge L00a9 + ldd 22,s + nega + negb + sbca #0 + std 22,s + ldd #1 + bra L00ab +L00a9 clra + clrb +L00ab std 24,s + ldd 22,s + pshs d + ldd #78 + lbsr ccmult + pshs d + ldd #8 + lbsr ccasr + std 20,s + ldd 24,s + beq L00d2 + ldd 20,s + nega + negb + sbca #0 + bra L00d5 +L00d2 ldd 20,s +L00d5 addd #1 + std 18,s + ldb ,u + bge L00eb + ldb ,u + clra + andb #$7f + stb ,u + ldd #1 + bra L00ed +L00eb clra + clrb +L00ed std 26,s + leax ,s + pshs x + ldd 26,s + pshs d + ldd 24,s + pshs d + leax 6,s + lbsr _dstack + lbsr scale + leas 12,s + lbsr _dmove + bra L012f +L010d leax ,s + pshs x + lbsr _dstack + bsr L011e + fdb 8192,0,0,132 +L011e puls x + lbsr _dmul + lbsr _dmove + ldd 18,s + addd #-1 + std 18,s +L012f leax ,s + lbsr _dstack + bsr L013e + fdb 0,0,0,129 +L013e puls x + lbsr _dcmpr + blt L010d + bra L0169 +L0147 leax ,s + pshs x + lbsr _dstack + bsr L0158 + fdb 8192,0,0,132 +L0158 puls x + lbsr _ddiv + lbsr _dmove + ldd 18,s + addd #1 + std 18,s +L0169 leax ,s + lbsr _dstack + bsr L0178 + fdb 8192,0,0,132 +L0178 puls x + lbsr _dcmpr + bge L0147 + bra L0184 +L0181 leas -32,x +L0184 leax B0000,y + stx 30,s + ldd #'0 + ldx 30,s + leax 1,x + stx 30,s + stb -1,x + ldd 26,s + beq L01aa + ldd #'- + ldx 30,s + leax 1,x + stx 30,s + stb -1,x +L01aa ldd 38,s + cmpd #$0010 + ble L01b8 + ldd #$0010 + bra L01bf +L01b8 ldd 38,s + bge L01c2 + clra + clrb +L01bf std 38,s +L01c2 clra + clrb + std 10,s + ldd 40,s + bne L01e0 + ldd #1 + std 10,s + ldd 18,s + cmpd #5 + lbgt L0252 + leax 32,s + bra L0213 +L01e0 ldd 40,s + bge L0216 + bra L01ea +L01e7 leas -32,x +L01ea ldd #1 + std 16,s + ldd #1 + std 12,s + leax ,s + lbsr _dstack + bsr L0204 + fdb 0,0,0,0 +L0204 puls x + lbsr _dcmpr + bne L0258 + ldd #1 + std 18,s + bra L0258 +L0213 leas -32,x +L0216 clra + clrb + std 16,s + ldd 18,s + std 12,s + bge L0247 + ldd 12,s + addd 38,s + blt L0233 + ldd 38,s + addd 12,s + std 38,s + bra L0258 +L0233 ldd 38,s + nega + negb + sbca #0 + std 12,s + clra + clrb + std 38,s + clra + clrb + std 8,s + bra L0258 +L0247 ldd 12,s + addd 38,s + cmpd #$0019 + ble L0258 +L0252 leax 32,s + lbra L01e7 +L0258 leax G0000,y + stx 14,s + leax ,s + pshs x + lbsr L0464 + leas 2,s + ldd 12,s + bge L029e + ldd #'0 + ldx 30,s + leax 1,x + stx 30,s + stb -1,x + ldd 30,s + std 28,s + ldd #'. + bra L0286 +L0283 ldd #'0 +L0286 ldx 30,s + leax 1,x + stx 30,s + stb -1,x + ldd 12,s + addd #1 + std 12,s + subd #1 + bne L0283 + bra L02f1 +L029e ldd 12,s + bne L02be + ldd #'0 + bra L02b4 +L02a7 leax 14,s + pshs x + leax 2,s + pshs x + lbsr L049c + leas 4,s +L02b4 ldx 30,s + leax 1,x + stx 30,s + stb -1,x +L02be ldd 12,s + addd #-1 + std 12,s + subd #-1 + bne L02a7 + ldd 30,s + std 28,s + ldd 38,s + beq L02f1 + ldd #'. + bra L02e7 +L02da leax 14,s + pshs x + leax 2,s + pshs x + lbsr L049c + leas 4,s +L02e7 ldx 30,s + leax 1,x + stx 30,s + stb -1,x +L02f1 ldd 38,s + addd #-1 + std 38,s + subd #-1 + bgt L02da + ldd 8,s + lbeq L037b + leas -4,s + ldd 34,s + std ,s + tfr d,x + pshs x + leax 20,s + pshs x + leax 8,s + pshs x + lbsr L049c + leas 4,s + stb [,s++] + ldd #5 + std 2,s +L0325 ldb [,s] + sex + tfr d,x + bra L0343 +L032c ldd ,s + addd #-1 + std ,s + bra L034d +L0335 ldd #'- + ldx ,s + stb -1,x + ldd #'0 + stb [,s] + bra L034d +L0343 cmpx #'. + beq L032c + cmpx #'- + beq L0335 +L034d ldb [,s] + sex + addd 2,s + stb [,s] + cmpd #'9 + ble L035f + ldd #1 + bra L0361 +L035f clra + clrb +L0361 std 2,s + beq L0379 + ldb [,s] + sex + subd #10 + stb [,s] + bra L036f +L036f ldd ,s + addd #-1 + std ,s + lbra L0325 +L0379 leas 4,s +L037b ldd 16,s + lbeq L03f2 + ldd 42,s + beq L038c + ldd #'E + bra L038f +L038c ldd #'e +L038f ldx 30,s + leax 1,x + stx 30,s + stb -1,x + ldd 18,s + addd #-1 + std 18,s + bge L03b3 + ldd 18,s + nega + negb + sbca #0 + std 18,s + ldd #$002d + bra L03b6 +L03b3 ldd #'+ +L03b6 ldx 30,s + leax 1,x + stx 30,s + stb -1,x + ldd 18,s + pshs d + ldd #10 + lbsr ccdiv + addd #'0 + ldx 30,s + leax 1,x + stx 30,s + stb -1,x + ldd 18,s + pshs d + ldd #10 + lbsr ccmod + addd #'0 + ldx 30,s + leax 1,x + stx 30,s + stb -1,x + bra L0422 +L03f2 ldd 10,s + beq L0422 + ldd 30,s + cmpd 28,s + beq L0422 + bra L0413 +L0401 ldb [30,s] + cmpb #'0 + beq L0413 + ldd 30,s + addd #1 + std 30,s + bra L0422 +L0413 ldd 30,s + addd #-1 + std 30,s + cmpd 28,s + bne L0401 +L0422 clra + clrb + stb [30,s] + leax B001e,y + cmpx 30,s + bhi L044b + leax L04eb,pcr + pshs x + leax _iob+26,y + pshs x + lbsr fprintf + leas 4,s + ldd #1 + pshs d + lbsr exit + leas 2,s +L044b ldb B0000,y + cmpb #'0 + bne L0459 + leax B0001,y + bra L045d +L0459 leax B0000,y +L045d tfr x,d + leas 32,s + puls u,pc +L0464 pshs u + ldx 4,s + lda 7,x + suba #$80 + bcs L0496 + ldb ,x + orb #$80 + stb ,x + clr 7,x + suba #4 + beq L048d +L047a lsr ,x + ror 1,x + ror 2,x + ror 3,x + ror 4,x + ror 5,x + ror 6,x + ror 7,x + inca + bne L047a +L048d lda #8 +L048f deca + bmi L0496 + ldb a,x + beq L048f +L0496 sta D0000 + clra + clrb + puls u,pc +L049c ldx 2,s + clra + ldb ,x + lsrb + lsrb + lsrb + lsrb + addb #'0 + pshs d,u + ldb ,x + andb #$0f + stb ,x + bsr L04dd + lda D0000 + bmi L04db +L04b5 ldb a,x + bne L04bc + deca + bpl L04b5 +L04bc sta D0000 + bmi L04db + leas -8,s +L04c2 ldb a,x + stb a,s + deca + bpl L04c2 + bsr L04dd + bsr L04dd + lda D0000 + clrb +L04d0 ldb a,x + adcb a,s + stb a,x + deca + bpl L04d0 + leas 8,s +L04db puls d,u,pc +L04dd lda D0000 + bmi L04ea + asl a,x + bra L04e7 +L04e5 rol a,x +L04e7 deca + bpl L04e5 +L04ea rts +L04eb fcc "pffinit buffer overflow" + fcb $0d,$00 + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/pffinit.c Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,450 @@ +/* ************************************************************************ * + * pffinit.c - Source for COCO print routines for floats * + * ************************************************************************ */ + +#include <ctype.h> +#include <stdio.h> + +extern double scale (); + +static direct char D0000; + +static char B0000; +static char B0001[29]; + +/* Initialize G0000 */ +static char G0000[] = { + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x81, + 0x4c, 0xcc, 0xcc, 0xcc, + 0xcc, 0xcc, 0xcd, 0x7d, + 0x23, 0xd7, 0x0a, 0x3d, + 0x70, 0xa3, 0xd7, 0x7a, + 0x03, 0x12, 0x6e, 0x97, + 0x8d, 0x4f, 0xdf, 0x77, + 0x51, 0xb7, 0x17, 0x58, + 0xe2, 0x19, 0x65, 0x73, + 0x27, 0xc5, 0xac, 0x47, + 0x1b, 0x47, 0x84, 0x70, + 0x06, 0x37, 0xbd, 0x05, + 0xaf, 0x6c, 0x6a, 0x6d, + 0x56, 0xbf, 0x94, 0xd5, + 0xe5, 0x7a, 0x43, 0x69, + 0x2b, 0xcc, 0x77, 0x11, + 0x84, 0x61, 0xcf, 0x66, + 0x09, 0x70, 0x5f, 0x41, + 0x36, 0xb4, 0xa6, 0x63, + 0x5b, 0xe6, 0xfe, 0xce, + 0xbd, 0xed, 0xd6, 0x5f, + 0x2f, 0xeb, 0xff, 0x0b, + 0xcb, 0x24, 0xab, 0x5c, + 0x0c, 0xbc, 0xcc, 0x09, + 0x6f, 0x50, 0x89, 0x59, + 0x61, 0x2e, 0x13, 0x42, + 0x4b, 0xb4, 0x0e, 0x55, + 0x34, 0x24, 0xdc, 0x35, + 0x09, 0x5c, 0xd8, 0x52, + 0x10, 0x1d, 0x7c, 0xf7, + 0x3a, 0xb0, 0xad, 0x4f, + 0x66, 0x95, 0x94, 0xbe, + 0xc4, 0x4d, 0xe1, 0x4b, + 0x38, 0x77, 0xaa, 0x32, + 0x36, 0xa4, 0xb4, 0x48 +}; + +/* dummy function to include this ROF */ + +pffinit () +{ + return; +} + +pffloat (parm1, parm2, parm3, parm4) + int parm1; + int parm2; + double **parm3; + int parm4; +{ + int pfv0; + + switch (parm1) + { + case 'f': /* L000a */ + pfv0 = 1; + break; + case 'e': /* L000f */ + case 'E': /* L000f */ + pfv0 = -1; + break; + case 'g': /* L0014 */ + case 'G': /* L0014 */ + pfv0 = 0; + break; + } + + L0064 ((*parm3)++, parm2, pfv0, _chcodes [parm1] & 2); +} + +L0064 (parm1, parm2, parm3, parm4, parm5) + double *parm1; + int parm2; + int parm3; + int parm4; + int parm5; +{ + char *var30; + int var28; + int var26; + int var24; + int var22; + int var20; + int var18; + int var16; + int var14; + int var12; + int var10; /* temporarily ? */ + int var8; + double var0; + + register char * regptr; + + var8 = 1; + var0 = *parm1; + regptr = (char *)(&var0); + + if (regptr[7] == 0) /* else L008f */ + { + var18 = var26 = var24 = 0; + goto L0181; + } + + var22 = (regptr[7] & 0xff) - 0x80; + + /* L008f */ + if (var22 < 0) /* else L00a9 */ + { + var22 = -var22; + var24 = 1; + } + else + { + var24 = 0; + } + + var20 = (var22 * 78) >> 8; + + if (var24) + { + var18 = -var20 + 1; + } + else + { + var18 = var20 + 1; + } + + if (regptr[0] < 0) /* else L00eb */ + { + regptr[0] &= 0x7f; + var26 = 1; + } + else + { + var26 = 0; + } + + var0 = scale (var0, var20, var24); /* go to L012f */ + + while (var0 < 1) + { + var0 *= 10; + --var18; + } + + while (var0 >= 10) /* L0169 */ + { + var0 /= 10; + ++var18; + } + +L0181: + var30 = &B0000; + *(var30++) = '0'; + + if (var26) /* else L01aa */ + { + *(var30++) = '-'; + } + + if (parm2 > 16) /* else L01aa */ + { + parm2 = 16; + } + else + { + if (parm2 < 0) + { + parm2 = 0; + } + } + + var10 = 0; /* L01c2 */ + + if ( ! parm3) /* else L01e0 */ + { + var10 = 1; + + if (var18 > 5) + { + goto L01e7; + } + + goto L0213; + } + else + { + if (parm3 < 0) + { +L01e7: + var16 = 1; + var12 = 1; + + if (var0 == 0) /* else L0258 */ + { + var18 = 1; + } + } + else + { +L0213: + var16 = 0; + + if ((var12 = var18) < 0) /* else L0247 */ + { + if ((var12 + parm2) >= 0) /* else L0233 */ + { + parm2 += var12; + /* go to L0258 */ + } + else + { + var12 = -parm2; + parm2 = 0; + var8 = 0; + } + } + else + { /* L0247 */ + if ((var12 + parm2) > 25) + { + goto L01e7; + } + } + } + } + + /* L0258 */ + var14 = G0000; + L0464 (&var0); + + if (var12 < 0) /* else L029e */ + { + *(var30++) = '0'; + var28 = var30; + *(var30++) = '.'; + + while (var12++) + { + *(var30++) = '0'; + } + /* go to L02f1 */ + } + else + { /* L029e */ + if ( ! var12) /* else L02be */ + { + *(var30++) = '0'; + } + + while (var12--) + { + *(var30++) = L049c (&var0, &var14); + } + + var28 = var30; + + if (parm2) + { + *(var30++) = '.'; + } + } + + while (((parm2--) > 0)) /* @ L02f1 */ + { + *(var30++) = L049c (&var0, &var14); + } + + if (var8) /* else L037b */ + { + int loc02; + char *loc00; + + *(loc00 = var30) = L049c (&var0, &var14); + loc02 = 5; + + for (;;) + { + switch (*loc00) + { + case '.': /* L032c */ + --loc00; + break; + case '-': /* L0335 */ + loc00[-1] = '-'; + *loc00 = '0'; + break; + } + + /* L034d */ + /**loc00 += loc02;*/ + + if ( (loc02 = ((*loc00 += loc02) > '9'))) /* else L0379 */ + { + *loc00 -= 10; + -- loc00; + continue; + } + else + { + break; + } + + } + } + + /* L037b */ + if (var16) /* else L03f2 */ + { + *(var30++) = (parm4 ? 'E' : 'e'); + + if ((--var18 < 0)) /* else L03b3 */ + { + var18 = -var18; + *(var30++) = '-'; + } + else + { + *(var30++) = '+'; + } + + *(var30++) = (var18/10) + '0'; + *(var30++) = (var18 % 10) + '0'; + /* go to L0422 */ + } + else + { /* L03f2 */ + if ((var10) && (var30 != var28)) /* else L0422 */ + { + while ((--var30) != var28) + { + if ((*var30 != '0')) + { + ++var30; + break; + } + } + } + } + + *var30 = '\0'; /* L0422 */ + + if ((&B0001[sizeof (B0001)]) <= var30) + { + fprintf (stderr, "pffinit buffer overflow\n"); + exit (1); + } + + return (B0000 == '0' ? B0001 : &B0000); +} + +/* The following routine is strictly asm for the COCO + */ + +#ifdef COCO +#asm +L0464 pshs u + ldx 4,s + lda 7,x + suba #$80 + bcs L0496 + ldb ,x + orb #$80 + stb ,x + clr 7,x + suba #4 + beq L048d +L047a lsr ,x + ror 1,x + ror 2,x + ror 3,x + ror 4,x + ror 5,x + ror 6,x + ror 7,x + inca + bne L047a +L048d lda #8 +L048f deca + bmi L0496 + ldb a,x + beq L048f +L0496 sta D0000 + clra + clrb + puls u,pc +L049c ldx 2,s + clra + ldb ,x + lsrb + lsrb + lsrb + lsrb + addb #'0 + pshs d,u + ldb ,x + andb #$0f + stb ,x + bsr L04dd + lda D0000 + bmi L04db +L04b5 ldb a,x + bne L04bc + deca + bpl L04b5 +L04bc sta D0000 + bmi L04db + leas -8,s +L04c2 ldb a,x + stb a,s + deca + bpl L04c2 + bsr L04dd + bsr L04dd + lda D0000 + clrb +L04d0 ldb a,x + adcb a,s + stb a,x + deca + bpl L04d0 + leas 8,s +L04db puls d,u,pc +L04dd lda D0000 + bmi L04ea + asl a,x + bra L04e7 +L04e5 rol a,x +L04e7 deca + bpl L04e5 +L04ea rts +#endasm +#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/pfldummy.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,30 @@ +* Disassembly by Os9disasm of pfldummy.r + + section bss + +* Initialized Data (class G) + fcb $6c + fcb $78 +G0002 fcb $00 + + endsect + + section code + +pflong: ldb 3,s + leax G0002,y + cmpb #$64 + beq L001a + cmpb #$6f + beq L001a + cmpb #$78 + beq L001a + cmpb #$58 + beq L001a + leax -2,x + stb 1,x +L001a tfr x,d + rts + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/pflinit.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,179 @@ +* Disassembly by Os9disasm of pflinit.r + +* class D external label equates + +D003b equ $003b + + section bss + +* Uninitialized data (class B) +B0000 rmb 20 +* Initialized Data (class G) +G0000 fcb $3b + fcb $9a + fcb $ca + fcb $00 + fcb $05 + fcb $f5 + fcb $e1 + fcb $00 + fcb $00 + fcb $98 + fcb $96 + fcb $80 + fcb $00 + fcb $0f + fcb $42 + fcb $40 + fcb $00 + fcb $01 + fcb $86 + fcb $a0 + fcb $00 + fcb $00 + fcb $27 + fcb $10 + fcb $00 + fcb $00 + fcb $03 + fcb $e8 + fcb $00 + fcb $00 + fcb $00 + fcb $64 + fcb $00 + fcb $00 + fcb $00 + fcb $0a + + endsect + + section code + +pflinit: rts +pflong: pshs u + leau B0000,y + pshs u + ldb 7,s + cmpb #$64 + beq L0074 + cmpb #$6f + beq L0023 + cmpb #$78 + beq L0049 + cmpb #$58 + beq L0049 + lda #$6c + std ,u++ +L001f clr ,u + puls d,u,pc +L0023 leax 8,s +L0025 ldb 3,x + andb #7 + addb #$30 + stb ,u+ + ldb #3 + bsr L0035 + bne L0025 + bra L006b +L0035 lsr ,x + ror 1,x + ror 2,x + ror 3,x + decb + bne L0035 + lda ,x + ora 1,x + ora 2,x + ora 3,x + rts +L0049 andb #$20 + pshs b + leax 9,s +L004f ldb 3,x + andb #$0f + pshs b + lda #$30 + cmpb #9 + ble L005f + lda #$37 + adda 1,s +L005f adda ,s+ + sta ,u+ + ldb #4 + bsr L0035 + bne L004f + leas 1,s +L006b ldx ,s + clr ,u + lbsr frevers + puls d,u,pc +L0074 ldb 8,s + bpl L00a3 + ldd #0 + subd 10,s + std 10,s + ldd #0 + sbcb 9,s + sbca 8,s + std 8,s + cmpd #$8000 + bne L009f + ldd 2,x + bne L009f + leax >L00f1,pcr +L0096 lda ,x+ + sta ,u+ + bne L0096 +L009c lbra L001f +L009f ldb #$2d + stb ,u+ +L00a3 leax G0000,y + clra + ldb #$0a + pshs a + pshs d + bra L00e3 +L00b0 inc ,s +L00b2 ldd 13,s + subd 2,x + std 13,s + ldd 11,s + sbcb 1,x + sbca ,x + std 11,s + bcc L00b0 + ldd 13,s + addd 2,x + std 13,s + ldd 11,s + adcb 1,x + adca ,x + std 11,s + ldb ,s + tst 2,s + bne L00db + tstb + beq L00df + inc 2,s +L00db addb #$30 + stb ,u+ +L00df leax 4,x + clr ,s +L00e3 dec 1,s + bne L00b2 + ldb 14,s + addb #$30 + stb ,u+ + leas 3,s + bra L009c +L00f1 blt L0125 + leay -12,y + pulu b,x,y + fcb $38 + leau -10,y + pshs dp,x,y + fcb $00 + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/popen.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,254 @@ +* Disassembly by Os9disasm of popen.r + +* class D external label equates + +D0000 equ $0000 +D000d equ $000d + + section bss + +* Uninitialized data (class B) +B0000 rmb 32 +* Initialized Data (class G) + + endsect + + section code + +popen: pshs u + leas -14,s + ldu 18,s + ldb [20,s] + cmpb #$77 + bne L0012 + clra + clrb + bra L0015 +L0012 ldd #1 +L0015 std 6,s + ldd #3 + pshs d + leax L01fb,pcr + pshs x + lbsr open + leas 4,s + std 4,s + cmpd #-1 + lbeq L019d + ldd 4,s + std 2,s + ldd 6,s + pshs d + lbsr dup + leas 2,s + std ,s + cmpd #-1 + beq L0070 + ldd 6,s + pshs d + lbsr close + leas 2,s + ldd 4,s + pshs d + lbsr dup + leas 2,s + cmpd #-1 + bne L0080 + ldd ,s + pshs d + lbsr dup + leas 2,s + ldd ,s + pshs d + lbsr close + leas 2,s +L0070 ldd 4,s + pshs d + lbsr close + leas 2,s + lbra L019d + bra L0080 +L007e leau 1,u +L0080 ldb ,u + cmpb #$20 + beq L008a + ldb ,u + bne L007e +L008a ldb ,u + cmpb #$20 + bne L0092 + leau 1,u +L0092 pshs u + lbsr strlen + leas 2,s + std 8,s + addd #2 + pshs d + lbsr malloc + leas 2,s + std 12,s + pshs u + ldd 14,s + pshs d + lbsr strcpy + leas 4,s + leax L0201,pcr + pshs x + ldd 14,s + pshs d + lbsr strcat + leas 4,s + ldd 2,s + lslb + rola + leax B0000,y + leax d,x + pshs x + clra + clrb + pshs d + ldd #1 + pshs d + ldd #1 + pshs d + ldd 20,s + pshs d + ldd 18,s + addd #1 + pshs d + ldd 30,s + pshs d + lbsr os9fork + leas 12,s + std [,s++] + cmpd #-1 + bne L012a + ldd 12,s + pshs d + lbsr free + leas 2,s + ldd 6,s + pshs d + lbsr close + leas 2,s + ldd ,s + pshs d + lbsr dup + leas 2,s + ldd ,s + pshs d + lbsr close + leas 2,s + ldd 4,s + pshs d + lbsr close + leas 2,s + lbra L018f +L012a ldd 12,s + pshs d + lbsr free + leas 2,s + ldd 6,s + pshs d + lbsr close + leas 2,s + ldd ,s + pshs d + lbsr dup + leas 2,s + ldd ,s + pshs d + lbsr close + leas 2,s + ldd 20,s + pshs d + ldd 6,s + pshs d + lbsr fdopen + leas 4,s + std 10,s + bne L01a1 + ldd 4,s + pshs d + lbsr close + leas 2,s +L0169 clra + clrb + pshs d + lbsr wait + leas 2,s + std 8,s + pshs d + ldd 4,s + lslb + rola + leax B0000,y + leax d,x + ldd ,x + cmpd ,s++ + beq L018f + ldd 8,s + cmpd #-1 + bne L0169 +L018f ldd 2,s + lslb + rola + leax B0000,y + leax d,x + clra + clrb + std ,x +L019d clra + clrb + bra L01a3 +L01a1 ldd 10,s +L01a3 leas 14,s + puls u,pc +pclose: pshs d,x,u + ldx 8,s + ldd 8,x + std 2,s + ldd 8,s + pshs d + lbsr fclose + leas 2,s +L01b8 leax ,s + pshs x + lbsr wait + leas 2,s + tfr d,u + pshs u + ldd 4,s + lslb + rola + leax B0000,y + leax d,x + ldd ,x + cmpd ,s++ + beq L01dc + cmpu #-1 + bne L01b8 +L01dc ldd 2,s + lslb + rola + leax B0000,y + leax d,x + clra + clrb + std ,x + cmpu #-1 + bne L01f5 + ldd #-1 + bra L01f7 +L01f5 ldd ,s +L01f7 leas 4,s + puls u,pc +*L01fb ble L026d +* rol -16,s +* fcb $65 +* neg D000d +*L0201 equ *-1 +* fcb $00 + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/printf.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,320 @@ +* Disassembly by Os9disasm of printf.r + + section bss + +* Uninitialized data (class B) +B0000 rmb 2 +B0002 rmb 10 +* Initialized Data (class G) +G0000 fcb $27 + fcb $10 + fcb $03 + fcb $e8 + fcb $00 + fcb $64 + fcb $00 + fcb $0a + + endsect + + section code + +printf: pshs u + leau 6,s + leax _iob+13,y + ldd 4,s + bra L0014 +fprintf: pshs u + leau 8,s + ldx 4,s + ldd 6,s +L0014 stx B0000,y + leax L024a,pcr + bra L002e +sprintf: pshs u + ldd 4,s + std B0000,y + leau 8,s + ldd 6,s + leax L0256,pcr +L002e pshs d,u + pshs x + bsr L003b + leas 6,s + puls u,pc +L0038 leas 8,s + rts +L003b ldu 4,s + leas -8,s + bra L004a +L0041 ldx 14,s + ldd ,x++ + stx 14,s +L0047 jsr [10,s] +L004a ldb ,u+ + beq L0038 + cmpb #$25 + bne L0047 + clrb + lda #$7d + std ,s + stb 7,s + stb 2,s + ldb ,u+ + cmpb #$2d + bne L0065 + stb 7,s + ldb ,u+ +L0065 cmpb #$30 + beq L006b + ldb #$20 +L006b stb 6,s + ldb -1,u + lbsr L021f + std 3,s + ldb ,u+ + cmpb #$2e + bne L0085 + stb 2,s + ldb ,u+ + lbsr L021f + std ,s + ldb ,u+ +L0085 cmpb #$63 + beq L0041 + pshs u + cmpb #$66 + beq L00c5 + cmpb #$65 + beq L00c5 + cmpb #$67 + beq L00c5 + cmpb #$45 + beq L00c5 + cmpb #$47 + beq L00c5 + cmpb #$6c + beq L00e6 + cmpb #$73 + beq L0108 + cmpb #$64 + beq L0124 + cmpb #$6f + lbeq L01ca + cmpb #$78 + lbeq L0182 + cmpb #$58 + lbeq L0182 + cmpb #$75 + beq L0137 + puls u + bra L0047 +L00c5 ldd 5,s + pshs d + leax 18,s + ldd 4,s + tst 6,s + bne L00d5 + ldd #6 +L00d5 pshs d,x + ldd #$7d00 + std 8,s + ldb -1,u + clra + pshs d + lbsr pffloat + bra L0101 +L00e6 pshs u + ldx 18,s + ldd 2,x + pshs d + ldd ,x + pshs d + leax 4,x + stx 22,s + ldb ,u+ + stu 6,s + pshs d + lbsr pflong +L0101 leas 8,s + tfr d,u + lbra L01b4 +L0108 bsr L0179 + tfr d,u + pshs u + lbsr strlen + leas 2,s + tst 4,s + beq L011e + cmpd 2,s + bhi L011e + std 2,s +L011e lbsr L01e9 + lbra L01b6 +L0124 bsr L0175 + pshs d,x,y,u + tsta + bpl L013b + nega + negb + sbca #0 + std ,s + ldb #$2d + stb ,u+ + bra L013b +L0137 bsr L0175 + pshs d,x,y,u +L013b ldd #5 + std 2,s + sta 4,s + leax G0000,y + puls d + bra L0167 +L014a inc ,s +L014c subd ,x + bcc L014a + addd ,x++ + pshs b + ldb 1,s + tst 3,s + bne L015f + tstb + beq L0163 + inc 3,s +L015f addb #$30 + stb ,u+ +L0163 clr 1,s + puls b +L0167 dec 1,s + bne L014c + addb #$30 + stb ,u+ + clr ,u + leas 4,s + bra L01b2 +L0175 leau B0002,y +L0179 ldx 18,s + ldd ,x++ + stx 18,s + rts +L0182 andb #$20 + stb 7,s + bsr L0175 + pshs d,u +L018a andb #$0f + pshs b + lda #$30 + cmpb #9 + ble L0198 + lda #$37 + adda 12,s +L0198 adda ,s+ + sta ,u+ + ldd ,s + lsra + rorb + lsra + rorb + lsra + rorb + lsra + rorb + std ,s + bne L018a +L01aa clr ,u + ldx 2,s + bsr frevers + leas 2,s +L01b2 puls u +L01b4 bsr L01e2 +L01b6 puls u + lbra L004a +L01bb ldb ,x + lda ,-u + sta ,x+ + stb ,u +frevers: pshs u + cmpx ,s++ + bcs L01bb + rts +L01ca bsr L0175 + pshs d,u +L01ce andb #7 + addb #$30 + stb ,u+ + ldd ,s + lsra + rorb + lsra + rorb + lsra + rorb + std ,s + bne L01ce + bra L01aa +L01e2 pshs u + lbsr strlen + leas 2,s +L01e9 nega + negb + sbca #0 + addd 7,s + std 7,s + tst 11,s + bne L0200 + bsr L0215 + bra L0200 +L01f9 ldb ,u+ + beq L0209 + jsr [14,s] +L0200 ldd 4,s + subd #1 + std 4,s + bpl L01f9 +L0209 tst 11,s + beq L020f + bsr L0215 +L020f rts +L0210 ldb 12,s + jsr [16,s] +L0215 ldd 9,s + subd #1 + std 9,s + bpl L0210 + rts +L021f clr ,-s + clr ,-s + leau -1,u + leax _chcodes,y + bra L0242 +L022b ldd ,s + lslb + rola + std ,s + lslb + rola + lslb + rola + addd ,s + addb ,u+ + adca #0 + subd #$0030 + std ,s + ldb ,u +L0242 lda b,x + anda #8 + bne L022b + puls d,pc +L024a ldx B0000,y + pshs d,x + lbsr putc + leas 4,s + rts +L0256 ldx B0000,y + stb ,x+ + stx B0000,y + clr ,x + rts + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/process.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,62 @@ +* Disassembly by Os9disasm of process.r + + section code + +* OS-9 system function equates + +F$Fork equ $03 +F$Wait equ $04 +F$Chain equ $05 +F$Exit equ $06 +F$Send equ $08 +F$SPrior equ $0d + +kill: lda 3,s + ldb 5,s + os9 F$Send + lbra _sysret +wait: clra + clrb + os9 F$Wait + lblo _os9err + ldx 2,s + beq L001b + stb 1,x + clr ,x +L001b tfr a,b + clra + rts +setpr: lda 3,s + ldb 5,s + os9 F$SPrior + lbra _sysret +chain: leau ,s + leas 255,y + ldx 2,u + ldy 4,u + lda 9,u + asla + asla + asla + asla + ora 11,u + ldb 13,u + ldu 6,u + os9 F$Chain + os9 F$Exit +os9fork: pshs y,u + ldx 6,s + ldy 8,s + ldu 10,s + lda 13,s + ora 15,s + ldb 17,s + os9 F$Fork + puls y,u + lblo _os9err + tfr a,b + clra + rts + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/prof.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,114 @@ +* Disassembly by Os9disasm of prof.r + +* class D external label equates + +D0000 equ $0000 +D0001 equ $0001 +D0020 equ $0020 + +* class X external label equates + +X2829 equ $2829 + + section bss + +* Uninitialized data (class B) +B0000 rmb 504 +* Initialized Data (class G) +G0000 fdb B0000 +G0002 fdb B01f8 + + endsect + + section code + +_prof: pshs u + leau B0000,y + bra L0018 +L0008 ldd ,u + cmpd 4,s + bne L0016 + leax 4,u + lbsr _linc + puls u,pc +L0016 leau 8,u +L0018 cmpu G0000,y + bcs L0008 + ldd G0000,y + cmpd G0002,y + bls L004a + ldd G0000,y + addd #-8 + tfr d,u + ldd 2,u + beq L003f + leax >L00b7,pcr + tfr x,d + bra L0041 +L003f ldd 6,s +L0041 std 2,u + leax 4,u + lbsr _linc + bra L0071 +L004a ldd G0000,y + addd #8 + std G0000,y + subd #8 + tfr d,u + ldd 6,s + std 2,u + ldd 4,s + std ,u + leax 4,u + pshs x + bsr L006c + neg D0000 + neg D0001 +L006c puls x + lbsr _lmove +L0071 puls u,pc +_dumprof: pshs u + lbsr pflinit + leax _iob+13,y + pshs x + lbsr fflush + leas 2,s + leau B0000,y + bra L00aa +L0089 leax 4,u + ldd 2,x + pshs d + ldd ,x + pshs d + ldd 2,u + pshs d + leax >L00c0,pcr + pshs x + leax _iob+26,y + pshs x + lbsr fprintf + leas 10,s + leau 8,u +L00aa cmpu G0000,y + bcs L0089 + bra L00b5 +_trace: pshs u +L00b5 puls u,pc +*L00b7 swi +* swi +* swi +* swi +* swi +* swi +* swi +* swi +* neg D0020 +*L00c0 equ *-1 +* bcs L00fb +* com X2829 +* bra L00ed +* inc 4,s +* tst D0000 + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/profdummy.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,8 @@ +* Disassembly by Os9disasm of profdummy.r + + section code + +_dumprof: rts + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/putc.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,205 @@ +* Disassembly by Os9disasm of putc.r + + section code + +putc: pshs u + ldu 6,s + ldd 6,u + anda #$80 + andb #$22 + cmpb #2 + bne L0046 + cmpa #$80 + beq L0019 + pshs u + lbsr _setbase + leas 2,s +L0019 ldd 6,u + andb #4 + beq L004b + ldd #1 + pshs d + leax 7,s + ldd 8,u + pshs d,x + ldb 7,u + andb #$40 + beq L0035 + lbsr writeln + bra L0038 +L0035 lbsr write +L0038 leas 6,s + cmpd #-1 + bne L0079 + ldb 7,u + orb #$20 + stb 7,u +L0046 ldd #-1 + puls u,pc +L004b anda #1 + bne L0058 + pshs u + lbsr L00fd + std ,s++ + bne L0046 +L0058 ldx ,u + ldb 5,s + stb ,x+ + stx ,u + cmpx 4,u + bcc L0070 + ldb 7,u + andb #$40 + beq L0079 + ldb 5,s + cmpb #$0d + bne L0079 +L0070 pshs u + lbsr L00fd + std ,s++ + bne L0046 +L0079 ldd 4,s + puls u,pc +putw: pshs u + ldu 6,s + ldb 4,s + pshs d,u + lbsr putc + ldb 9,s + stb 1,s + lbsr putc + leas 4,s + puls u,pc +_tidyup: pshs u + leax _iob,y + ldb #$10 + pshs b +L009d pshs x + bsr fclose + puls x + leax 13,x + dec ,s + bne L009d + puls b,u,pc +fclose: pshs u + ldu 4,s + lbeq L0046 + ldd 6,u + lbeq L0046 + andb #2 + beq L00c5 + pshs u + bsr fflush + leas 2,s + bra L00c7 +L00c5 clra + clrb +L00c7 pshs d + ldd 8,u + pshs d + lbsr close + leas 2,s + clra + clrb + std 6,u + puls d,u,pc +fflush: pshs u + ldu 4,s + lbeq L0046 + ldd 6,u + andb #$22 + cmpb #2 + lbne L0046 + anda #$80 + bne L00f5 + pshs u + lbsr _setbase + leas 2,s +L00f5 pshs u + bsr L00fd + leas 2,s + puls u,pc +L00fd pshs u + ldu 4,s + leas -4,s + lda 6,u + anda #1 + bne L012c + ldd ,u + cmpd 4,u + beq L012c + clra + clrb + pshs d + pshs u + lbsr ftell + leas 2,s + ldd 2,x + pshs d + ldd ,x + pshs d + ldd 8,u + pshs d + lbsr lseek + leas 8,s +L012c ldd ,u + subd 2,u + std 2,s + lbeq L0194 + ldd 6,u + anda #1 + lbeq L0194 + andb #$40 + beq L016f + ldd 2,u + bra L0167 +L0146 pshs d + ldd ,u + pshs d + ldd 8,u + pshs d + lbsr writeln + leas 6,s + std ,s + cmpd #-1 + beq L0185 + ldd 2,s + subd ,s + std 2,s + ldd ,u + addd ,s +L0167 std ,u + ldd 2,s + bne L0146 + bra L0194 +L016f ldd 2,s + pshs d + ldd 2,u + pshs d + ldd 8,u + pshs d + lbsr write + leas 6,s + cmpd 2,s + beq L0194 +L0185 ldb 7,u + orb #$20 + stb 7,u + ldd 4,u + std ,u + ldd #-1 + bra L01a4 +L0194 lda 6,u + ora #1 + sta 6,u + ldd 2,u + std ,u + addd 11,u + std 4,u + clra + clrb +L01a4 leas 4,s + puls u,pc + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/puts.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,28 @@ +* Disassembly by Os9disasm of puts.r + + section code + +puts: pshs u + leax _iob+13,y + ldd 4,s + pshs d,x + bsr fputs + ldb #$0d + stb 1,s + lbsr putc + leas 4,s + puls u,pc +fputs: pshs u + ldu 4,s + ldx 6,s + pshs d,x + bra L0026 +L0021 stb 1,s + lbsr putc +L0026 ldb ,u+ + bne L0021 + leas 4,s + puls u,pc + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/pwcryp.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,43 @@ +* Disassembly by Os9disasm of pwcryp.r + + section code + +pwcryp: pshs u + ldu 4,s + ldd #-1 + pshs d + pshs b + leax ,s + pshs x + pshs u + lbsr strlen + std ,s + pshs u + lbsr crc + leas 6,s + lda ,s+ + bsr L002f + lda ,s+ + bsr L002f + lda ,s+ + bsr L002f + clr ,u + ldd 4,s + puls u,pc +L002f pshs a + lsra + lsra + lsra + lsra + bsr L003b + puls a + anda #$0f +L003b adda #$30 + cmpa #$39 + bls L0043 + adda #7 +L0043 sta ,u+ + rts + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/pwent.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,288 @@ +* Disassembly by Os9disasm of pwent.r + +* class D external label equates + +D0000 equ $0000 + +* class X external label equates + +X7377 equ $7377 +X7973 equ $7973 + + section bss + +* Uninitialized data (class B) +B0000 rmb 133 +B0085 rmb 16 +* Initialized Data (class G) +G0000 fcb $00 + fcb $00 +_pwdelim: fcb $61 + + endsect + + section code + +getpwent: pshs d,u + ldd G0000,y + bne L0020 + ldd #1 + pshs d + leax L0229,pcr + pshs x + lbsr open + leas 4,s + std G0000,y + lble L0223 +L0020 ldd #$0084 + pshs d + leax B0000,y + pshs x + ldd G0000,y + pshs d + lbsr readln + leas 6,s + std -2,s + lble L0223 + leax B0000,y + stx ,s + bra L0050 +L0044 ldx ,s + leax 1,x + stx ,s + ldb -1,x + stb _pwdelim,y +L0050 ldb [,s] + cmpb #$0d + beq L0066 + ldb _pwdelim,y + cmpb #$2c + beq L0066 + ldb _pwdelim,y + cmpb #$3a + bne L0044 +L0066 ldb [,s] + cmpb #$0d + lbeq L0223 + leax B0085,y + pshs x + leax B0000,y + pshs x + bsr L00c4 + leas 4,s + lbra L0225 +setpwent: pshs u + ldd G0000,y + beq L009e + clra + clrb + pshs d + clra + clrb + pshs d + pshs d + ldd G0000,y + pshs d + lbsr lseek + leas 8,s +L009e puls u,pc +endpwent: pshs u + ldd G0000,y + beq L00b9 + ldd G0000,y + pshs d + lbsr close + leas 2,s + clra + clrb + std G0000,y +L00b9 puls u,pc +getpwdlm: pshs u + ldb _pwdelim,y + sex + puls u,pc +L00c4 pshs u + clra + clrb + ldx 6,s + std 8,x + ldd 4,s + std [6,s] + ldb _pwdelim,y + sex + pshs d + ldd 6,s + pshs d + lbsr index + leas 4,s + std 4,s + tfr d,x + clra + clrb + stb ,x + ldd 4,s + addd #1 + std 4,s + ldx 6,s + std 2,x + ldb _pwdelim,y + sex + pshs d + ldd 6,s + pshs d + lbsr index + leas 4,s + std 4,s + tfr d,x + clra + clrb + stb ,x + ldd 4,s + addd #1 + std 4,s + ldx 6,s + std 4,x + ldb _pwdelim,y + sex + pshs d + ldd 6,s + pshs d + lbsr index + leas 4,s + std 4,s + tfr d,x + clra + clrb + stb ,x + ldd 4,s + addd #1 + std 4,s + ldx 6,s + std 6,x + ldb _pwdelim,y + sex + pshs d + ldd 6,s + pshs d + lbsr index + leas 4,s + std 4,s + tfr d,x + clra + clrb + stb ,x + ldb _pwdelim,y + cmpb #$3a + bne L017d + ldd 4,s + addd #1 + std 4,s + ldx 6,s + std 8,x + ldb _pwdelim,y + sex + pshs d + ldd 6,s + pshs d + lbsr index + leas 4,s + std 4,s + tfr d,x + clra + clrb + stb ,x +L017d ldd 4,s + addd #1 + std 4,s + ldx 6,s + std 10,x + ldb _pwdelim,y + sex + pshs d + ldd 6,s + pshs d + lbsr index + leas 4,s + std 4,s + tfr d,x + clra + clrb + stb ,x + ldd 4,s + addd #1 + std 4,s + ldx 6,s + std 12,x + ldb _pwdelim,y + sex + pshs d + ldd 6,s + pshs d + lbsr index + leas 4,s + std 4,s + tfr d,x + clra + clrb + stb ,x + ldd 4,s + addd #1 + std 4,s + ldx 6,s + std 14,x + ldd #$000d + pshs d + ldd 6,s + pshs d + lbsr index + leas 4,s + tfr d,x + clra + clrb + stb ,x + ldd 6,s + puls u,pc +getpwuid: pshs d,u + bra L01fa +L01ea ldx ,s + ldd 4,x + pshs d + lbsr atoi + leas 2,s + cmpd 6,s + beq L0218 +L01fa lbsr getpwent + std ,s + bne L01ea + bra L0223 +getpwnam: pshs d,u + bra L021c +L0207 ldd [,s] + pshs d + ldd 8,s + pshs d + lbsr strucmp + leas 4,s + std -2,s + bne L021c +L0218 ldd ,s + bra L0225 +L021c lbsr getpwent + std ,s + bne L0207 +L0223 clra + clrb +L0225 leas 2,s + puls u,pc +*L0229 ble L028f +* lsr 15,y +* com X7973 +* ble L02a2 +* fcb $61 +* com X7377 +* clr -14,s +* fcb $64 +* fcb $00 + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/qsort.a Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,154 @@ +* Disassembly by Os9disasm of qsort.r + + psect qsort_c,$0,$0,1,0,qsort + + vsect + +* Uninitialized data (class B) +B0000 rmb 2 +B0002 rmb 2 +* Initialized Data (class G) + + ends + + +qsort: pshs u + ldd #$ffb8 + lbsr _stkcheck + ldd 8,s + std B0000,y + ldd 10,s + std B0002,y + ldd 6,s + addd #-1 + pshs d + ldd B0000,y + lbsr ccmult + addd 4,s + pshs d + ldd 6,s + pshs d + bsr L002f + lbra L010a +L002f pshs u + ldd #$ffb4 + lbsr _stkcheck + leas -4,s + lbra L0101 +L003c ldu 8,s + ldd 10,s + std 2,s + ldd 10,s + subd 8,s + pshs d + ldd B0000,y + lslb + rola + lbsr ccdiv + pshs d + ldd B0000,y + lbsr ccmult + addd 8,s + std ,s + bra L0066 +L0060 ldd B0000,y + leau d,u +L0066 ldd ,s + pshs d + pshs u + jsr [B0002,y] + leas 4,s + std -2,s + blt L0060 + bra L0080 +L0078 ldd 2,s + subd B0000,y + std 2,s +L0080 ldd 2,s + pshs d + ldd 2,s + pshs d + jsr [B0002,y] + leas 4,s + std -2,s + blt L0078 + cmpu 2,s + bhi L00c9 + cmpu 2,s + bcc L00bb + ldd 2,s + pshs d + pshs u + lbsr L010e + leas 4,s + cmpu ,s + bne L00b2 + ldd 2,s + std ,s + bra L00bb +L00b2 ldd ,s + cmpd 2,s + bne L00bb + stu ,s +L00bb ldd B0000,y + leau d,u + ldd 2,s + subd B0000,y + std 2,s +L00c9 cmpu 2,s + lbls L0066 + ldd 2,s + subd 8,s + pshs d + pshs u + ldd 14,s + subd ,s++ + cmpd ,s++ + bge L00f2 + ldd 10,s + pshs d + pshs u + lbsr L002f + leas 4,s + ldd 2,s + std 10,s + bra L0101 +L00f2 ldd 2,s + pshs d + ldd 10,s + pshs d + lbsr L002f + leas 4,s + stu 8,s +L0101 ldd 8,s + cmpd 10,s + lblo L003c +L010a leas 4,s + puls u,pc +L010e pshs u + ldd #$ffbd + lbsr _stkcheck + ldu 4,s + leas -3,s + ldd B0000,y + std 1,s + bra L0135 +L0122 ldb ,u + stb ,s + ldb [9,s] + stb ,u+ + ldb ,s + ldx 9,s + leax 1,x + stx 9,s + stb -1,x +L0135 ldd 1,s + addd #-1 + std 1,s + subd #-1 + bne L0122 + leas 3,s + puls u,pc + + ends +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/rand.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,52 @@ +* Disassembly by Os9disasm of rand.r + +* class D external label equates + +D0000 equ $0000 + + section bss + +* Initialized Data (class G) +G0000 fcb $00 + fcb $00 + fcb $00 + fcb $01 + + endsect + + section code + +rand: pshs u + leax G0000,y + ldd ,x + ldu 2,x + pshs d,u + leax >L003d,pcr + lbsr _lmul + ldd ,x + ldu 2,x + pshs d,u + leax >L0041,pcr + lbsr _ladd + leau G0000,y + ldd ,x + ldx 2,x + std ,u + stx 2,u + anda #$7f + puls u,pc +srand: leax G0000,y + ldd 2,s + std 2,x + clra + clrb + std ,x + rts +L003d fcb $41 + ldb #$4e + fcb $6d +L0041 neg D0000 + leax -7,y + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/read.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,35 @@ +* Disassembly by Os9disasm of read.r + + section code + +* OS-9 system function equates + +I$Read equ $89 +I$ReadLn equ $8b + +read: pshs y + ldx 6,s + lda 5,s + ldy 8,s + pshs y + os9 I$Read +L000e bcc L001d + cmpb #$d3 + bne L0018 + clra + clrb + puls x,y,pc +L0018 puls x,y + lbra _os9err +L001d tfr y,d + puls x,y,pc +readln: pshs y + lda 5,s + ldx 6,s + ldy 8,s + pshs y + os9 I$ReadLn + bra L000e + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/realloc.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,38 @@ +* Disassembly by Os9disasm of realloc.r + + section code + +realloc: pshs d,y,u + ldd 10,s + std ,s + lbsr malloc + std ,s + beq L003d + cmpd 8,s + beq L003d + ldu 8,s + beq L003d + tfr d,x + ldu 8,s + ldd -2,u + subd #1 + lslb + rola + lslb + rola + cmpd 10,s + bls L002a + ldd 10,s +L002a tfr d,y +L002c ldd ,u++ + std ,x++ + leay -2,y + bne L002c + ldd 8,s + pshs d + lbsr free + puls d +L003d puls d,y,u,pc + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/reverse.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,25 @@ +* Disassembly by Os9disasm of reverse.r + + section code + +reverse: pshs u + ldu 4,s + pshs u + pshs u + lbsr strlen + leas 2,s + addd ,s++ + tfr d,x + bra L001b +L0013 ldb ,u + lda ,-x + sta ,u+ + stb ,x +L001b pshs x + cmpu ,s++ + bcs L0013 + ldd 4,s + puls u,pc + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/rpterr.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,18 @@ +* Disassembly by Os9disasm of rpterr.r + + section code + +* OS-9 system function equates + +F$Send equ $08 +F$ID equ $0c + +_rpterr: std errno,y + pshs b,y + os9 F$ID + puls b,y + os9 F$Send + rts + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/scale.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,184 @@ +* Disassembly by Os9disasm of scale.r + + section bss + +* Initialized Data (class G) +atoftbl: fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $80 + fcb $20 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $84 + fcb $48 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $87 + fcb $7a + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $8a + fcb $1c + fcb $40 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $8e + fcb $43 + fcb $50 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $91 + fcb $74 + fcb $24 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $94 + fcb $18 + fcb $96 + fcb $80 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $98 + fcb $3e + fcb $bc + fcb $20 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $9b + fcb $6e + fcb $6b + fcb $28 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $9e + fcb $15 + fcb $02 + fcb $f9 + fcb $00 + fcb $00 + fcb $00 + fcb $00 + fcb $a2 + fcb $2d + fcb $78 + fcb $eb + fcb $c5 + fcb $ac + fcb $62 + fcb $00 + fcb $c3 + fcb $49 + fcb $f2 + fcb $c9 + fcb $cd + fcb $04 + fcb $67 + fcb $4f + fcb $e4 + + endsect + + section code + +L0000 pshs u + ldd 12,s + beq L003c + ldd 14,s + beq L0023 + leax 4,s + lbsr _dstack + ldd 20,s + lslb + rola + lslb + rola + lslb + rola + leax atoftbl,y + leax d,x + lbsr _dmul + bra L003e +L0023 leax 4,s + lbsr _dstack + ldd 20,s + lslb + rola + lslb + rola + lslb + rola + leax atoftbl,y + leax d,x + lbsr _ddiv + bra L003e +L003c leax 4,s +L003e leau _flacc,y + pshs u + lbsr _dmove + puls u,pc +scale: pshs u + ldd 12,s + cmpd #9 + ble L0079 + leax 4,s + pshs x + ldd 16,s + pshs d + ldd 16,s + pshs d + ldd #$000a + lbsr ccdiv + addd #9 + pshs d + leax 10,s + lbsr _dstack + lbsr L0000 + leas 12,s + lbsr _dmove +L0079 ldd 14,s + pshs d + ldd 14,s + pshs d + ldd #$000a + lbsr ccmod + pshs d + leax 8,s + lbsr _dstack + lbsr L0000 + leas 12,s + puls u,pc + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/setbase.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,59 @@ +* Disassembly by Os9disasm of setbase.r + + section code + +_setbase: pshs u + ldu 4,s + ldb 7,u + bitb #$c0 + bne L0029 + leas -32,s + leax ,s + ldd 8,u + pshs d,x + clra + clrb + pshs d + lbsr getstat + ldb #$40 + lda 6,s + beq L0022 + ldb #$80 +L0022 leas 38,s + orb 7,u + stb 7,u +L0029 lda 6,u + ora #$80 + sta 6,u + andb #$0c + bne L006c + ldd 11,u + bne L003c + ldd #$0100 + std 11,u +L003c ldd 2,u + bne L0051 + ldd 11,u + pshs d + lbsr ibrk + leas 2,s + std 2,u + cmpd #-1 + beq L0055 +L0051 ldb #8 + bra L0060 +L0055 leax 10,u + stx 2,u + ldd #1 + std 11,u + ldb #4 +L0060 orb 7,u + stb 7,u + ldd 2,u + addd 11,u + std 4,u + std ,u +L006c puls u,pc + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/setbuf.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,36 @@ +* Disassembly by Os9disasm of setbuf.r + + section code + +setbuf: pshs u + ldu 4,s + lda 6,u + anda #1 + beq L0011 + pshs u + lbsr fflush + leas 2,s +L0011 ldd 6,u + anda #254 + andb #$f3 + std 6,u + ldx 6,s + beq L002e + ldd 11,u + bne L0026 + ldd #$0100 + std 11,u +L0026 stx 2,u + leax d,x + ldb #8 + bra L0032 +L002e leax 11,u + ldb #4 +L0032 orb 7,u + stb 7,u + stx 4,u + stx ,u + puls u,pc + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/setjmp.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,25 @@ +* Disassembly by Os9disasm of setjmp.r + + section code + +setjmp: ldx 2,s + ldd ,s + std 2,x + sty 6,x + stu 4,x + sts ,x + clra + clrb + rts +longjmp: ldx 2,s + ldy 6,x + ldu 4,x + ldd 4,s + bne L001e + ldb #1 +L001e lds ,x + leas 2,s + jmp [2,x] + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/sets.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,100 @@ +* Disassembly by Os9disasm of sets.r + + section code + +allocset: ldd #$0020 + pshs d + lbsr malloc + puls x,pc +addc2set: bsr L003a + orb a,x + stb a,x + tfr x,d + rts +adds2set: pshs u + ldu 6,s + ldx 4,s + bra L0021 +L001b bsr L003e + orb a,x + stb a,x +L0021 lda ,u+ + bne L001b + ldd 4,s + puls u,pc +rmfmset: bsr L003a + comb + andb a,x + stb a,x + clrb + tfr x,d + rts +smember: bsr L003a + andb a,x + clra + rts +L003a ldx 4,s + lda 7,s +L003e pshs a + ldb #1 + anda #7 + beq L004a +L0046 lslb + deca + bne L0046 +L004a puls a + asra + asra + asra + rts +dupset: bsr allocset + ldx 2,s + pshs d,x + bsr copyset + puls d,x,pc +copyset: pshs u + ldx 4,s + ldu 6,s + ldb #$20 +L0062 lda ,u+ + sta ,x+ + decb + bne L0062 + ldd 4,s + puls u,pc +sunion: pshs u + ldu 4,s + ldx 6,s + ldb #$20 +L0075 lda ,x+ + ora ,u + sta ,u+ + decb + bne L0075 + ldd 4,s + puls u,pc +sinterse: pshs u + ldu 4,s + ldx 6,s + ldb #$20 +L008a lda ,x+ + anda ,u + sta ,u+ + decb + bne L008a + ldd 4,s + puls u,pc +sdiffere: pshs u + ldu 4,s + ldx 6,s + ldb #$20 +L009f lda ,x+ + eora ,u + sta ,u+ + decb + bne L009f + ldd 4,s + puls u,pc + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/signal.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,91 @@ +* Disassembly by Os9disasm of signal.r + +* OS-9 system function equates + +F$Exit equ $06 +F$Icpt equ $09 + + section bss + +* Uninitialized data (class B) +B0000 rmb 60 +B003c rmb 1 +* Initialized Data (class G) + + endsect + + section code + +_sigint: ldd 2,s + tstb + beq L000c + tsta + bne L000c + bsr L003c + bne L0010 +L000c ldd #-1 + rts +L0010 ldd 1,x + pshs d + ldd 6,s + std 1,x + bne L001e + clr ,x +L001c puls d,pc +L001e ldb 5,s + stb ,x + tst B003c,y + bne L001c + exg y,u + leax >L006a,pcr + os9 F$Icpt + exg y,u + puls d + bcs L000c + inc B003c,y + rts +L003c clr ,-s + clr ,-s + leax B003c,y + pshs x + leax B0000,y +L004a cmpx ,s + beq L0065 + cmpb ,x + bne L0057 + leas 4,s + andcc #251 + rts +L0057 lda ,x + ora 2,s + ora 3,s + bne L0061 + stx 2,s +L0061 leax 3,x + bra L004a +L0065 ldx 2,s + leas 4,s + rts +L006a leay ,u + bsr L003c + beq L0076 + pshs x + ldx 1,x + bne L0081 +L0076 os9 F$Exit + cmpx #1 + bne L0081 + leas 2,s + rti +L0081 clra + pshs d + jsr ,x + puls d,x + clra + clrb + sta ,x + std 1,x + rti + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/skip.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,24 @@ +* Disassembly by Os9disasm of skip.r + + section code + +skipbl: ldx 2,s +L0002 ldb ,x+ + cmpb #$20 + beq L0002 + cmpb #9 + beq L0002 + bra L001c +skipwd: ldx 2,s +L0010 ldb ,x+ + beq L001c + cmpb #$20 + beq L001c + cmpb #9 + bne L0010 +L001c leax -1,x + tfr x,d + rts + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/sleep.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,44 @@ +* Disassembly by Os9disasm of sleep.r + + section code + +* OS-9 system function equates + +F$ID equ $0c +F$SUser equ $1c +F$NMLink equ $21 +L0025 equ $25 + +L0000 fcb $61 + fcb $62 + fcb $62 + cmpb <L0068,pcr +sleep equ *-2 + bne L000d + ldd #1 + bra L003a +L000d pshs d + os9 L0025 + bcc L0037 + clra + os9 F$ID + os9 F$SUser + bcc L0022 + ldd #$000a + bra L0037 +L0022 leax <L0000,pcr + clra + os9 F$NMLink + bcc L0034 + cmpb #$d0 + bne L0034 + ldd #$0064 + bra L0037 +L0034 ldd #$003c +L0037 lbsr ccmult +L003a pshs d + lbsr tsleep + puls x,pc + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/ss1.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,26 @@ +* Disassembly by Os9disasm of ss1.r + + section code + +* OS-9 system function equates + +I$SetStt equ $8e + +_ss_rel: ldb #$1b + bra L0018 +_ss_rest: ldb #3 + bra L0018 +_ss_opt: ldb #0 + bra L0016 +_ss_pfd: ldb #$0f + bra L0016 +_ss_ssig: ldb #$1a + bra L0016 +_ss_tiks: ldb #$10 +L0016 ldx 4,s +L0018 lda 3,s + os9 I$SetStt + lbra _sysret + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/ss2.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,25 @@ +* Disassembly by Os9disasm of ss2.r + + section code + +* OS-9 system function equates + +I$SetStt equ $8e + +_ss_lock: pshs u + ldb #$11 + bra L0010 +_ss_attr: pshs u + ldb #$1c + bra L0012 +_ss_size: pshs u + ldb #2 +L0010 ldu 8,s +L0012 ldx 6,s + lda 5,s + os9 I$SetStt + puls u + lbra _sysret + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/ss3.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,20 @@ +* Disassembly by Os9disasm of ss3.r + + section code + +* OS-9 system function equates + +I$SetStt equ $8e + +_ss_wtrk: pshs y,u + ldb #4 + ldy 10,s + ldu 8,s + ldx 14,s + lda 7,s + os9 I$SetStt + puls y,u + lbra _sysret + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/stat.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,94 @@ +* Disassembly by Os9disasm of stat.r + + section code + +* OS-9 system function equates + +I$GetStt equ $8d +I$SetStt equ $8e + +getstat: pshs y,u + lda 9,s + ldb 7,s + beq L003c + cmpb #1 + beq L003e + cmpb #2 + beq L0024 + cmpb #5 + beq L0024 + cmpb #6 + beq L003e + cmpb #$0e + beq L003c + cmpb #$0f + beq L0039 + ldb #$d0 + bra L0029 +L0024 os9 I$GetStt + bcc L002e +L0029 puls y,u + lbra _os9err +L002e stx [10,s] + ldx 10,s + stu 2,x + clrb + clra + puls y,u,pc +L0039 ldy 12,s +L003c ldx 10,s +L003e os9 I$GetStt + puls y,u + lbra _sysret +setstat: pshs y,u + lda 9,s + ldb 7,s + beq L0096 + cmpb #2 + beq L0094 + cmpb #3 + beq L0096 + cmpb #4 + beq L0091 + cmpb #$0a + beq L00a6 + cmpb #$0b + beq L0096 + cmpb #$0c + beq L00a6 + cmpb #$0d + beq L009a + cmpb #$0f + beq L0096 + cmpb #$10 + beq L0096 + cmpb #$11 + beq L0094 + cmpb #$14 + beq L0091 + cmpb #$15 + beq L0091 + cmpb #$19 + beq L0091 + cmpb #$1a + beq L0096 + cmpb #$1b + beq L00a6 + ldb #$d0 + puls y,u + lbra _os9err +L0091 ldy 14,s +L0094 ldu 12,s +L0096 ldx 10,s + bra L00a6 +L009a tfr a,b + lda 11,s + ldx 12,s + ldy 14,s + ldu 16,s +L00a6 os9 I$SetStt + puls y,u + lbra _sysret + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/strass.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,24 @@ +* Disassembly by Os9disasm of strass.r + + section code + +_strass: pshs y,u + ldu 6,s + ldy 8,s + ldd 10,s + lsra + rorb + tfr d,x + bcc L0013 + lda ,y+ + sta ,u+ +L0013 stx -2,s + beq L001f +L0017 ldd ,y++ + std ,u++ + leax -1,x + bne L0017 +L001f puls y,u,pc + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/strclr.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,17 @@ +* Disassembly by Os9disasm of strclr.r + + section code + +strclr: pshs u + ldu 4,s + clrb + ldx 6,s + beq L000f +L0009 stb ,u+ + leax -1,x + bne L0009 +L000f ldd 4,s + puls u,pc + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/strcmp.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,19 @@ +* Disassembly by Os9disasm of strcmp.r + + section code + +strcmp: pshs u + ldx 4,s + ldu 6,s + bra L000c +L0008 ldb ,u+ + beq L0013 +L000c ldb ,u + subb ,x+ + beq L0008 + negb +L0013 sex + puls u,pc + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/strhcpy.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,18 @@ +* Disassembly by Os9disasm of strhcpy.r + + section code + +strhcpy: pshs u + ldu 4,s + ldx 6,s +L0006 ldb ,x+ + stb ,u+ + bpl L0006 + andb #$7f + stb -1,u + clr ,u + ldd 4,s + puls u,pc + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/strings.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,27 @@ +* Disassembly by Os9disasm of strings.r + + section code + +strcat: pshs u + ldu 6,s + ldx 4,s + bsr L001e + tfr d,x + bra L0012 +strcpy: pshs u + ldu 6,s + ldx 4,s +L0012 ldb ,u+ + stb ,x+ + bne L0012 + ldd 4,s + puls u,pc +strend: ldx 2,s +L001e ldb ,x+ + bne L001e + leax -1,x + tfr x,d + rts + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/stringsu.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,27 @@ +* Disassembly by Os9disasm of stringsu.r + + section code + +strucat: pshs u + ldu 6,s + ldx 4,s +L0006 ldb ,x+ + bne L0006 + leax -1,x + bra L0014 +strucpy: pshs u + ldu 6,s + ldx 4,s +L0014 ldb ,u+ + clra + pshs d,x + lbsr toupper + leas 2,s + puls x + stb ,x+ + bne L0014 + ldd 4,s + puls u,pc + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/strlen.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,15 @@ +* Disassembly by Os9disasm of strlen.r + + section code + +strlen: pshs u + ldu 4,s +L0004 ldb ,u+ + bne L0004 + leau -1,u + tfr u,d + subd 4,s + puls u,pc + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/strncat.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,24 @@ +* Disassembly by Os9disasm of strncat.r + + section code + +strncat: pshs y,u + ldu 8,s + ldx 6,s + ldy 10,s + beq L001e +L000b ldb ,x+ + bne L000b + leax -1,x +L0011 ldb ,u+ + stb ,x+ + leay -1,y + beq L001c + tstb + bne L0011 +L001c clr ,x +L001e ldd 4,s + puls y,u,pc + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/strncmp.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,26 @@ +* Disassembly by Os9disasm of strncmp.r + + section code + +strncmp: pshs y,u + ldx 6,s + ldu 8,s + ldy 10,s + beq L001f + bra L0015 +L000d leay -1,y + beq L001f + ldb ,u+ + beq L001f +L0015 ldb ,u + subb ,x+ + beq L000d + negb + sex + bra L0021 +L001f clra + clrb +L0021 puls y,u,pc + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/strncpy.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,23 @@ +* Disassembly by Os9disasm of strncpy.r + + section code + +strncpy: pshs y,u + ldu 8,s + ldx 6,s + ldy 10,s + beq L001c +L000b ldb ,u+ + stb ,x+ + leay -1,y + beq L001c + tstb + bne L000b +L0016 clr ,x+ + leay -1,y + bne L0016 +L001c ldd 6,s + puls y,u,pc + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/strnucmp.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,36 @@ +* Disassembly by Os9disasm of strnucmp.r + + section code + +strnucmp: pshs y,u + ldu 8,s + ldd 10,s + beq L0037 + bra L0017 +L000a ldd 10,s + subd #1 + std 10,s + beq L0035 + ldb ,u+ + beq L0035 +L0017 ldb ,u + clra + pshs d + lbsr toupper + std ,s + ldx 8,s + ldb ,x+ + stx 8,s + clra + pshs d + lbsr toupper + leas 2,s + subd ,s++ + beq L000a + bra L0037 +L0035 clra + clrb +L0037 puls y,u,pc + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/strpbrk.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,21 @@ +* Disassembly by Os9disasm of strpbrk.r + + section code + +strpbrk: pshs x,u + ldx 8,s + ldu 6,s + pshs x +L0008 clra + ldb ,u+ + beq L0018 + stb 3,s + lbsr index + beq L0008 + leau -1,u + tfr u,d +L0018 leas 4,s + puls u,pc + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/strspn.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,31 @@ +* Disassembly by Os9disasm of strspn.r + + section code + +strspn: pshs x,u + ldx 8,s + ldu 6,s + pshs x +L0008 ldb ,u+ + beq L0028 + stb 3,s + lbsr strchr + bne L0008 + bra L0028 +strcspn: pshs x,u + ldx 8,s + ldu 6,s + pshs x +L001d ldb ,u+ + beq L0028 + stb 3,s + lbsr strchr + beq L001d +L0028 leau -1,u + tfr u,d + subd 8,s + leas 4,s + puls u,pc + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/strtok.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,42 @@ +* Disassembly by Os9disasm of strtok.r + + section bss + +* Initialized Data (class G) +G0000 fcb $00 + fcb $00 + + endsect + + section code + +strtok: clra + clrb + pshs d,u + ldu 6,s + bne L000e + ldu G0000,y + beq L003a +L000e ldx 8,s + pshs x + pshs u + lbsr strspn + leas 4,s + leau d,u + ldb ,u + beq L003a + stu ,s + ldx 8,s + pshs x + pshs u + lbsr strpbrk + leas 4,s + std G0000,y + beq L003a + tfr d,x + clr ,x+ + stx G0000,y +L003a puls d,u,pc + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/strucmp.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,29 @@ +* Disassembly by Os9disasm of strucmp.r + + section codd + +strucmp: pshs u + ldx 4,s + ldu 6,s + bra L000c +L0008 ldb ,u+ + beq L002a +L000c ldb ,u + clra + pshs d,x + lbsr toupper + leas 2,s + ldx ,s + std ,s + ldb ,x+ + clra + pshs d,x + lbsr toupper + leas 2,s + puls x + subd ,s++ + beq L0008 +L002a puls u,pc + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/swab.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,10 @@ +* Disassembly by Os9disasm of swab.r + + section code + +swab: ldd 2,s + exg a,b + rts + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/syscall.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,35 @@ +* Disassembly by Os9disasm of syscall.r + + section code + +_os9: pshs y,u + lda 7,s + ldb #$39 + pshs d + ldd #$103f + pshs d + ldu 12,s + ldd 1,u + ldx 4,u + ldy 6,u + ldu 8,u + jsr ,s + pshs cc,u + ldu 15,s + leau 8,u + pshu d,dp,x,y + puls a,x + sta ,-u + stx 8,u + leas 4,s + puls y,u + bita #1 + beq L0034 + ldd #-1 + rts +L0034 clra + clrb + rts + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/syscommon.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,15 @@ +* Disassembly by Os9disasm of syscommon.r + + section code + +_os9err: clra + std errno,y + ldd #-1 + rts +_sysret: bcs _os9err + clra + clrb + rts + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/system.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,58 @@ +* Disassembly by Os9disasm of system.r + + section code + +* class D external label equates + +D0000 equ $0000 + +* class X external label equates + +X6865 equ $6865 + +system: pshs u + ldd #$ff5a + lbsr _stkcheck + leas -86,s + ldd #$0051 + ldu 90,s + leax ,s + pshs d + pshs x,u + lbsr strncpy + leas 6,s + clr 80,s + leax >L0066,pcr + pshs d,x + lbsr strcat + leas 4,s + clra + clrb + pshs d + incb + pshs d + pshs d + leax 6,s + pshs x + pshs x + lbsr strlen + std ,s + leax >L0061,pcr + pshs x + lbsr os9fork + leas 12,s + std 82,s +L004c leax 84,s + pshs x + lbsr wait + leas 2,s + cmpd 82,s + bne L004c + leas 84,s + puls d,u,pc +L0061 com X6865 + inc 12,s +L0066 tst D0000 + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/tidyup.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,8 @@ +* Disassembly by Os9disasm of tidyup.r + + section code + +_tidyup: rts + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/time.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,18 @@ +* Disassembly by Os9disasm of time.r + + section code + +* OS-9 system function equates + +F$Time equ $15 +F$STime equ $16 + +setime: ldx 2,s + os9 F$STime + lbra _sysret +getime: ldx 2,s + os9 F$Time + lbra _sysret + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/uminmax.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,17 @@ +* Disassembly by Os9disasm of uminmax.r + + section code + +umin: ldd 2,s + cmpd 4,s + bls L0009 + ldd 4,s +L0009 rts +umax: ldd 2,s + cmpd 4,s + bcc L0013 + ldd 4,s +L0013 rts + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/utime.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,412 @@ +* Disassembly by Os9disasm of utime.r + +* class X standard named label equates + +D.SysPrc equ $004a + +* class D external label equates + +D0000 equ $0000 +D0025 equ $0025 +D0041 equ $0041 +D0044 equ $0044 +D0046 equ $0046 +D004a equ $004a +D004d equ $004d +D004e equ $004e +D0053 equ $0053 +D0054 equ $0054 +D0057 equ $0057 + +* class X external label equates + +X004f equ $004f +X2025 equ $2025 +X7200 equ $7200 + + section bss + +* Uninitialized data (class B) +B0000 rmb 16 +B0010 rmb 26 +* Initialized Data (class G) +G0000 fcb $00 + fcb $1f + fcb $00 + fcb $1c + fcb $00 + fcb $1f + fcb $00 + fcb $1e + fcb $00 + fcb $1f + fcb $00 + fcb $1e + fcb $00 + fcb $1f + fcb $00 + fcb $1f + fcb $00 + fcb $1e + fcb $00 + fcb $1f + fcb $00 + fcb $1e + fcb $00 + fcb $1f + + endsect + + section code + +time: pshs u + leas -6,s + leau ,s + pshs u + lbsr getime + stu ,s + bsr o2utime + ldu 12,s + beq L001b + ldd ,x + std ,u + ldd 2,x + std 2,u +L001b leas 8,s + puls u,pc +L001f fcb $01 + tst 1,x + jmp -12,y +o2utime equ *-1 + rora + ldu 6,s + clra + clrb + pshs d + pshs d + ldb #$45 + ldx #0 + bra L003e +L0034 leax 365,x + bitb #3 + bne L003e + leax 1,x +L003e incb + cmpb ,u + blt L0034 + stx 2,s + leax G0000,y + lda #$1d + ldb ,u+ + andb #3 + beq L0053 + lda #$1c +L0053 sta 3,x + ldb #1 + bra L0062 +L0059 ldd ,x++ + addd 2,s + std 2,s + ldb 4,s + incb +L0062 stb 4,s + cmpb ,u + blt L0059 + leau 1,u + ldb ,u+ + decb + clra + addd 2,s + std 2,s + lslb + rola + addd 2,s + lslb + rola + rol 1,s + lslb + rola + rol 1,s + lslb + rola + rol 1,s + std 2,s + ldb ,u+ + clra + addd 2,s + std 2,s + ldb 1,s + adcb #0 + stb 1,s + bsr L00c5 + ldb ,u+ + clra + addd 2,s + std 2,s + ldd ,s + adcb #0 + adca #0 + std ,s + bsr L00c5 + ldb ,u+ + clra + addd 2,s + std 2,s + ldd ,s + adcb #0 + adca #0 + std ,s + leau ,s + leax _flacc,y + ldd ,u + std ,x + ldd 2,u + std 2,x + leas 6,s + puls u,pc +L00c5 ldx 2,s + ldd 4,s + bsr L00f0 + bsr L00f0 + addd 4,s + exg d,x + adcb 3,s + adca 2,s + exg d,x + stx 2,s + std 4,s + bsr L00f0 + addd 4,s + exg d,x + adcb 3,s + adca 2,s + exg d,x + bsr L00f0 + bsr L00f0 + stx 2,s + std 4,s + rts +L00f0 lslb + rola + exg d,x + rolb + rola + exg d,x + rts +u2otime: pshs u + ldu 6,s + ldx 4,s + leax 6,x + lda #6 +L0103 ldb ,u+ + ldb ,u+ + stb ,-x + deca + bne L0103 + puls u,pc +daylight: neg D0000 +timezone: neg D0000 + neg D0000 +localtim: pshs d,u + leau B0000,y + ldx 6,s + ldd 2,x + pshs d + ldd ,x + pshs d + leax ,s + ldd #$003c + bsr L019b + std ,u + ldd #$003c + bsr L019b + std 2,u + ldd #$0018 + bsr L019b + std 4,u + ldd 2,x + std 4,s + ldd #$0046 + std 10,u +L0144 leax L001f,pcr + ldb 11,u + andb #3 + bne L0150 + leax 2,x +L0150 ldd 4,s + subd ,x + inc 11,u + std 4,s + bcc L0144 + addd ,x + std 4,s + dec 11,u + std 14,u + ldb 11,u + leax G0000,y + lda #$1d + andb #3 + beq L0170 + lda #$1c +L0170 sta 3,x + clra + clrb + std 8,u + ldd 4,s +L0178 inc 9,u + subd ,x++ + bcc L0178 + addd -2,x + addd #1 + std 6,u + leax ,s + ldd 2,x + addd #4 + std 2,x + ldd #7 + bsr L019b + std 12,u + tfr u,d + leas 6,s + puls u,pc +L019b clr ,-s + clr ,-s + pshs d + ldb #$21 + pshs b + bra L01af +L01a7 ldd 3,s + subd 1,s + bcs L01af + std 3,s +L01af rol 3,x + rol 2,x + rol 1,x + rol ,x + rol 4,s + rol 3,s + dec ,s + bne L01a7 + com 3,x + com 2,x + com 1,x + com ,x + lsr 3,s + ror 4,s + leas 3,s + puls d,pc +asctime: pshs u + ldu 4,s + ldd 10,u + pshs d + ldd ,u + pshs d + ldd 2,u + pshs d + ldd 4,u + pshs d + ldd 6,u + pshs d + ldd 8,u + subd #1 + lslb + rola + lslb + rola + leax >L024a,pcr + leax d,x + pshs x + ldd 12,u + lslb + rola + lslb + rola + leax >L022e,pcr + leax d,x + pshs x + leax >L027a,pcr + pshs x + leax B0010,y + pshs x + lbsr sprintf + leas 18,s + leax B0010,y + tfr x,d + puls u,pc +ctime: ldd 2,s + pshs d + lbsr localtim + std ,s + lbsr asctime + puls x,pc +*L022e comb +* fcb $75 +* fcb $6e +* neg D004d +* clr 14,s +* neg D0054 +* fcb $75 +* fcb $65 +* neg D0057 +* fcb $65 +* fcb $64 +* neg D0054 +* asl -11,s +* neg D0046 +* fcb $72 +* fcb $69 +* neg D0053 +* fcb $61 +* lsr D.SysPrc +*L024a equ *-1 +* fcb $61 +* fcb $6e +* neg D0046 +* fcb $65 +* fcb $62 +* neg D004d +* fcb $61 +* fcb $72 +* neg D0041 +* neg X7200 +* tsta +* fcb $61 +* rol D.SysPrc +* fcb $75 +* fcb $6e +* neg D004a +* fcb $75 +* fcb $6c +* neg D0041 +* fcb $75 +* fcb $67 +* neg D0053 +* fcb $65 +* neg X004f +* com -12,s +* neg D004e +* clr -10,s +* neg D0044 +* fcb $65 +* fcb $63 +* neg D0025 +*L027a equ *-1 +* com X2025 +* com X2025 +* leas 4,s +* bra L02aa +* leax -14,y +* lsr -6,y +* bcs L02bb +* leas 4,s +* abx +* bcs L02c0 +* leas 4,s +* bra L02c5 +* rts +* bcs L02c7 +* leas 4,s +* tst D0000 +* + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/write.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,30 @@ +* Disassembly by Os9disasm of write.r + + section code + +* OS-9 system function equates + +I$Write equ $8a +I$WritLn equ $8c + +write: pshs y + ldy 8,s + beq L0015 + lda 5,s + ldx 6,s + os9 I$Write +L000e bcc L0015 + puls y + lbra _os9err +L0015 tfr y,d + puls y,pc +writeln: pshs y + ldy 8,s + beq L0015 + lda 5,s + ldx 6,s + os9 I$WritLn + bra L000e + + endsect +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/kreiderclib/xtoa.as Thu May 23 05:49:13 2013 -0500 @@ -0,0 +1,43 @@ +* Disassembly by Os9disasm of xtoa.r + + section code + +utoa: clra + clrb + pshs d,u + ldu 8,s + bra L0018 +itoa: clra + clrb + pshs d,u + ldu 8,s + tst 6,s + bpl L0018 + inc ,s + subd 6,s + std 6,s +L0018 ldd 6,s + pshs d + ldd #$000a + lbsr ccumod + addb #$30 + stb ,u+ + ldd 6,s + pshs d + ldd #$000a + lbsr ccudiv + std 6,s + bgt L0018 + tst ,s + beq L003c + ldb #$2d + stb ,u+ +L003c clr ,u + ldd 8,s + pshs d + lbsr reverse + leas 4,s + puls u,pc + + endsect +