1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

Z80 MONITOR

Discussion in 'Electronic Projects Design/Ideas/Reviews' started by Andrei22, May 3, 2015.

  1. absf

    absf Active Member

    Joined:
    Jun 18, 2012
    Messages:
    206
    Likes:
    27
    Location:
    Malaysia
    OK, so the function "RST $10" displays the character in A to the 7-segment display and auto-adjust the display pointer. I assume.

    Then looking at this code:

    Code (text):
       ORG 1800H
       LD A,1 ;
       LD BC,STRING ; bc points to the string data in memory
    LOOP: ;
       LD A,(BC) ; Incarca A cu bitul din locatia BC
       CP 0 ; Compara A cu 0(end of STRING data)
       JR Z,EXIT ; Daca este egal cu 0 atunci sare la EXIT
       RST $10 ; Afiseaza A pe ecran
       INC BC ; Incrementeaza BC cu 1 pentru a sari la urmatorul bit
       JR LOOP ; Sare la LOOP sa faca din nou
    EXIT:
       RET ; Ne intoarce la basic
    STRING: ;
       DEFB "Welcome to UP!"
       DEFB 13,0 ; 13 este o noua linie si 0 inseamna sfarsit de data
     
    There are 16 characters (including EOT "0") in the STRING but the display LED can only hold 6 characters at a time. So the TS would need another variable called "pointer" or something to adjust the value of (BC) so it would display like

    Welcom
    elcome
    lcome
    come t
    ome to ........ etc

    Or make use of the index register IX or IY (need to read more on the use of these 2 registers tonight)

    Allen
     

Share This Page