;************************************************************ ;* * ;* SOLITARE by Marc TEYSSIER v1.0 * ;* * ;************************************************************ ; Dont modify anything without telling me. ;If you want to improve my routines, which are quite shitty, ; please tell it to me ! @program prog_code,prog_name include textview.h prog_code: cmp.b #-1,Teacher beq Taught Titlescreen: jsr flib[clr_scr] DrawBox #39,#14,#196,#101 DrawBox #40,#15,#195,#100 Setfont #2 Writestr #45,#20,#1,about Setfont #1 Writestr #47,#32,#1,about2 Writestr #70,#50,#1,NewGame Writestr #70,#60,#1,About Writestr #70,#70,#1,HScore Writestr #70,#80,#1,Help Writestr #70,#90,#1,End Setfont #0 move.w #18,d7 move.w #4,d6 move.w #1,d5 bsr Recognize move.w #86,d6 move.w #27,d5 bsr Recognize move.w #200,d7 move.w #14,d5 bsr Recognize move.w #4,d6 move.w #40,d5 bsr Recognize Idle: jsr flib[idle_loop] cmp.b #268,d0 beq NEWGAME cmp.b #269,d0 beq ABOUT cmp.b #270,d0 beq HSCORE cmp.b #271,d0 beq HELP cmp.b #264,d0 beq Quit bra Idle HELP: jsr flib[clr_scr] drawbox #25,#25,#220,#70 Setfont #2 Writestr #75,#30,#1,help Setfont #1 Writestr #30,#42,#1,help2 Writestr #30,#50,#1,help3 Writestr #30,#58,#1,help4 jsr flib[idle_loop] bra Titlescreen ABOUT: jsr flib[clr_scr] Setfont #2 drawbox #45,#25,#210,#70 Writestr #58,#30,#1,about Setfont #1 Writestr #60,#41,#1,about2 Writestr #50,#50,#1,about3 Writestr #50,#58,#1,about4 jsr flib[idle_loop] bra Titlescreen HSCORE: jsr flib[clr_scr] Setfont #2 drawbox #45,#25,#190,#81 Writestr #60,#30,#1,Hscore Setfont #1 Writestr #60,#45,#1,Hscore1 Writestr #60,#55,#1,Hscore2 Writestr #60,#65,#1,Hscore3 move.w Score1,Time bsr ConvStr Writestr #140,#45,#1,Timestring move.w Score2,Time bsr ConvStr Writestr #140,#55,#1,Timestring move.w Score3,Time bsr ConvStr Writestr #140,#65,#1,Timestring jsr flib[idle_loop] bra Titlescreen NEWGAME: move.w #0,Time lea CurData(PC),a0 lea col1(PC),a1 move.l a1,(a0)+ lea col2(PC),a1 move.l a1,(a0)+ lea col3(PC),a1 move.l a1,(a0)+ lea col4(PC),a1 move.l a1,(a0)+ lea col5(PC),a1 move.l a1,(a0)+ lea col6(PC),a1 move.l a1,(a0)+ lea col7(PC),a1 move.l a1,(a0)+ lea game(PC),a1 move.l a1,(a0)+ lea Backyard(PC),a1 move.l a1,(a0)+ lea as1(PC),a1 move.l a1,(a0)+ lea as2(PC),a1 move.l a1,(a0)+ lea as3(PC),a1 move.l a1,(a0)+ lea as4(PC),a1 move.l a1,(a0)+ Initialisation: move.w #51,d0 \Iniloop: lea game(PC),a0 clr.b 0(a0,d0.w) dbra d0,\Iniloop Shuffle: lea deck(PC),a0 move.w #51,d2 \Shuffle: lea game(PC),a1 move.w #52,d0 jsr flib[random] cmp.b #0,0(a1,d0.w) bne \Shuffle move.b (a0)+,0(a1,d0.w) add.b #52,0(a1,d0.w) dbra d2,\Shuffle Begin: lea game(PC),a0 lea Colnb(PC),a3 add.l #52,a0 clr.w d0 lea col1(PC),a1 bsr SubBegin moveq #1,d0 lea col2(PC),a1 bsr SubBegin moveq #2,d0 lea col3(PC),a1 bsr SubBegin moveq #3,d0 lea col4(PC),a1 bsr SubBegin moveq #4,d0 lea col5(PC),a1 bsr SubBegin moveq #5,d0 lea col6(PC),a1 bsr SubBegin moveq #6,d0 lea col7(PC),a1 bsr SubBegin move.b #23,(a3)+ move.b #-1,(a3)+ move.b #-1,(a3)+ move.b #-1,(a3)+ move.b #-1,(a3)+ move.b #-1,(a3)+ move.b #-1,Selected bsr DisplayAll bra Wait Taught: bsr DisplayAll move.b #0,Teacher Wait: bsr DisCursor Nomove: clr.w ($75B2) Nokey: clr.w ($75B0) move.w ($75B2),d0 nop nop nop nop lea Time(PC),a0 add.w #1,2(a0) cmp.w #$5FFF,2(a0) beq AddTime cmp.w #0,d0 beq Nokey cmp.b #264,d0 beq Titlescreen cmp.b #338,d0 beq Up cmp.b #344,d0 beq Down cmp.b #340,d0 beq Right cmp.b #337,d0 beq Left cmp.b #13,d0 beq Enter cmp.b #116,d0 beq Teach bra Nomove AddTime: move.w #0,2(a0) add.w #1,Time bsr ConvStr move.w #128,-(a7) move.w #238,-(a7) move.w #123,-(a7) move.w #200,-(a7) jsr flib[erase_rect] lea 8(a7),a7 Writestr #200,#123,#1,Timestring bra Nomove Teach: move.b #-1,Teacher rts Up: lea CurPos(PC),a0 cmp.b #7,(a0) beq Nomove cmp.b #8,(a0) beq Nomove cmp.b #9,(a0) bge Up2 cmp.b #0,1(a0) beq Nomove cmp.b #7,(a0) bgt Up2 bsr DisCursor lea CurPos(PC),a0 sub.b #1,1(a0) bra Wait Up2: bsr DisCursor lea CurPos(PC),a0 sub.b #2,(a0) bra FindHg Down: lea CurPos(PC),a0 cmp.b #11,(a0) bge Nomove cmp.b #7,(a0) bge Down2 lea Colnb(PC),a1 clr.l d1 move.b 0(a0),d1 move.b 0(a1,d1.w),d1 move.b 1(a0),d2 cmp.b d1,d2 beq Nomove bsr DisCursor lea CurPos(PC),a0 add.b #1,1(a0) bra Wait Down2: bsr DisCursor lea CurPos(PC),a0 add.b #2,(a0) bra FindHg Right: lea CurPos(PC),a0 cmp.b #6,(a0) beq Nomove bsr DisCursor lea CurPos(PC),a0 cmp.b #8,(a0) beq Right2 cmp.b #10,(a0) beq Right2 cmp.b #12,(a0) beq Right2 add.b #1,(a0) bra FindHg Right2: move.b #0,(a0) bra FindHg Left: lea CurPos(PC),a0 cmp.b #7,(a0) beq Nomove cmp.b #9,(a0) beq Nomove cmp.b #11,(a0) beq Nomove bsr DisCursor lea CurPos(PC),a0 cmp.b #0,(a0) beq Left2 sub.b #1,(a0) bra FindHg Left2: move.b #8,(a0) bra FindHg FindHg: lea Colnb(PC),a1 clr.l d1 move.b 0(a0),d1 move.b 0(a1,d1.w),1(a0) bra Wait Enter: cmp.b #-1,Selected bne Match lea CurPos(PC),a0 cmp.b #7,(a0) beq NewCard bsr GetAddress cmp.b #52,(a0) bgt Return lea CurPos(PC),a0 lea Selected(PC),a1 cmp.b #-1,1(a0) beq Nomove move.b (a0),(a1) move.b 1(a0),1(a1) bsr GetValue lea Selected(PC),a1 move.b d0,2(a1) move.b d1,3(a1) bra Wait Match: lea CurPos(PC),a0 lea Colnb(PC),a1 clr.w d0 move.b (a0),d0 move.b 1(a0),d1 cmp.b 0(a1,d0.w),d1 bne Nomove cmp.b #8,(a0) bgt AsCheck cmp.b #-1,0(a1,d0.w) beq NewKing bsr GetValue subq #1,d0 lea Selected(PC),a0 cmp.b 2(a0),d0 bne Dismatch cmp.b #2,d1 bge Black cmp.b #1,3(a0) ble Dismatch bra Okay Black: cmp.b #2,3(a0) bge Dismatch Okay: bsr DisCursor bsr MoveCard move.b #-1,Selected bra Wait NewKing: lea CurPos(PC),a0 cmp.b #7,(a0) bge Dismatch lea Selected(PC),a0 lea CurPos(PC),a1 lea NCurPos(PC),a2 move.b (a1),(a2) move.b 1(a1),1(a2) move.b (a0),(a1) move.b 1(a0),1(a1) bsr GetValue lea CurPos(PC),a1 lea NCurPos(PC),a2 move.b (a2),(a1) move.b 1(a2),1(a1) cmp.b #13,d0 bne Dismatch bsr MoveCard move.b #-1,Selected bra Wait NewCard: lea Colnb(PC),a0 lea Selected(PC),a1 lea CurPos(PC),a2 cmp.b #-1,7(a0) beq Flip move.b #7,(a1) move.b 7(a0),1(a1) move.b #8,(a2) move.b 8(a0),1(a2) bsr MoveCard bsr GetAddress sub.b #52,(a0) bsr DisplayCard move.b #-1,Selected bra Wait Flip: clr.w d0 move.b 8(a0),d0 lea CurData(PC),a0 move.l 32(a0),a1 move.l 28(a0),a0 \Flip: add.b #52,0(a1,d0.w) move.b 0(a1,d0.w),(a0)+ move.b #0,0(a1,d0.w) dbra d0,\Flip lea Colnb(Pc),a0 move.b 8(a0),7(a0) move.b #-1,8(a0) lea CurPos(PC),a0 move.b #8,(a0) move.b #-1,1(a0) bsr DisplayCard lea CurPos(PC),a0 lea Colnb(PC),a1 move.b #7,(a0) move.b 7(a1),1(a0) bsr DisplayCard bra Wait Return: clr.w d0 clr.w d1 lea CurPos(PC),a0 lea Colnb(PC),a1 move.b (a0),d0 move.b 0(a1,d0.w),d1 cmp.b 1(a0),d1 bne Nomove bsr GetAddress sub.b #52,(a0) bsr DisplayCard bra Wait Dismatch: lea Selected(PC),a0 lea CurPos(PC),a1 lea NCurPos(PC),a2 move.b (a1),(a2) move.b 1(a1),1(a2) move.b (a0),(a1) move.b 1(a0),1(a1) bsr DisCursor lea CurPos(PC),a1 lea NCurPos(PC),a2 move.b (a2),(a1) move.b 1(a2),1(a1) lea Selected(PC),a0 move.b #-1,(a0) bra Nomove AsCheck: lea Selected(PC),a0 lea Colnb(PC),a1 clr.w d0 move.b (a0),d0 move.b 0(a1,d0.w),d0 cmp.b 1(a0),d0 bne Dismatch cmp.b #1,2(a0) beq NewAs bsr GetValue addq #1,d0 lea Selected(PC),a0 cmp.b 2(a0),d0 bne Dismatch cmp.b 3(a0),d1 bne Dismatch ConfNAs: bsr DisCursor bsr MoveCard move.b #-1,Selected lea Colnb(PC),a0 cmp.b #12,9(a0) bne Wait cmp.b #12,10(a0) bne Wait cmp.b #12,11(a0) bne Wait cmp.b #12,12(a0) bne Wait DrawBox #39,#39,#199,#79 DrawBox #40,#40,#198,#78 Setfont #2 Writestr #42,#42,#1,Congra Writestr #55,#60,#1,Won jsr flib[idle_loop] move.w Score3,d0 move.w Time,d1 cmp.w d0,d1 bge HSCORE DrawBox #39,#39,#199,#79 DrawBox #40,#40,#198,#78 Writestr #42,#42,#1,Com1 Setfont #1 Writestr #55,#54,#1,Com2 Input_name: lea textname(PC),a6 move.l #9,d0 \clearloop: clr.b (a6)+ dbra d0,\clearloop lea textname(PC),a6 move.b #95,(a6) clr.l d7 inputloop: WriteStr #65,#64,#4,textname jsr flib[idle_loop] cmpi #13,d0 beq enter cmpi #257,d0 beq backspace cmpi #264,d0 beq Quit cmpi #256,d0 bgt inputloop cmpi #8,d7 beq inputloop move.b d0,(a6)+ move.b #95,(a6) addq.l #1,d7 bra inputloop backspace: cmpi #0,d7 beq inputloop move.b #32,(a6) move.b #95,-(a6) subq.l #1,d7 bra inputloop enter: cmpi #0,d7 beq inputloop move.b #0,(a6) lea Score3(PC),a5 lea Hscore3(PC),a4 move.w Time,d0 move.w Score2,d1 cmp.w d0,d1 ble Beat3 lea Score2(PC),a5 lea Hscore2(PC),a4 move.w Score1,d1 cmp.w d0,d1 ble Beat2 lea Score1(PC),a5 lea Hscore1(PC),a4 lea Hscore2(PC),a0 lea Score2(PC),a1 lea Hscore3(PC),a2 lea Score3(PC),a3 bsr SubLoop lea Hscore1(PC),a0 lea Score1(PC),a1 lea Hscore2(PC),a2 lea Score2(PC),a3 bsr SubLoop bra Beat3 Beat2: lea Hscore2(PC),a0 lea Score2(PC),a1 lea Hscore3(PC),a2 lea Score3(PC),a3 bsr SubLoop Beat3: lea Time(PC),a1 lea textname(PC),a0 move.l a4,a2 move.l a5,a3 bsr SubLoop bra HSCORE SubLoop: move.w #7,d0 move.w (a1),(a3) \SubLoop: move.b (a0)+,(a2)+ dbra d0,\SubLoop rts NewAs: clr.w d2 lea CurPos(PC),a1 move.b (a1),d2 lea Colnb(PC),a0 cmp.b #-1,0(a0,d2.w) beq ConfNAs bra Dismatch Quit: rts ;===================SubRoutines=================== DisplayAll: jsr flib[clr_scr] DrawBox #17,#8,#60,#46 DrawBox #17,#50,#60,#118 Setfont #1 Writestr #21,#36,#1,infodeck Writestr #21,#52,#1,infoas Setfont #0 Writestr #1,#123,#1,about Writestr #70,#123,#1,about2 Writestr #180,#123,#1,counter Setfont #0 lea CurPos(PC),a0 move.b #0,(a0) move.b #0,1(a0) Display: bsr DisplayCard lea CurPos(PC),a0 lea Colnb(PC),a1 clr.w d0 move.b (a0),d0 move.b 0(a1,d0.w),d0 cmp.b 1(a0),d0 ble Shift add.b #1,1(a0) Shifted: lea CurPos(PC),a0 cmp.b #13,(a0) bne Display clr.b (a0) clr.b 1(a0) rts Shift: add.b #1,(a0) move.b #0,1(a0) cmp.b #7,(a0) blt Shifted lea CurPos(PC),a0 lea Colnb(PC),a1 move.b (a0),d0 move.b 0(a1,d0.w),d0 move.b d0,1(a0) bra Shifted SubBegin: move.w d0,d1 add.w #12,d1 \ClrBegin: move.l a1,a2 add.w d1,a2 clr.b (a2) dbra d1,\ClrBegin move.b d0,(a3)+ \LoopBegin: move.b -(a0),(a1)+ clr.b (a0) dbra d0,\LoopBegin sub.b #52,-1(a1) rts ;CurPos: ou est la carte NCurPos: destination MoveCard: clr.w d0 lea CurPos(PC),a0 lea NCurPos(PC),a1 add.b #1,1(a0) move.b (a0),(a1) move.b 1(a0),1(a1) lea Selected(PC),a0 lea Colnb(PC),a1 move.b (a0),d0 move.b 0(a1,d0.w),d0 sub.b 1(a0),d0 move.b d0,Mm lea Mm(PC),a0 move.b d0,1(a0) \MoveCard: lea Selected(PC),a0 lea Colnb(PC),a2 lea NCurPos(PC),a1 move.b (a0),d0 sub.b #1,0(a2,d0.w) move.b (a1),d0 add.b #1,0(a2,d0.w) lea CurPos(PC),a1 lea Selected(PC),a0 move.b (a0),(a1) move.b 1(a0),1(a1) bsr EraseCard bsr GetAddress move.b (a0),d4 move.b #0,(a0) lea NCurPos(PC),a0 lea CurPos(PC),a1 move.b (a0),(a1) move.b 1(a0),1(a1) bsr GetAddress move.b d4,(a0) bsr DisplayCard lea Selected(PC),a0 lea Colnb(PC),a2 lea NCurPos(PC),a1 add.b #1,1(a0) add.b #1,1(a1) sub.b #1,Mm cmp.b #-1,Mm bne \MoveCard lea Selected(PC),a0 lea CurPos(PC),a1 lea NCurPos(PC),a2 lea Mm(PC),a3 move.b 1(a3),d0 sub.b d0,1(a0) sub.b d0,1(a2) move.b (a0),(a1) move.b 1(a0),1(a1) sub.b #2,1(a1) bsr DisplayCard lea CurPos(PC),a0 lea NCurPos(PC),a1 move.b (a1),(a0) move.b 1(a1),1(a0) sub.b #1,1(a0) rts ;info : CurPos return : a0=address of the card EraseCard: clr.w d0 clr.w d1 clr.w d2 clr.w d3 lea CurPos(PC),a0 move.b (a0),d2 mulu #2,d2 lea Curxy(PC),a1 move.b 0(a1,d2.w),d0 move.b 1(a1,d2.w),d1 cmp.b #14,d2 bge Erasenorow move.b 1(a0),d3 mulu #8,d3 add.b d3,d1 Erasenorow: move.w d0,d2 move.w d1,d3 add.w #24,d3 add.w #18,d2 EraseBox d0,d1,d2,d3 rts GetAddress: movem d0-d1/a1,-(a7) clr.w d0 clr.l d1 lea CurPos(PC),a1 lea CurData(PC),a0 move.b (a1),d0 move.b 1(a1),d1 mulu #4,d0 move.l 0(a0,d0.w),a0 add.l d1,a0 movem (a7)+,d0-d1/a1 rts ; CurPos(decknb,height in the deck) DisplayCard: clr.w d1 clr.w d5 clr.w d6 clr.w d7 lea CurPos(PC),a0 lea Curxy(PC),a2 lea Colnb(PC),a1 move.b (a0),d1 cmp.b #-1,0(a1,d1.w) beq DisEmpty mulu #2,d1 move.b 0(a2,d1.w),d7 move.b 1(a2,d1.w),d6 cmp.b #7,(a0) bge Norow move.b 1(a0),d1 mulu #8,d1 add.w d1,d6 Norow: bsr GetAddress move.b (a0),d5 bsr Recognize rts DisEmpty: mulu #2,d1 move.b 0(a2,d1.w),d7 move.b 1(a2,d1.w),d6 bsr PutEmpty rts ;do.b= nb d1.b= colour GetValue: bsr GetAddress move.b (a0),d0 moveq #0,d1 cmp.b #13,d0 ble Quit GetColour: sub.b #13,d0 addq #1,d1 cmp.b #13,d0 bgt GetColour rts ;d5=card value, d6=y position , d7=x position,a5 destroyed Recognize: clr.l d2 cmp.b #52,d5 bgt Hidden move.w d6,d4 move.w d7,d2 add.w #17,d2 add.w #24,d4 move.w d4,-(a7) move.w d2,-(a7) move.w d6,-(a7) move.w d7,-(a7) jsr flib[erase_rect] jsr flib[frame_rect] lea 8(a7),a7 lea Card(PC),a1 move.b #0,1(a1) moveq #0,d4 clr.l d0 move.b d5,d0 cmp.b #13,d0 ble Number Findcol: sub.b #13,d0 addq #1,d4 cmp.b #13,d0 bgt Findcol Number: move.w d6,d1 move.w d7,d2 add.w #11,d2 addq #2,d1 cmp.b #1,d0 beq As cmp.b #11,d0 beq Jack cmp.b #12,d0 beq Queen cmp.b #13,d0 beq King cmp.b #10,d0 beq Ten add.b #48,d0 move.b d0,(a1) Disnumb: Writestr d2,d1,#1,Card lea CoGraph(PC),a1 mulu #5,d4 add.l d4,a1 lea $4440,a0 move.w d6,d1 move.w d7,d0 addq #2,d0 addq #2,d1 move.w d1,-(a7) move.w d0,-(a7) jsr flib[find_pixel] lea 4(a7),a7 move.w #7,d2 sub d0,d2 move.l #8,d0 sub d2,d0 move.l #4,d4 \Putloop: clr.l d1 move.b (a1),d1 lsr.b d2,d1 eor.b d1,(a0)+ move.b (a1)+,d1 lsl.b d0,d1 eor.b d1,(a0) lea 29(a0),a0 dbra d4,\Putloop rts As: move.b #65,(a1) bra Disnumb Jack: move.b #74,(a1) bra Disnumb Queen: move.b #81,(a1) bra Disnumb King: move.b #75,(a1) bra Disnumb Ten: move.b #49,(a1) move.b #48,1(a1) subq #2,d2 bra Disnumb Hidden: lea Back(PC),a1 lea $4440,a0 move.w d6,d4 move.w d7,d2 add.w #17,d2 add.w #24,d4 move.w d4,-(a7) move.w d2,-(a7) move.w d6,-(a7) move.w d7,-(a7) jsr flib[erase_rect] jsr flib[frame_rect] lea 8(a7),a7 move.w d6,d1 move.w d7,d0 addq #1,d0 addq #1,d1 move.w d1,-(a7) move.w d0,-(a7) jsr flib[find_pixel] lea 4(a7),a7 move.l #7,d2 sub.l d0,d2 move.l #8,d0 sub.l d2,d0 move.w #22,d4 \PutBack: clr.l d1 move.b (a1),d1 lsr.b d2,d1 eor.b d1,(a0)+ move.b (a1)+,d1 lsl.b d0,d1 eor.b d1,(a0) move.b (a1),d1 lsr.b d2,d1 eor.b d1,(a0)+ move.b (a1)+,d1 lsl.b d0,d1 eor.b d1,(a0) lea 28(a0),a0 dbra d4,\PutBack rts PutEmpty: lea Empty(PC),a1 lea $4440,a0 move.w d6,d4 move.w d7,d2 add.w #17,d2 add.w #24,d4 move.w d4,-(a7) move.w d2,-(a7) move.w d6,-(a7) move.w d7,-(a7) jsr flib[erase_rect] jsr flib[frame_rect] lea 8(a7),a7 move.w d6,d1 move.w d7,d0 addq #1,d0 addq #1,d1 move.w d1,-(a7) move.w d0,-(a7) jsr flib[find_pixel] lea 4(a7),a7 move.l #7,d2 sub.l d0,d2 move.l #8,d0 sub.l d2,d0 move.l #22,d3 \PutEmpty: clr.l d1 move.b (a1),d1 lsr.b d2,d1 eor.b d1,(a0)+ move.b (a1)+,d1 lsl.b d0,d1 eor.b d1,(a0) move.b (a1),d1 lsr.b d2,d1 eor.b d1,(a0)+ move.b (a1)+,d1 lsl.b d0,d1 eor.b d1,(a0) lea 28(a0),a0 dbra d3,\PutEmpty rts ;Display Cursor CurPos( col,row) DisCursor: movem d0-d4/a0-a2,-(a7) clr.l d1 clr.l d0 clr.l d2 clr.l d3 clr.l d4 lea CurPos(PC),a0 move.b (a0),d2 mulu #2,d2 lea Curxy(PC),a1 move.b 0(a1,d2.w),d0 move.b 1(a1,d2.w),d1 cmp.b #-1,1(a0) beq DisCursor2 cmp.b #14,d2 bge DisCursor2 move.b 1(a0),d4 mulu #8,d4 add.b d4,d1 DisCursor2: move.l #22,d3 lea CurPos(PC),a0 move.b (a0),d4 move.b 1(a0),d2 lea Colnb(PC),a1 cmp.b 0(a1,d4.w),d2 beq BigCur move.l #6,d3 BigCur: lea $4440,a0 addq #1,d1 addq #1,d0 move.w d1,-(a7) move.w d0,-(a7) jsr flib[find_pixel] lea 4(a7),a7 move.w #7,d2 sub d0,d2 move.l #8,d0 sub d2,d0 \PutCursor: clr.l d1 clr.l d4 move.b #$FF,d1 lsr.b d2,d1 move.b #$FF,d4 lsl.b d0,d4 eor.b d1,(a0)+ eor.b d4,(a0) eor.b d1,(a0)+ eor.b d4,(a0) lea 28(a0),a0 dbra d3,\PutCursor movem (a7)+,d0-d4/a0-a2 rts ; -------------------------------- ; ; Converts a number to a string ; ; IN: d0 - The number ; d1 - Number of digits ; a0 - Pointer to string ; OUT: *a0 - The string (null-terminated) ; ; -------------------------------- ConvStr: lea Timestring(PC),a0 move.l #4,d1 clr.l d0 move.w Time,d0 adda.l d1,a0 clr.b (a0) subq.b #1,d1 RepConv: divu #10,d0 move.l d0,d2 lsr.l #8,d2 lsr.l #8,d2 add.b #48,d2 move.b d2,-(a0) and.l #$FFFF,d0 dbra d1,RepConv rts ;===================================================== prog_name: dc.b "Solitare v1.0 © Marc Teyssier",0 Com1 dc.b "New High Score",0 Com2 dc.b "Enter your name :",0 counter dc.b "Time :",0 about dc.b "* SOLITARE v1.0 *",0 about2 dc.b "© 1997 by Marc Teyssier",0 about3 dc.b "Send comments and bugs to:",0 about4 dc.b "teyssier@multicable.fr",0 help dc.b "HELP screen",0 help2 dc.b "To move the cursor, use arrows",0 help3 dc.b "To select a card, press [ENTER]",0 help4 dc.b "[T] is the teacher key.",0 NewGame dc.b "[F1] - New Game",0 About dc.b "[F2] - About",0 HScore dc.b "[F3] - High Score",0 Help dc.b "[F4] - Help",0 End dc.b "[ESC]- Quit",0 infodeck dc.b 23,"DECK",23,0 infoas dc.b 24," AS ",24,0 Congra dc.b 7," CONGRATULATIONS ",7,0 Won dc.b "You have won !!!",0 Card ds.b 3 deck dc.b 1,2,3,4,5,6,7,8,9,10,11,12,13 dc.b 14,15,16,17,18,19,20,21,22,23,24,25,26 dc.b 27,28,29,30,31,32,33,34,35,36,37,38,39 dc.b 40,41,42,43,44,45,46,47,48,49,50,51,52 Selected ds.b 4 Mm ds.b 2 Time ds.w 2 Timestring ds.b 5 Hscore dc.b "Name : Time :",0 Hscore1 dc.b "K",228,"hrm",0,0,0,0 Hscore2 dc.b "Marc",0,0,0,0,0 Hscore3 dc.b "Killer",0,0,0 Score1 dc.w 1000 Score2 dc.w 2000 Score3 dc.w 3000 textname ds.b 9 col1 ds.b 12 col2 ds.b 13 col3 ds.b 14 col4 ds.b 15 col5 ds.b 16 col6 ds.b 17 col7 ds.b 18 as1 ds.b 13 as2 ds.b 13 as3 ds.b 13 as4 ds.b 13 game ds.b 52 Colnb ds.b 13 Backyard ds.b 29 CurPos ds.b 2 NCurPos ds.b 2 CurData ds.l 13 Teacher dc.b 0 Curxy dc.b 80,1,100,1,120,1 dc.b 140,1,160,1,180,1 dc.b 200,1,20,10,40,10 dc.b 20,60,40,60,20,90,40,90 Back dc.w %1000100010001000 dc.w %0101010101010101 dc.w %0010001000100010 dc.w %0101010101010101 dc.w %1000100010001000 dc.w %0101010101010101 dc.w %0010001000100010 dc.w %0101010101010101 dc.w %1000100010001000 dc.w %0101010101010101 dc.w %0010001000100010 dc.w %0101010101010101 dc.w %1000100010001000 dc.w %0101010101010101 dc.w %0010001000100010 dc.w %0101010101010101 dc.w %1000100010001000 dc.w %0101010101010101 dc.w %0010001000100010 dc.w %0101010101010101 dc.w %1000100010001000 dc.w %0101010101010101 dc.w %0010001000100010 Empty dc.w %0000000000000000 dc.w %0000000000000000 dc.w %0000000000000000 dc.w %0000000000000000 dc.w %0000000000000000 dc.w %0000000110000000 dc.w %0000001111000000 dc.w %0000011001100000 dc.w %0000110000110000 dc.w %0001100000011000 dc.w %0011000000001100 dc.w %0110000000000110 dc.w %0011000000001100 dc.w %0001100000011000 dc.w %0000110000110000 dc.w %0000011001100000 dc.w %0000001111000000 dc.w %0000000110000000 dc.w %0000000000000000 dc.w %0000000000000000 dc.w %0000000000000000 dc.w %0000000000000000 dc.w %0000000000000000 CoGraph dc.b %01101100 dc.b %10010010 dc.b %01000100 dc.b %00101000 dc.b %00010000 dc.b %00010000 dc.b %00101000 dc.b %01000100 dc.b %00101000 dc.b %00010000 dc.b %00010000 dc.b %00111000 dc.b %01010100 dc.b %11111110 dc.b %01010100 dc.b %00010000 dc.b %00111000 dc.b %01111100 dc.b %01111100 dc.b %00010000 ;==================================================== reloc_open add_library flib add_library hexlib add_library romlib reloc_close end