Search code examples
assemblycalculatortexas-instrumentsz80

How to display the value of the a register in ti assembly for ti 83+/ti 84/ti 84+


All right, I shall cut down to the chase. I am looking for a way (bcall() or some other method) to display the value that is currently held in the a register using the assembly for the ti 83 plus graphing calculator.

I do not care how complex the method as long as I am able to do it. thank you.


Solution

  • Thanks to Tommylee2k, here is a nice function:

    _DispHL: Displays the contents of the HL register right-justified in a field of five characters. For example, if HL = 125, output will be '1' '2' '5'.

    You don't need to reinvent the wheel.

    LD H,0
    LD L,A
    B_CALL(_DispHL)
    

    Warning: this subroutine destroys AF, DE and HL. So PUSH them before if you need them furthermore.