(hide navigation)
  • Swedish content
Fund my projects
Patreon
Steady
Don't miss
Page thumbnail
The Symbolic Links Virtual Machine
Forum
Register
Log in
Latest comments
Syndication
RSS feed
Feedback

Getting numeric input

Back to the TI-83 page

This is done in about the same way as getting string input. Start by putting the prompt at 821ch:

        ld      de,821ch                ;put the prompt here
        ld      hl,prompt
        ld      bc,prompt_len           ;length of prompt, max = 16
        ldir

Then call PGMIO_EXEC, but with a different command in ASM_IND_CALL:

        ld      a,1                     ;code for NUMERIC input
        ld      (ASM_IND_CALL),a

        call    PGMIO_EXEC

The input is automatically parsed as an expression, and the result is placed in OP1.

        call    _formDisp               ;display it
        ret

prompt:         .db \"Inp:\",0
prompt_len      =   $-prompt"}

Discuss this page

There are no comments here yet.