**************************************************************************** * * * Amiga strap version 33.97 (1 Oct 1986) disassembly * * this version of the program was contained in Kickstart 1.2 * * * * ============================================================== * * disassembly is taken from Amiga Disk Drives: Inside & Out book * * ============================================================== * * * * following text supposes knowledge of 68k assembly language and * * structures of Amiga operating system * * * * this little work was inspired by disassembly of AmigaOS 1.2 Exec by * * Markus Wandel (http://wandel.ca/homepage/execdis/exec_disassembly.txt) * * or downloadable from Aminet (aminet.net) * * structure and appearance is from that reason similar * * * **************************************************************************** ---------------------------------------------------------------------------- content of the temporary buffers ---------------------------------------------------------------------------- ; this is content of temporary stack space of size $7E (126) bytes ; base of this area is held in A5 int the code below ; standard node $0000 ds.l 1 TMP_EXECLIB ExecBase $0004 ds.l 1 TMP_GFXLIB GfxBase $0008 ds.l 1 TMP_VPORT ViewPort $000C ds.l 1 TMP_VIEW View $0010 ds.l 1 TMP_RAST RastPort $0014 ds.l 1 TMP_TMPRAS TmpRas $0018 ds.l 1 TMP_RASINFO RasInfo $001C ds.l 1 TMP_BITMAP BitMap $0020 ds.l 1 TMP_PLANEPTR1 PlanePTR 1 $0024 ds.l 1 TMP_PLANEPTR2 PlanePTR 2 $0028 ds.l 1 TMP_BUFFER Buffer for TmpRAS $002C ds.b $30 TMP_IOSTDREQT IOStdReq $005C ds.b $22 TMP_MSGPORT MessagePort ; this is content of temporary buffer for boot block and bitmaps to be blitted ; size is $0488 (1.160) bytes, base of this area is held in A4 int the code below $0000 ds.b $0400 ; tmp place for boot block $0400 ds.b $08 ; ??? $0408 ds.b $80 ; tmp place bitmaps to be blitted in the screen ; this is content of temporary buffer for displying hand with diskette ; size is $5E9A (24.218) bytes, base of this area is held in A4 int the code below $0000 ds.b $28 ; ViewPort structure $0028 ds.b $12 ; View structure $003A ds.b $64 ; RastPort structure $009E ds.b $08 ; TmpRas structure $00A6 ds.b $0C ; RasInfo structure $00B2 ds.b $0C ; BitMap structure $00BE ds.b $1F40 ; Plane 1 $1FFE ds.b $1F40 ; Plane 2 $3F3E ds.b $1F5C ; Buffer for TmpRas - we use Flood ---------------------------------------------------------------------------- strap ROM tag ---------------------------------------------------------------------------- ; this is the disassembly of Kickstart 1.2 ROM at addresses ; $FE8884 - $FE90EB, this address range is preceded by ; console.device and followed by timer.device ; this version of strap can boot from DF0 only FE8884 4AFC RTC_MATCHWORD (start of ROMTAG marker) FE8886 00FE8884 RT_MATCHTAG (pointer RTC_MATCHWORD) FE888A 00FE88C0 RT_ENDSKIP (pointer to end of code) FE888E 01 RT_FLAGS (RTF_COLDSTART) FE888F 21 RT_VERSION (version number) FE8890 00 RT_TYPE (NT_UNKNOWN) FE8891 C4 RT_PRI (priority = -60) FE8892 00FE889E RT_NAME (pointer to name) FE8896 00FE88A4 RT_IDSTRING (pointer to ID string) FE889A 00FE88D6 RT_INIT (execution address) ; the priority (-60) is the lowest, strap is the last initialized ; resident module, just after mathffp.library and before dos.library ; which is not initialized automatically but by the boot block ---------------------------------------------------------------------------- name, version ---------------------------------------------------------------------------- FE889E "strap", 00 FE88A4 "strap 33.97 (1 Oct 1986)", CR, LF, 00 FE88BF 00 ; padding FE88C0 "DOS", 00 ; DOS disk signature FE88C4 "trackdisk.device", 00 FE88D5 00 ; padding ---------------------------------------------------------------------------- init routine ---------------------------------------------------------------------------- ; as the RTF_AUTOINIT bit in RT_FLAGS is not set the InitResident calls ; resource's own initialization routine below FE88D6 movem.l D2/D3/A3-A5,-(SP) ; save registers FE88DA moveq #0,D3 ; clear D3 FE88DC sub.l A4,A4 ; clear A4 FE88DE lea $FE8B3A,A3 ; pointer to rts - dummy initialization routine FE88E4 link A5,#-$7E ; make 126 bytes stack space FE88E8 sub.l #$7E,A5 ; A5 to beginning of stack FE88EE move.l A6,0(A5) ; enter ExecBase FE88F2 move.l D3,4(A5) ; enter null (placeholder for GfxBase) FE88F6 move.l #$0488,D0 ; pass the size of the storage to use FE88FC move.l #$010002,D1 ; allocate chip memory and erase FE8902 jsr -$C6(A6) ; AllocMem FE8906 tst.l D0 ; did error occur? FE8908 bne.s $FE8924 ; if not, branch FE890A movem.l D7/A5/A6,-(SP) ; save registers FE890E move.l #$30010000,D7 ; pass error number FE8914 move.l 4.w,A6 ; write ExecBase to A6 FE8918 jsr -$6C(A6) ; Alert FE891C movem.l (SP)+,D7/A5/A6 ; restore registers FE8920 bra.l $FE8B2A ; reduce stack and end ; we succeeded and have 1160 bytes tmp area FE8924 move.l D0,A4 ; pass the pointer to reserved storage in A4 FE8926 lea $FE889E,A0 ; pass pointer to ASCII "strap" FE892C move.l A0,$36(A5) ; as disk IO name and store FE8930 move.l A0,$66(A5) ; enter as name of port in message port list FE8934 sub.l A1,A1 ; erase A1 FE8936 jsr -$0126(A6) ; FindTask - get current task FE893A move.l D0,$6C(A5) ; and store pointer FE893E move.b #0,$6A(A5) ; enter flags in the MsgPort structure ; A blank list is created. FE8944 lea $70(A5),A0 ; pass pointer to message list to A0 FE8948 move.l A0,(A0) ; write pointer to message list in ml_Head FE894A addq.l #4,(A0) ; set ml_Head to ml_Tail FE894C clr.l 4(A0) ; set ml_Tail to 0 FE8950 move.l A0,8(A0) ; set ml_TailPred to ml_Head FE8954 moveq #-1,D0 ; allocate free signal for the current task FE8956 jsr -$014A(A6) ; AllocSignal FE895A move.b D0,$6B(A5) ; enter signal into MsgPort structure FE895E bpl.s $FE897A ; if everything is OK branch FE8960 movem.l D7/A5/A6,-(SP) ; otherwise no signal available FE8964 move.l #$30070000,D7 ; pass error number FE896A move.l 4.w,A6 ; write ExecBase in A6 FE896E jsr -$6C(A6) ; Alert FE8972 movem.l (SP)+,D7/A5/A6 ; restore registers FE8976 bra.l $FE8B1E ; branch FE897A lea $5C(A5),A0 ; get pointer to MsgPort node FE897E move.l A0,$3A(A5) ; and enter into IOStdReq structure FE8982 lea $FE88C4(PC),A0 ; pass pointer to ASCII "trackdisk.device" FE8986 lea $2C(A5),A1 ; pass pointer to IOStdReq structure FE898A moveq #0,D0 ; set drive to DF0 FE898C moveq #0,D1 ; do not pass flags FE898E jsr -$01BC(A6) ; OpenDevice (trackdisk.device) FE8992 tst.l D0 ; device opened? FE8994 beq.s $FE89B0 ; if yes, branch FE8996 movem.l D7/A5/A6,-(SP) ; otherwise save registers and FE899A move.l #$30048014,D7 ; pass error number FE89A0 move.l 4.w,A6 ; write ExecBase in A6 FE89A4 jsr -$6C(A6) ; Alert FE89A8 movem.l (SP)+,D7/A5/A6 ; restore registers FE89AC bra.l $FE8B14 ; free signal and end ; The following routine clears all buffers. FE89B0 move.w #$0100,$DFF096 ; block DMA accesses FE89B8 lea $2C(A5),A1 ; pass the pointer to the IOStdReq structure to A1 FE89BC move.w #$0005,$1C(A1) ; pass command: CMD_CLEAR FE89C2 jsr -$01C8(A6) ; DoIO FE89C6 tst.l D0 ; did error occur? FE89C8 bne.l $FE8AC8 ; if yes, branch ; In the next routine the number of the disk changes is passed in D2. FE89CC lea $2C(A5),A1 ; pass pointer to IOStdReq structure FE89D0 move.w #$000D,28(A1) ; pass command: TD_CHANGENUM FE89D6 jsr -$01C8(A6) ; DoIO FE89DA tst.l D0 ; did error occur? FE89DC bne.l $FE8AC8 ; if yes, branch FE89E0 move.l $4C(A5),D2 ; otherwise pass the number of disk changes in D2 ; Now a test is made if the disk inserted is a DOS disk. FE89E4 lea $2C(A5),A1 ; pointer to the structure IOStdReq FE89E8 move.w #$0002,28(A1) ; command passed: CMD_READ FE89EE move.l #$0400,$24(A1) ; pass length FE89F6 move.l A4,$28(A1) ; pass pointer to data buffer FE89FA move.l #0,$2C(A1) ; pass offset for bootblock FE8A02 jsr -$01C8(A6) ; DoIO FE8A06 tst.l D0 ; error occurred? FE8A08 bne.s $FE8A5C ; if yes, branch FE8A0A move.l (A4),D0 ; first data to D0 FE8A0C cmp.l $FE88C0(PC),D0 ; compare with DOS identification FE8A10 bne.s $FE8A5C ; if no agreement branch FE8A12 move.l A4,A0 ; otherwise pass the pointer the data buffer in A0 ; Next follows the routine for testing of the boot block checksum. FE8A14 move.w #$00FF,D1 ; load counter with value for 1.024 bytes (boot block) FE8A18 moveq #0,D0 ; clear register for checksum FE8A1A add.l (A0)+,D0 ; add content of longword from diskbuffer to D0 FE8A1C bcc.s $FE8A20 ; if no overflow was created branch FE8A1E addq.l #1,D0 ; otherwise increment D0 by overflow FE8A20 dbra D1,$FE8A1A ; if the 1.024 long words have not been processed, go back FE8A24 not.l D0 ; reverse the bits of the checksum FE8A26 bne.s $FE8A5C ; if checksum is not OK, branch ; Jump to the boot program. FE8A28 lea $2C(A5),A1 ; pass pointer to IOStdReq structure FE8A2C jsr $0C(A4) ; jump into the boot program FE8A30 tst.l D0 ; error occurred? FE8A32 beq.s $FE8A56 ; if not, branch FE8A34 move.l D0,-(SP) ; write error register to the stack FE8A36 move.l SP,A1 ; write alert parameter to A1 FE8A38 movem.l D7/A5/A6,-(SP) ; save registers FE8A3C move.l #$30000001,D7 ; pass error number FE8A42 lea (A1),A5 ; pass alert parameter to A5 FE8A44 move.l 4.w,A6 ; write ExecBase in A6 FE8A48 jsr -$6C(A6) ; Alert FE8A4C movem.l (SP)+,D7/A5/A6 ; restore registers FE8A50 addq.l #4,SP ; set stack beginning to alert parameter FE8A52 bra.l $FE8B00 ; branch ; Next the pointer to the initialization routine is passed to A3. FE8A56 move.l A0,A3 ; pass pointer to the initialization routine FE8A58 bra.l $FE8B00 ; branch ; This routine tests if the display asking for insertion of the Workbench ; disk has been sent to the screen already. If not, it is displayed and then ; the motor is switched off. FE8A5C move.l 4(A5),D0 ; graphics library available? FE8A60 bne.s $FE8A66 ; if yes, branch FE8A62 bsr.l $FE8B7E ; else open graphics library FE8A66 move.w #$8100,$DFF096 ; permit DMA accesses FE8A6E lea $2C(A5),A1 ; pass pointer to IOStdReq structure in A1 FE8A72 move.w #$0009,$1C(A1) ; pass command: TD_MOTOR FE8A78 clr.l $24(A1) ; switch off motor FE8A7C jsr -$01C8(A6) ; DoIO FE8A80 tst.l D0 ; error occurred? FE8A82 bne.s $FE8AC8 ; if yes, branch ; The following routine waits until the disk is changed. FE8A84 lea $2C(A5),A1 ; pass pointer to IOStdReq structure to A1 FE8A88 move.w #$000d,$1C(A1) ; pass command: TD_CHANGENUM FE8A8E jsr -$01C8(A6) ; DoIO FE8A92 tst.l D0 ; error occurred? FE8A94 bne.s $FE8AC8 ; if yes, branch FE8A96 cmp.l $4C(A5),D2 ; disk changed in the meantime? FE8A9A beq.s $FE8A84 ; if not, continue testing ; The program now senses if a disk is inserted. FE8A9C lea $2C(A5),A1 ; pass pointer to IOStdReq structure FE8AA0 move.w #$000e,28(A1) ; pass command: TD_CHANGESTATE FE8AA6 jsr -$01C8(A6) ; DoIO FE8AAA tst.l D0 ; error occurred? FE8AAC bne.s $FE8AC8 ; if yes, branch FE8AAE tst.l $4C(A5) ; disk inserted? FE8AB2 bne.s $FE8A9C ; if not, continue testing FE8AB4 bra.l $FE89B0 ; if disk was inserted, branch ; The number of disk changes is passed. FE8AB8 lea $2C(A5),A1 ; pass pointer to IOStdReq structure FE8ABC move.w #$000d,28(A1) ; pass command: TD_CHANGENUM FE8AC2 jsr -$01C8(A6) ; DoIO FE8AC6 bra.s $FE8A5C ; branch ; A jump to the following routine occurs in case of error. FE8AC8 cmp.b #$1D,$4B(A5) ; error occurred FE8ACE beq.s $FE8AB8 ; if yes, branch FE8AD0 pea $0000 ; write $0000 into the stack FE8AD4 move.w $48(A5),2(SP) ; get IO command and write into stack FE8ADA pea $0000 ; write $0000 into the stack FE8ADE move.b $4B(A5),3(SP) ; get IO error and write into stack FE8AE4 move.l SP,A1 ; pass stack as alert parameter FE8AE6 movem.l D7/A5/A6,-(SP) ; save registers FE8AEA move.l #$30068014,D7 ; pass error number FE8AF0 lea (A1),A5 ; pass alert parameter to A5 FE8AF2 move.l 4.w,A6 ; write ExecBase in A6 FE8AF6 jsr -$6C(A6) ; Alert FE8AFA movem.l (SP)+,D7/A5/A6 ; restore registers FE8AFE addq.l #8,SP ; set stack beginning to alert parameter ; During the following routine everything is restored to normal and a ; jump is performed to the initialization routine of DOS. FE8B00 bsr.l $FE8DD0 ; branch - clean gfx resources FE8B04 move.w #$8100,$DFF096 ; permit DMA accesses FE8B0C lea $2C(A5),A1 ; pass pointer to IOStdReq structure FE8B10 jsr -$01C2(A6) ; CloseDevice FE8B14 moveq #0,D0 ; erase D0 FE8B16 move.b $0F(A5),D0 ; pass signal number FE8B1A jsr -$0150(A6) ; FreeSignal FE8B1E move.l A4,A1 ; write beginning address of the tmp storage to A1 FE8B20 move.l #$0488,D0 ; pass size of tmp storage FE8B26 jsr -$D2(A6) ; FreeMem FE8B2A add.l #$7E,A5 ; set A5 to end of stack FE8B30 unlk A5 ; bring stack to normal size FE8B32 move.l A3,A0 ; pass pointer to initialization routine in A0 FE8B34 movem.l (SP)+,D2/D3/A3-A5 ; restore registers FE8B38 jmp (A0) ; perform initialization FE8B3A rts ---------------------------------------------------------------------------- following piece of code draws the hand with the diskette ---------------------------------------------------------------------------- FE8B3C "graphics.library", 00, 00 FE8B4E 0FFF 0FFF 0FFF 0FFF 0FFF 0FFF 0FFF 0FFF FE8B5E 0FFF 0FFF 0FFF 0FFF 0FFF 0FFF 0FFF 0FFF FE8B6E 0FFF 0FFF 0FFF 0FFF ; 24 times white color FE8B76 0FFF 0000 077C 0BBB ; colors - white, black, light blue and light gray ; In the normal case, A0 contains the pointer to the initialization routine. ; In case of an error, A0 contains the pointer to $fe8b3a. A jump is made ; through WarmCapture (if it contains a value). ; This routine opens the graphics library. FE8B7E lea $FE8B3C(PC),A1 ; pass pointer to "graphics.library" to A1 FE8B82 moveq #0,D0 ; pass version FE8B84 jsr -$0228(A6) ; OpenLibrary FE8B88 move.l D0,4(A5) ; enter GfxBase in the stack FE8B8C bne.s $FE8BA6 ; if no error occurred, branch FE8B8E movem.l D7/A5/A6,-(SP) ; save registers FE8B92 move.l #$30038002,D7 ; pass error number FE8B98 move.l 4.w,A6 ; write ExecBase in A6 FE8B9C jsr -$6C(A6) ; Alert FE8BA0 movem.l (SP)+,D7/A5/A6 ; restore registers FE8BA4 rts ; The following routine reserves storage for the View port FE8BA6 movem.l D2-D5/A2/A3/A6,-(SP) ; save registers FE8BAA move.l 0(A5),A6 ; pass ExecBase to A6 FE8BAE move.l #$5E9A,D0 ; write byte length in D0 FE8BB4 move.l #$00010003,D1 ; request chip memory, erase and not relocatable FE8BBA jsr -$C6(A6) ; AllocMem FE8BBE tst.l D0 ; error? FE8BC0 bne.l $FE8BE0 ; if not, branch FE8BC4 movem.l D7/A5/A6,-(SP) ; save registers FE8BC8 move.l #$30010000,D7 ; pass error number FE8BCE move.l 4.w,A6 ; write ExecBase to A6 FE8BD2 jsr -$6C(A6) ; Alert FE8BD6 movem.l (SP)+,D7/A5/A6 ; restore registers FE8BDA movem.l (SP)+,D2-D5/A2/A3/A6 ; restore registers FE8BDE rts ; In the routines which follow, the structures required for the display ; output are created, among other things. FE8BE0 move.l D0,8(A5) ; store pointer to ViewPort FE8BE4 add.l #$28,D0 ; reserve space FE8BEA move.l D0,$0C(A5) ; store pointer to View FE8BEE add.l #$12,D0 ; reserve space FE8BF4 move.l D0,$10(A5) ; store pointer to RastPort FE8BF8 add.l #$64,D0 ; reserve space FE8BFE move.l D0,$14(A5) ; store pointer to TmpRas FE8C02 add.l #$08,D0 ; reserve space FE8C08 move.l D0,$18(A5) ; store pointer to RasInfo FE8C0C add.l #$0c,D0 ; reserve space FE8C12 move.l D0,$1C(A5) ; store pointer to BitMap FE8C16 add.l #$28,D0 ; reserve space FE8C1C move.l D0,$20(A5) ; store PlanePTR 1 FE8C20 move.l #$1F40,D1 ; set byte length FE8C26 add.l D1,D0 ; reserve space FE8C28 move.l D0,$24(A5) ; store PlanePTR 2 FE8C2C add.l D1,D0 ; reserve space FE8C2E move.l D0,$28(A5) ; store pointer to buffer FE8C32 move.l 4(A5),A6 ; write GfxBase in A6 FE8C36 move.l 8(A5),A0 ; pass pointer to ViewPort in A0 FE8C3A jsr -$CC(A6) ; InitVPort FE8C3E move.l $0C(A5),A1 ; pass pointer to View in A1 FE8C42 jsr -$0168(A6) ; InitView FE8C46 move.l $1C(A5),A0 ; write pointer to BitMap structure in A0 FE8C4A moveq #2,D0 ; pass 2 bitplanes FE8C4C move.l #$0140,D1 ; pass width (320) FE8C52 move.l #$00c8,D2 ; pass height (200) FE8C58 jsr -$0186(A6) ; InitBitMap FE8C5C move.l $1C(A5),A0 ; write pointer to BitMap structure in A0 FE8C60 move.l $20(A5),8(A0) ; store PlanePTR 1 FE8C66 move.l $24(A5),12(A0) ; store PlanePTR 2 FE8C6C move.l $10(A5),A1 ; pass pointer to RastPort in A1 FE8C70 jsr -$C6(A6) ; InitRastPort FE8C74 move.l $14(A5),A0 ; write pointer to TmpRas in A0 FE8C78 move.l $28(A5),A1 ; write pointer to Buffer in A1 FE8C7C move.l #$1F40,D0 ; pass size in D0 FE8C82 jsr -$01D4(A6) ; InitTmpRas FE8C86 move.l $18(A5),A0 ; pass pointer to RasInfo structure in A0 FE8C8A move.l $1C(A5),4(A0) ; store pointer to BitMap FE8C90 move.l $10(A5),A0 ; pass pointer to RastPort structure in A0 FE8C94 move.l $1C(A5),4(A0) ; store pointer to BitMap FE8C9A move.l $14(A5),12(A0) ; store pointer to TmpRas FE8CA0 move.l 8(A5),A0 ; write pointer to ViewPort structure to A0 FE8CA4 move.w #$00C8,$1A(A0) ; store DHeigth FE8CAA move.w #$0140,$18(A0) ; store DWith FE8CB0 move.l $18(A5),$24(A0) ; store pointer to RasInfo FE8CB6 clr.w $20(A0) ; erase modes FE8CBA move.l $0C(A5),A3 ; write pointer to View structure to A3 FE8CBE move.l 8(A5),0(A3) ; store pointer to ViewPort FE8CC4 move.l A3,A0 ; pass pointer to View in A0 FE8CC6 move.l 8(A5),A1 ; pass pointer to ViewPort in A1 FE8CCA jsr -$D8(A6) ; MakeVPort FE8CCE move.l A3,A1 ; write pointer to View to A1 FE8CD0 jsr -$D2(A6) ; MrgCop FE8CD4 move.l A3,A1 ; pass pointer to View in A1 FE8CD6 jsr -$DE(A6) ; LoadView FE8CDA move.l 8(A5),A0 ; write pointer to ViewPort A0 FE8CDE lea $FE8B4E(PC),A1 ; write colors to A1 FE8CE2 moveq #$14,D0 ; pass Count in D0 FE8CE4 jsr -$C0(A6) ; LoadRGB4 FE8CE8 move.l $10(A5),A3 ; pass pointer to RastPort A3 FE8CEC lea $FE8E1C(PC),A2 ; pass pass pointer to X1/Y1 coordinates FE8CF0 move.l A3,A1 ; pass pointer to RastPort in A1 FE8CF2 moveq #0,D0 ; pass Draw Mode in D0 FE8CF4 jsr -$0162(A6) ; SetDrMd ---------------------------------------------------------------------------- code which draws the vector part of the image ---------------------------------------------------------------------------- ; uses data from FE8E1C - FE8FB7 ; XX YY - XX,YY is end point of the line ; $FF PP XX YY - XX,YY is start point of the line with the color PP ; $FE PP XX YY - flood fill with the color PP starting at the point XX,YY ; $FF $FF - end of data FE8CF8 moveq #0,D3 ; clear D3 FE8CFA move.b (A2)+,D3 ; pass X coordinate in D3 FE8CFC moveq #0,D5 ; clear D5 FE8CFE move.b (A2)+,D5 ; pass Y coordinate in D5 FE8D00 cmp.b #$FF,D3 ; is X equal to #$FF? FE8D04 bne.s $FE8D2E ; if not, branch FE8D06 cmp.b #$FF,D5 ; is Y equal to #$FF? FE8D0A beq.l $FE8D6A ; if yes, branch FE8D0E moveq #0,D4 ; clear D4 FE8D10 move.b (A2)+,D4 ; get new X value FE8D12 moveq #0,D3 ; clear D3 FE8D14 move.b (A2)+,D3 ; get new Y value FE8D16 move.l A3,A1 ; write pointer to RastPort to A1 FE8D18 move.l D5,D0 ; pass old Y to D0 - it is a pen FE8D1A jsr -$0156(A6) ; SetAPen FE8D1E moveq #$28,D1 FE8D20 add.l D3,D1 ; add 40 to Y FE8D22 moveq #$46,D0 FE8D24 add.l D4,D0 ; add 70 to X FE8D26 move.l A3,A1 ; write pointer to RastPort to A1 FE8D28 jsr -$F0(A6) ; Move FE8D2C bra.s $FE8CF8 ; branch back - next entry FE8D2E cmp.b #$FE,D3 ; is X equal to #$FE? FE8D32 bne.s $FE8D56 ; if not, branch FE8D34 moveq #0,D4 ; clear D4 FE8D36 move.b (A2)+,D4 ; get new X value FE8D38 moveq #0,D3 ; clear D3 FE8D3A move.b (A2)+,D3 ; get new Y value FE8D3C move.l A3,A1 ; pass pointer to RastPort to A1 FE8D3E move.l D5,D0 ; pass old Y to D0 - it is a pen FE8D40 jsr -$0156(A6) ; SetAPen FE8D44 moveq #$28,D1 FE8D46 add.l D3,D1 ; add 40 to Y FE8D48 moveq #$46,D0 FE8D4A add.l D4,D0 ; add 70 to X FE8D4C moveq #$01,D2 ; write Mode in D2 FE8D4E move.l A3,A1 ; pass pointer to RastPort to A1 FE8D50 jsr -$014A(A6) ; Flood FE8D54 bra.s $FE8CF8 ; branch back - next entry FE8D56 move.l D3,D4 FE8D58 move.l D5,D3 FE8D5A moveq #$28,D1 FE8D5C add.l D3,D1 ; add 40 to Y FE8D5E moveq #$46,D0 FE8D60 add.l D4,D0 ; add 70 to X FE8D62 move.l A3,A1 ; pointer to RastPort to A1 FE8D64 jsr -$F6(A6) ; Draw FE8D68 bra.s $FE8CF8 ; branch back - next entry ---------------------------------------------------------------------------- code which draws the bitmap part of the image ---------------------------------------------------------------------------- ; uses data from FE8FB8 - FE90E7 ; $00 MM WW HH XX YY - copies bitmap with mask MM, width WW (in words), ; height HH and position XX and YY ; $FF $FF - end of data FE8D6A lea $FE8FB8(PC),A2 ; pointer to new data FE8D6E move.l A3,A1 ; pass pointer to RastPort in A1 FE8D70 moveq #3,D0 ; pass pen in D0 FE8D72 jsr -$0156(A6) ; SetAPen FE8D76 move.w (A2)+,D0 ; get mask FE8D78 bmi.s $FE8DB8 ; if result is negative, branch - end of data FE8D7A move.b D0,$18(A3) ; store mask in RastPort rp_Mask FE8D7E moveq #0,D4 ; clear D4 FE8D80 move.b (A2)+,D4 ; get width in words FE8D82 moveq #0,D5 ; clear D5 FE8D84 move.b (A2)+,D5 ; get height FE8D86 moveq #$46,D2 ; load D2 with 70 FE8D88 moveq #0,D0 ; clear D0 FE8D8A move.b (A2)+,D0 ; get X FE8D8C add.l D0,D2 ; add 70 to X and put it to D2 FE8D8E moveq #$28,D3 FE8D90 move.b (A2)+,D0 ; get Y FE8D92 add.l D0,D3 ; add 40 to Y and put it to D2 FE8D94 move.w D4,D0 ; pass width to D0 FE8D96 mulu D5,D0 ; multiply width with height FE8D98 lea $0408(A4),A0 ; pass source in A0 FE8D9C bra.s $FE8DA0 ; branch ; The next routine copies display data into the Source structure. FE8D9E move.w (A2)+,(A0)+ ; copy data in the source structure FE8DA0 dbra D0,$FE8D9E ; if not all data were copied, branch FE8DA4 lea $0408(A4),A0 ; pass source in A0 FE8DA8 moveq #0,D0 ; pass srcX in D0 FE8DAA add.l D4,D4 ; double width to be in bytes FE8DAC move.l D4,D1 ; pass srcMod in D1 FE8DAE move.l A3,A1 ; store destRastPort FE8DB0 lsl.w #3,D4 ; compute sizeX in pixels FE8DB2 jsr -$24(A6) ; BltTemplate FE8DB6 bra.s $FE8D76 ; branch next bitmap to be copied ; The next routine passes the colors in the View port colormap. FE8DB8 move.l 8(A5),A0 ; pass pointer to ViewPort in A0 FE8DBC lea $FE8B76(PC),A1 ; write pointer to colors in A1 FE8DC0 moveq #4,D0 ; pass count in D0 FE8DC2 jsr -$C0(A6) ; LoadRGB4 - set final 4 colors FE8DC6 jsr -$010E(A6) ; WaitTOF FE8DCA movem.l (SP)+,D2-D5/A2/A3/A6 ; restore registers FE8DCE rts ; The next routine releases the view port and closes the graphics library. FE8DD0 move.l A6,(-SP) ; save A6 FE8DD2 tst.l 4(A5) ; GfxBase available? FE8DD6 beq.s $FE8E16 ; if not, branch FE8DD8 tst.l 8(A5) ; pointer to ViewPort present? FE8DDC beq.s $FE8E0A ; if not, branch FE8DDE move.w #$0100,$DFF096 ; block DMA FE8DE6 move.l 4(A5),A6 ; pass GfxBase in A6 FE8DEA suba.l A1,A1 ; clear A1 FE8DEC jsr -$DE(A6) ; LoadView FE8DF0 move.l 8(A5),A0 ; pass pointer to ViewPort in A0 FE8DF4 jsr -$021C(A6) ; FreeVPortCopLists FE8DF8 move.l 0(A5),A6 ; pass ExecBase in A6 FE8DFC move.l 8(A5),A1 ; write pointer to ViewPort to A1 FE8E00 move.l #$5e9a,D0 ; pass number of Bytes in D0 FE8E06 jsr -$D2(A6) ; FreeMem FE8E0A move.l 0(A5),A6 ; pass ExecBase in A6 FE8E0E move.l 4(A5),A1 ; pass GfxBase in A1 FE8E12 jsr -$019E(A6) ; CloseLibrary FE8E16 move.l (SP)+,A6 ; get A6 FE8E18 rts FE8E1A 0000 ; padding FE8E1C FF01230B ; inner outline of diskette FE8E20 3A0B 3A21 7121 710B 7D0B 8816 885E 7F5E FE8E30 7F38 4038 3E36 3536 3438 2D38 2D41 2348 FE8E40 230B FE8E42 FE022545 ; light blue surface of diskette FE8E46 FF012148 ; outline of hand and outer outline FE8E4A 210A 7E0A 8A16 8A5F 565F 5664 526C 4E71 ; of diskette FE8E5A 4A74 447D 3C81 3C8C 0A8C 0A6D 096D 0951 FE8E6A 0D4B 1445 1541 193A 1E37 2136 2136 1E38 FE8E7A 1A3A 1641 1545 0E4B 0A51 0A6C 0B6D 0B8B FE8E8A 288B 2876 3076 3472 345F 325C 3252 4145 FE8E9A 4139 3E37 3B37 3E3A 3E41 3D42 3642 333F FE8EAA 2A46 1E4C 1255 1254 1E4B 1A4A 1747 1A49 FE8EBA 1E4A 2148 FE8EBE FF01323D ; outline of thumb nail FE8EC2 3436 3C37 3D3A 3D41 3641 323D FE8ECE FF01335C ; outline of label FE8ED2 3352 4245 4239 7D39 7D5E 345E 335A FE8EE0 FF013C0B ; outline of shutter FE8EE4 6F0B 6F20 3C20 3C0B FE8EEC FF01600E ; outer outline of slot in shutter FE8EF0 6B0E 6B1C 601C 600E FE8EF8 FE033E1F ; light gray shutter FE8EFC FF01620F ; inner outline of slot in shutter FE8F00 690F 691B 621B 620F FE8F08 FE02631A ; light blue slot in shutter FE8F0C FF012F39 ; outline of left upper corner of label FE8F10 3239 323B 2F3F 2F39 FE8F18 FF01298B ; palm details FE8F1C 2977 3077 3572 3569 396B 416B 416D 4572 FE8F2C 4972 4974 437D 3B80 3B8B 298B FE8F38 FF01355F ; ring finger detail FE8F3C 3564 3A61 355F FE8F42 FF013962 ; another ring finger detail FE8F46 3564 355F 4A5F 4069 3F69 4167 3C62 3962 FE8F56 FF014E5F ; little finger outline FE8F5A 555F 5564 516C 4E70 4971 4671 436D 436A FE8F6A 4E5F FE8F6C FF01446A ; little finger nail FE8F70 446D 4670 4870 4C6F 4D6C 4969 446A FE8F7E FF013668 ; ring finger nail FE8F82 3E6A 4067 3C63 3963 3665 3668 FE8F8E FF017E0B ; diskette thick frame right FE8F92 8916 895E FE8F96 FE01220B ; diskette thick frame left FE8F9A FE013B0B ; shutter thick frame left FE8F9E FE01610F ; slot thick frame left FE8FA2 FE016A1B ; slot thick frame right FE8FA6 FE01700F ; shutter thick frame right FE8FAA FE017E5E ; label thick frame right FE8FAE FE014B60 ; space between little and ring finger FE8FB2 FE012E39 ; thumb finger thick outline upper left FE8FB6 FFFF ; end marker FE8FB8 0002 0408 3954 ; black and light gray "Amiga" bitmap 1 FE8FBE 1001 8220 4050 0004 0404 8889 1210 5010 FE8FCE 0408 2448 1090 1020 0410 1042 0510 1040 FE8FDE 0420 0050 2690 1080 0440 0484 0900 1100 FE8FEE 0480 4960 4208 1200 0500 0683 8404 1400 FE8FFE 0001 0408 3954 ; black and light gray "Amiga" bitmap 2 FE9004 1F9F FE3F FF77 FE7C 070C EF8F 1E71 DC30 FE9014 07F8 E7CE 1CF3 1FE0 0731 F3CE 1DF6 1CC0 FE9024 0760 03DC 3FFC 1D80 07C0 879C 3F78 1F00 FE9034 0780 CF78 7E78 1E00 0700 FEFF FC7C 1C00 FE9044 0002 0307 4A4A ; light blue "Work" bitmap FE904A C707 8F8C 3000 6603 18CE 7000 3E63 18CF FE905A F000 6667 18CD B000 C63B 8F8C 3000 0600 FE906A 000C 3000 0700 000C 3000 FE9074 0002 0307 4640 ; light blue "bench" bitmap FE907A C71F 18C7 C3E0 C631 98C0 6630 C601 98CF FE908A E630 CE31 98CC 6670 761F 0FC7 C3B0 0600 FE909A 0000 0030 0700 0000 0038 FE90A4 0001 030A 5C64 ; black "V1.2" bitmap FE90AA 0F9F C1C0 0FC0 0707 03C0 1FE0 070E 07C0 FE90BA 3CF0 071C 01C0 0070 0738 01C0 00F0 0770 FE90CA 01C0 03E0 07E0 01C0 0780 07C0 01C0 0F00 FE90DA 0780 07F3 3FF0 0700 07F3 3FF0 FE90E6 FFFF ; end marker FE90E8 moveq #0,D0 ; unused code? FE90EA rts ---------------------------------------------------------------------------- Standard Workbench 1.2 boot block ---------------------------------------------------------------------------- ; Boot block of standard Workbench 1.2 disk ; it gets loaded to arbitrary place returned by AllocMem ; it occupies first 1.024 bytes of the floppy disk ; it is responsible for initializing of dos.library as its resident ; module does not have RTF_COLDSTART set 000000 "DOS", 0 ; ASCII identification of the disk 000004 C0200F19 ; checksum for boot block 000008 00000370 ; pointer to root block ; Starting at the fourth longword (the 12th byte) is the actual boot ; program which is executed when the checksum is correct. Normally the ; following routine is stored here. This can be replaced by the user, ; unless the original one is also executed. This is shown in the ; documentation of the boot routine which follows. ; The program which is written by the Install command appears as follows: 00000C lea $000026(PC),A1 ; pointer to name of the resident structure 000010 jsr -$60(A6) ; FindResident - search resident structure 000014 tst.l D0 ; test for an error 000016 beq.s $000022 ; if an error occurred 000018 move.l D0,A0 ; pointer to Resident structure to A0 00001A move.l $16(A0),A0 ; initialization code of dos.library to A0 00001E moveq #0,D0 ; clear D0 if no error occurred 000020 rts ; return to the strap in ROM 000022 moveq #-1,D0 ; load D0 with -1 (for an error) 000024 bra.s $000020 ; terminate program 000026 "dos.library", 0 ; Name of resident DOS module.