home *** CD-ROM | disk | FTP | other *** search
/ Team Palmtops 7 / Palmtops_numero07.iso / Ti / Magazine / Tests / DOORSOSD.ZIP / run.asm < prev    next >
Encoding:
Assembly Source File  |  1999-12-23  |  694 b   |  44 lines

  1. ; launch.asm by b.lesteven for Kernel 0.6  b.lesteven@wanadoo.fr
  2. ;
  3. ; Renamed to 'run' and ported to DoorsOS II by Xavier Vassor xvassor@mail.dotcom.fr
  4.  
  5.  
  6.     include "doorsos.h"
  7.     include "userlib.h"
  8.  
  9.     xdef _main
  10.     xdef _ti89
  11.     xdef _ti92plus
  12.  
  13. _main:
  14.  
  15.     move.l doorsos::top_estack,a0
  16.     subq.l #1,a0
  17.     clr.w -(a7)
  18.     move.l a0,-(a7)
  19.     jsr doorsos::SymFindPtr
  20.     addq.l #6,a7
  21.  
  22.     move.l a0,d0
  23.     beq notfound
  24.  
  25.     move.w 12(a0),d0    ;handle du prog dans d0
  26.     move.w d0,-(a7)
  27.     jsr userlib::exec
  28.     addq.l #2,a7
  29.     rts
  30.  
  31. notfound:
  32.     pea pastrouve(pc)
  33.     jsr doorsos::ST_helpMsg
  34.  
  35.     clr.l (a7)
  36.     clr.w -(a7)
  37.     jsr doorsos::GKeyIn
  38.     addq.L    #6,a7
  39.  
  40.     rts
  41.  
  42. pastrouve dc.b "Program not found",0
  43.  
  44.     end