asm

Started by
7 comments, last by PiCkLeD 17 years, 12 months ago
Can anyone point me to a good assembly tutorial (x86)? I want to learn it just for the hell of it. asm always kinda fascinated me. btw...and this is off my own topic, but is there any way to make a clear screen function in C++ without a system call, conio, windows, or printing a bunch of newlines?
______________________________Stranger things have happened...The Following Sentence is True. The Above Sentence is False.
Advertisement
Quote:Original post by Photonman
btw...and this is off my own topic, but is there any way to make a clear screen function in C++ without a system call, conio, windows, or printing a bunch of newlines?

No idea about the asm tutorials, sorry. But no, there's no portable way to clear the screen. The reason being that stdout doesn't have to be a screen. You could be outputting to a printer or some other device, and clearing the screen wouldn't make sense. Your best bet would be either using system("cls"); or a Win32 command (If you're using Windows).
I don't know of any tutorials, but you might want to check out Intels IA-32 manuals.
Maybe you want to read from this page:
http://www.arl.wustl.edu/~lockwood/class/cs306/books/artofasm/toc.html

i hope this helps...

[source = "c++"]void clrscr(){	HANDLE hStdOut;	COORD coord;	ULONG area;	hStdOut = GetStdHandle(STD_OUTPUT_HANDLE);	coord = GetLargestConsoleWindowSize(hStdOut);	area = coord.X * coord.Y;	coord.X = 0;	coord.Y = 0;	FillConsoleOutputCharacter(hStdOut,' ',area,coord,&area);}
Thanks all, the links were helpful.

I didn't think there was a simple way to do it without windows or a system call, etc., although I thought maybe there would be some way to do it with \b and spaces, although the only problem there is knowing how many characters have been printed.
______________________________Stranger things have happened...The Following Sentence is True. The Above Sentence is False.
If you're in DOS, there should be a BIOS interrupt to clear the screen. Try poking through this and see what you can find.
here's a book that was released on the internet for assembly

http://webster.cs.ucr.edu/AoA/DOS/AoADosIndex.html
http://www.drpaulcarter.com/pcasm/

This is a great introduction for beginners.

This topic is closed to new replies.

Advertisement