A89: Re: no shell/no libs


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

A89: Re: no shell/no libs




I did not test this, but based on what I know, it should work.

 include "tios.h"
 include "exec.inc"
 xdef _ti89
 xdef _ti92plus
 xdef _nostub

_main:
 move.w #4,-(a7)
 pea hello(pc)
 move.w #0,-(a7)
 move.w #0,-(a7)
 ROM_CALL romfunc::DrawStrXY
 lea 10(a7),a7
 bra keypress
exit:
 rts

keypress:
 move.b #%11111110,($600019)
 move.b #5,d0
 bsr \wait

 clr.l d0

 move.b ($60001b),d0
 btst.b #0,d0
 beq exit
 bra keypress

\wait
 nop
 dbra.w  d0,\wait
 rts

hello:
 dc.b "Hello, World",0

 rts

end

-Miles Raymond      EML: m_rayman@bigfoot.com
ICQ: 13217756       IRC: Killer2        AIM: KilIer2 (kilier2)
http://www.bigfoot.com/~m_rayman/

----- Original Message -----
From: <S43R80@aol.com>
To: <assembly-89@lists.ticalc.org>
Sent: Wednesday, July 07, 1999 10:01 PM
Subject: A89: no shell/no libs


> i'm interested in perhaps coding w/o the use of shells and libs...I am
asking
> what is involved in this, and how difficult it may be.  To give me an idea
at
> how different the coding may be w/o a shell, how would i convert this
simple
> hello world program to work w/o any shell/libs...
>
>     -Steven Reagan
>
> include "doorsos.h"
> include "graphlib.h"
> include "userlib.h"
> xdef _ti89
> xdef _ti92plus
> xdef    _main
>
> _main:
> jsr graphlib::clr_scr2
>
> move.w #4,-(a7)
> pea hello(pc)
> move.w #0,-(a7)
> move.w #0,-(a7)
> jsr doorsos::DrawStrXY
> lea 10(a7),a7
> jsr userlib::idle_loop
> rts
>
> hello:
> dc.b "Hello, World",0
>
>       rts
> end



References: