@program prog_code,prog_name include macros.h ;******************************************************* ;***** My messy sourcecode for LinkPort Dump ***** ;***** by Kristian K. Nielsen ***** ;******************************************************* ;************===---> jkkn@ctav.com <---===************** ;********************** MACROS ************************* checkkey: tst.w ($75B0) beq NoKeypress move.w ($75B2),d1 clr.w ($75B0) cmp.w #$0108,d1 beq Keypressed move.b #2,d0 rts NoKeypress: move.b #0,d0 rts Keypressed: move.b #1,d0 rts Send_Byte: bsr checkkey cmp.b #1,d0 beq sendstop_a jsr romlib[tx_free] cmp.w #1,d0 bcs Send_Byte bsr checkkey cmp.b #1,d0 beq sendstop_a move.w #1,-(a7) pea (a4) jsr romlib[transmit] lea 6(a7),a7 move.b #1,d0 sendstop: rts sendstop_a: move.b #0,d0 rts Read_Byte: bsr checkkey cmp.b #0,d0 bne readstop_a move.w #1,-(a7) pea (a4) jsr romlib[receive] lea 6(a7),a7 cmp.b #1,d0 bne Read_Byte move.b #9,d0 readstop: rts readstop_a: bra readstop ;************** Start of Fargo program ************** moveup: move.w #824,d7 lea $4440,a0 lea $4440,a6 add.l #300,a0 sloop: move.l (a0)+,(a6)+ dbf d7,sloop move.w #74,d7 clear: clr.l (a6)+ dbf d7,clear clr.b x bra write prog_code: jsr flib[clr_scr] ; FLIB call to Screen Clear clr.b x loop: lea buffer(pc),a4 bsr Read_Byte cmp.b #9,d0 beq incoming cmp.b #1,d0 beq end move.b d1,buffer lea buffer(pc),a4 bsr Send_Byte bra loop ; Forget everything about keypresses incoming: cmp.b #30,x beq moveup write: clr.l d0 clr.l d2 move.b buffer,d0 move.l #14,d1 move.b x,d2 move.l #1,d4 jsr hexlib[put_hex] add.b #3,x bra loop end: rts ;*********************************************************** ;****** If you have any quiestion about this sourcecode **** ;****** fell free to ask me at jkkn@ctav.com. **** ;****** By changing this sourcecode please give credit **** ;*********************************************************** prog_name: dc.b "LinkPort Dump (by JKKN)",0 buffer dc.b 0 x dc.b 0 ;************** End of Fargo program **************** reloc_open add_library flib add_library romlib add_library hexlib reloc_close end