
load4:          acall gethex        ; get data byte
                movx @dptr,a        ; store in ext. ram
                mov  r2,a             ;store the data to r2
                clr  a            
                movc a,@a+dptr         ;readback from (code mapped) RAM
                clr  c 
                subb a,r2              ;compare with stored
                jz   load4OK
                mov  dptr,#errormsg                       ;error - print a message
                lcall outstr
                ljmp  error
errormsg:       cr,'Data readback mismatch',0
load4OK:
                inc dptr
