Re: A86: Re: shell.asm


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

Re: A86: Re: shell.asm





That jp nz,_exec_basic should be call nz,_exec_basic


---Ben Mickle <bmickle@yahoo.com> wrote:
>
> 61 bytes :)
> 
> 
> 
> ---David Phillips <david@acz.org> wrote:
> >
> > Hehe, Dux did it.  64 bytes...anything else?
> > 
> > >I'm new at this shell stuff.  Can it be smaller than 68 bytes? 
It runs
> > both
> > >basic and asm programs.  When running programs and when exiting,
the cursor
> > >starts on the second line (like they ran the program from the
home screen).
> > 
> 
> 
>
> ; shell (for lack of a better name)
> ; by David Phillips <david@acz.org>
> ; http://www.acz.org/
> 
> #include "ti86asm.inc"
> 
> .org _asm_exec_ram
> 
> Top:
>  ld hl,StartingName
>  rst 20h
> 
> Down:
>  sub a
>  call _FindAlphaUp
>  
> DisplayProgram:
>  call _clrLCD
>  call _homeup
>  ld hl,_OP1+2
>  call _puts
>  call _newline
> 
> MainLoop:
>  call _getkey
>  sub kUp
>  jr z,Up
>  dec a		;kDown
>  jr z,Down
>  sub kExit-kDown
>  ret z
>  inc a
>  jr nz,MainLoop
> 
> RunProgram:
>  rst 10h
>  call _check_asm
>  push af
>  call z,_exec_assembly
>  pop af
>  jp nz,_exec_basic
>  jr Top
> 
> Up:				;a is already zero
>  call _FindAlphaDn
>  jr DisplayProgram
>  
> StartingName:
>  .db $12,1,0
> 
> .end
> 

_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com