Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
12/24/99 11:38
Read: times


 
#1090 - RE: Text and Data in the code:
First decide what kind of strings you want to store, are they fixed lengths or not.

If they are fixed lengths then this kind of thing should work:

;let the strings all be 32 bytes long
;This example will hold eight strings

Strings_table:
DB 'This is string one '
DB 'This is string two '
DB 'This is string three '
DB 'This is string four '


START:
; Let the accumultator hold the string number 0..3

RL A ; multiply acc by 32
RL A
RL A
RL A
RL A
RL A

MOV DPH, high(string_table)
mov DPL,low(string_table)
MOV CTR,#31
loop: PUSH ACC
MOVC A,@A+DPTR
MOV char,A
CALL output_routine ; sand char to your routine
POP ACC
INC A
DJNZ ctr,loop
RET

List of 3 messages in thread
TopicAuthorDate
Text and Data in the code:            01/01/70 00:00      
RE: Text and Data in the code:            01/01/70 00:00      
RE: Text and Data in the code:            01/01/70 00:00      

Back to Subject List