Just wanted to test an idea with an array of pointers to data where you only had to return one value for its address and get the member count.
; ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
include \masm32\include64\masm64rt.inc
.data
@1 db "one",0
@2 db "two",0
@3 db "three",0
@4 db "four",0
@5 db "five",0
@6 db "six",0
@7 db "seven",0
@8 db "eight",0
align 8
dq 8 ; array count
parr1 dq @1,@2,@3,@4,@5,@6,@7,@8 ; pointer array
?1 db ".one",0
?2 db ".two",0
?3 db ".three",0
?4 db ".four",0
?5 db ".five",0
?6 db ".six",0
?7 db ".seven",0
?8 db ".eight",0
align 8
dq 8 ; array count
parr2 dq ?1,?2,?3,?4,?5,?6,?7,?8 ; pointer array
$1 db "-one",0
$2 db "-two",0
$3 db "-three",0
$4 db "-four",0
$5 db "-five",0
$6 db "-six",0
$7 db "-seven",0
$8 db "-eight",0
align 8
dq 8 ; array count
parr3 dq $1,$2,$3,$4,$5,$6,$7,$8 ; pointer array
.code
; ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
entry_point proc
USING r12,r13
SaveRegs
; -----------------------------------------
lea r12, parr1 ; load the array address
mov r13, [r12-8] ; get count from 8 bytes below parr1
@@:
conout QWORD PTR [r12],lf ; loop through count of members
add r12, 8
sub r13, 1
jnz @B
; -----------------------------------------
lea r12, parr2 ; load the array address
mov r13, [r12-8] ; get count from 8 bytes below parr2
@@:
conout QWORD PTR [r12],lf ; loop through count of members
add r12, 8
sub r13, 1
jnz @B
; -----------------------------------------
lea r12, parr3 ; load the array address
mov r13, [r12-8] ; get count from 8 bytes below parr3
@@:
conout QWORD PTR [r12],lf ; loop through count of members
add r12, 8
sub r13, 1
jnz @B
; -----------------------------------------
waitkey
RestoreRegs
.exit
entry_point endp
; ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
end
good :thumbsup: runs fast
array of pointers you see in some HLL searchtree practice