I have to pass a char as a parameter using the stack, but the stack doesn't allow anything smaller than 16bits. So I put a char on a 16bit register, push it into the stack. But how do i get the char from my function in order to work with it? I know my register sizes are incorrdect in the code I posted b/c Im not sure how to do this. can anybody help me?
program program13;
#include( "stdlib.hhf" );
static
myChar: byte;
number:int32;
counter:int16;
iAddress:int32;
procedure myFunction(aChar:byte;counterx:int16);@nodisplay;@noframe;
begin myFunction;
pop(iAddress);
pop(counterx);
pop(aChar);
push(iAddress);
ret();
end myFunction;
begin program13;
stdout.put("Gimme the starting letter: ");
stdin.get(myChar);
//mov(myChar,dx);
stdout.put("Gimme the desired height: ");
//stdin.getd();
push(dx);
push(eax);
call myFunction;
end program13;