 ;the way its called
 
    ld  hl,(PROGRAM_ADDR)
    ld  de,mystring
    add hl,de
    CALL_(reverse)


 ;;;;void reverse(hl->string) ;;reverses string
 reverse:
    push  hl
    xor a
    ld  b,a
    dec hl
 revcount:
    inc b
    ;;;;cpi  ;;cp (hl) \ inc hl
    inc hl
    cp (hl)
    jr nz,revcount
    dec  hl
    push hl
    pop  ix ;;ix->last char of string
    pop  hl ;;restore hl
 ;; hl->beginning of string
 ;; ix->end of string
 ;; b=len of string
    srl  b  ;b =length of string / 2
 revloop:
    ld  d,(hl)
    ld  e,(ix+0)
    ld  (hl),e
    ld  (ix+0),d
    inc hl
    dec ix
    djnz revloop
    ret
 ;;end of reverse
 
 
; This function has not been tested but it should work.  Using recursion to 
; reverse a string is unnecessary and wasteful
