Re: LF: Still: fargo programming


[Prev][Next][Index][Thread]

Re: LF: Still: fargo programming




Try this:

> >
> >     @Program          prog_code,prog_name
> >
> >
> > prog_code:
> >
> >     jsr flib[clr_scr]
> >
> > main:
> >     pea      ess        ; Loads "ess" adress in the stack
> >     bsr      affich     ; Pushes 4 *MORE* bytes on stack too!
        addq     #4,a7      ; Pop stuff back off stack
> >     rts
> >
> > affich:
> >     move.l   4(a7),A1   ; gets back the param in A1 (the return addr is
			    ;   on top, then the stuff you pushed.
> >     ;  DON'T MESS WITH STACK, the return addr is on top!!
> >     move.w   #4,-(A7)   ;
> >     move.l	 a1,-(a7)   ;   push actual data in A1 : the pointer to text
> >     move.w   #10,-(A7)  ;
> >     move.w   #10,-(A7)  ;
> >     jsr      romlib[puttext]
> >     lea      10(A7),A7
> >     rts
> >
> >
> > ess: dc.b "coucou",0,0  ; **** MUST HAVE ANOTHER ZERO HERE - strings must
                            ;   always be an even number of bytes (including
                            ;   zero termination).
> >
> > prog_name:
> >   dc.b "essai",0        ; This string OK - already even number of bytes..
> >
> >          reloc_open
> >          add_library romlib
> >          add_library flib
> >          reloc_close
> >          end


--Bryan
bcturner@eos.ncsu.edu


References: