[Coco] unpack?

Wayne Campbell asa.rand at gmail.com
Fri Feb 14 11:34:54 EST 2014


I found 2 copies of a program module named unpack on the SWTPC disk images.
They were identical, so they were 2 copies of the same file. Since I have
no easy way to transfer files between the SWTPC emulator and VCC or MESS, I
decided to binex the module, then copy the listing for that from the SWTPC
emulator (thankfully you can copy the screen contents!) and exbin it in
VCC. It worked. There is no help for this utility, built-in or otherwise.

When I run it (does the same in the SWTPC emulator as it does in VCC) the
cursor drops to the next line and just sits there. To run it, I use the
command 'unpack <filename>'.

The module is only $81 (129) bytes in size. I used disasm 1.5 with the o
and u options set to get a listing for it (it is a 6809 object module). Can
someone tell me what this utility is for? It does not appear to be
connected to Basic09 in any way. Note my comment in parentheses concerning
what I think is the setting of the edition byte. Can someone tell me if my
assumption there is correct?

Wayne

00001                            nam   Unpack
00002                            ttl   program module
00003
00004        * Disassembled 1914/02/14 08:10:33 by Disasm v1.5 (C) 1988 by
RML
00005
00006                            ifp1
00007                            use   /dd/defs/defsfile
00008                            endc
00009   0011            tylg     set   Prgrm+Objct
00010   0081            atrv     set   ReEnt+rev
00011   0001            rev      set   $01
00012   0000 87CD0081            mod   eom,name,tylg,atrv,start,size
00013 D 0000            u0000    rmb   807
00014 D 0327            size     equ   .
00015   000D            name     equ   *
00016   000D 556E7061            fcs   /Unpack/
00017   0013 01                  fcb   $01 (edition byte? wc)
00018   0014            start    equ   *
00019   0014 4F         L0014    clra
00020   0015 3047                leax  $07,u
00021   0017 108E00C8            ldy   #$00C8
00022   001B 103F8B              os9   I$ReadLn
00023   001E 2556                bcs   L0076
00024   0020 109F01              sty   <$0001
00025   0023 31C900CF            leay  >$00CF,u
00026   0027 109F05              sty   <$0005
00027   002A 9F03                stx   <$0003
00028   002C 0D02       L002C    tst   <$0002
00029   002E 2731                beq   L0061
00030   0030 0A02                dec   <$0002
00031   0032 8D26                bsr   L005A
00032   0034 4D                  tsta
00033   0035 2A18                bpl   L004F
00034   0037 8182                cmpa  #$82
00035   0039 2514                bcs   L004F
00036   003B 8080                suba  #$80
00037   003D 3402                pshs  a
00038   003F 6DE4       L003F    tst   ,s
00039   0041 2708                beq   L004B
00040   0043 8620                lda   #$20
00041   0045 8D0C                bsr   L0053
00042   0047 6AE4                dec   ,s
00043   0049 20F4                bra   L003F
00044   004B 3261       L004B    leas  $01,s
00045   004D 20DD                bra   L002C
00046   004F 8D02       L004F    bsr   L0053
00047   0051 20D9                bra   L002C
00048   0053 9E05       L0053    ldx   <$0005
00049   0055 A7A0                sta   ,y+
00050   0057 9705                sta   <$0005
00051   0059 39                  rts
00052   005A 9E03       L005A    ldx   <$0003
00053   005C A680                lda   ,x+
00054   005E 9F03                stx   <$0003
00055   0060 39                  rts
00056   0061 30C900CF   L0061    leax  >$00CF,u
00057   0065 DC05                ldd   <$0005
00058   0067 3410                pshs  x
00059   0069 A3E1                subd  ,s++
00060   006B 1F02                tfr   d,y
00061   006D 8601                lda   #$01
00062   006F 103F8C              os9   I$WritLn
00063   0072 24A0                bcc   L0014
00064   0074 2005                bra   L007B
00065   0076 C1D3       L0076    cmpb  #$D3
00066   0078 2601                bne   L007B
00067   007A 5F                  clrb
00068   007B 103F06     L007B    os9   F$Exit
00069   007E 019AF1              emod
00070   0081            eom      equ   *
00071                            end


-- 
The Structure of I-Code
http://www.cocopedia.com/wiki/index.php/The_Structure_of_I-Code

decode
http://cococoding.com/wayne/



More information about the Coco mailing list