• Advertisement
Sign in to follow this  

asm

This topic is 4322 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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).

Share this post


Link to post
Share on other sites
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);
}

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
http://www.drpaulcarter.com/pcasm/

This is a great introduction for beginners.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement