just asking for a little help in displaying the output of this i dont get it got some help. am almost done with this.
"_main PROC
; generate handles for I/O
; whandle = GetStdHandle(STD_OUTPUT_HANDLE);
push STD_OUTPUT_HANDLE
call _GetStdHandle@4
mov whandle, eax
; rhandle = GetStdHandle(STD_INPUT_HANDLE);
push STD_INPUT_HANDLE
call _GetStdHandle@4
mov rhandle, eax
; write the header
writeConsoleString whandle, obuf0, SIZEOF obuf0, bout
; loop until user quits, collecting info for queries
; process the query by searching the selected array and displaying the
; query results
L0: writeConsoleNL whandle, bout
; write the Domestic/Import prompt
writeConsoleString whandle, obuf1, SIZEOF obuf1, bout
; read char in
readConsoleString rhandle, ibuf1, SIZEOF ibuf1, bin
; did the user request to quit? Or save the users dbase choice
MOV al, ibuf1[0] ; get the first char
OR al, 020h ; force lower case
CMP al, 'r' ; R
JNE L1 ; no
MOV ebx, OFFSET FamCars ; load pointer to the first record
JMP L2
L1: CMP al, 't' ; save the import array data
JNE L3 ; anything else is quit
MOV ebx, OFFSET FamCars ; load pointer to the first record
ADD ebx, SIZEOF Auto ; and index to the second
L2: PUSH ebx ; pointer to struct to be displayed
CALL displayCarInfo
ADD esp, (1 * 4)
JMP L0 ; and loop
L3: push 0
call _ExitProcess@4 ; normal termination with error code 0 == no error
_main ENDP
END _main
basically everything is working fine it gets sorts it theres other macros and such. but im having trouble outputing the structure
here is that proc
displayCarInfo PROC
doPrologue 0
POP ebx ;pointer in
IMUL OFFSET Auto
writeConsoleString whandle, OFFSET FamCars, SIZEOF Auto, bout
doEpilogue
RET
displayCarInfo ENDP
i just dont know how display it with the ebx as a pointer.