include "tios.h" include "flib.h" xdef _main xdef _comment ;***************************************; _main: jsr flib::clr_scr move.w #2,-(a7) jsr tios::FontSetSys lea 2(a7),a7 lea text(PC),a0 clr.l d1 clr.l d2 bsr WriteString clr.w tios::kb_vars+$1C lea str(PC),a1 moveq #0,d3 ;x moveq #10,d1 ;y clr.l d4 Input: jsr flib::idle_loop cmp.w #13,d0 beq InputDone cmp.w #257,d0 beq BackSpace cmp.w #32,d0 bcs Input cmp.w #256,d0 bcc Input cmp.w #8,d4 beq Input move.b d0,(a1)+ move.w d0,d2 move.w d3,d0 bsr WriteChar addq #8,d3 addq #1,d4 bra Input BackSpace: tst.w d4 beq Input clr.b -(a1) subq #8,d3 move.w d3,d0 moveq #32,d2 bsr WriteChar subq #1,d4 bra Input InputDone: clr.b (a1) pea str(PC) move.w #$0C,-(a7) jsr tios::FindSymEntry addq.l #6,a7 cmp.l #0,a0 beq fichier_inexistant lea 9(a0),a0 ;passe le nom (8 char+0) bchg.b #4,(a0) fichier_inexistant: rts ;***************************************; WriteChar: movem.l d0-d2/a0,-(a7) move.w #$00FF,-(a7) clr.w -(a7) move.w #$00FF,-(a7) move.w #4,-(a7) move.w d1,-(a7) move.w d0,-(a7) move.w d2,-(a7) jsr tios::DrawCharXY lea 14(a7),a7 movem.l (a7)+,d0-d2/a0 rts WriteString: movem.l d0-d2/a0,-(a7) move.w #4,-(a7) move.l a0,-(a7) move.w d2,-(a7) move.w d1,-(a7) jsr tios::DrawStrXY lea 10(a7),a7 movem.l (a7)+,d0-d2/a0 rts ;***************************************; text: dc.b "Variable name : ",0 _comment: dc.b "by TLP",0 str ds.b 8 strend end