How would you go about using a C style string in inline assembly?
I have been working on this for quite awhile now...but cant get it to work...here is my code, its not long:
It is supposed to input a string, then print it, wait for a keypress, and exit..Code:#include <iostream.h> #include <conio.h> #include <stdio.h> #include <stdlib.h> char string[20]; int main (void) { memset(string, 0, 20); asm { mov dx, seg string mov ds, dx lea dx, string mov ah, 0Ah int 21h } printf("%s", string); getch(); return 0; }
however, it is not inputting, just going straight to the getch()...anybody good with inline assembly around here that could help out?



LinkBack URL
About LinkBacks


