You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
64 lines
729 B
64 lines
729 B
void print(string);
|
|
|
|
void print(string)
|
|
char* string;
|
|
{
|
|
#asm
|
|
push bp
|
|
mov bp,sp
|
|
mov si,4[bp]
|
|
call 0x0000:0x7C47
|
|
pop bp
|
|
#endasm
|
|
}
|
|
|
|
void print_stack(argument)
|
|
{
|
|
#asm
|
|
push bp
|
|
mov bp,sp
|
|
push ds
|
|
push ax
|
|
|
|
mov ax, ss
|
|
mov ds, ax
|
|
mov si,4[bp]
|
|
call 0x0000:0x7C47
|
|
|
|
pop ax
|
|
pop ds
|
|
pop bp
|
|
#endasm
|
|
}
|
|
|
|
dump_ax_return(input)
|
|
void* input;
|
|
{
|
|
return input;
|
|
}
|
|
|
|
void dump_ax(input)
|
|
void* input;
|
|
{
|
|
// Force the variable in ax
|
|
dump_ax_return(input)
|
|
#asm
|
|
push bp
|
|
mov bp,sp
|
|
call 0x000:0x7C2A
|
|
pop bp
|
|
#endasm
|
|
}
|
|
|
|
void print_newline()
|
|
{
|
|
#asm
|
|
printCRLF:
|
|
mov ah, #0xE
|
|
mov al, #13
|
|
int #0x10
|
|
mov al, #10
|
|
int #0x10
|
|
ret
|
|
#endasm
|
|
}
|
|
|