From the course: Learning Assembly Language

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Console Input and output

Console Input and output - Python Tutorial

From the course: Learning Assembly Language

Start my 1-month free trial

Console Input and output

- [Lecturer] It's useful from time to time to be able to enter data into an assembler program and display information out of it. We've already displayed information but let's have a proper look at how we do it. The first thing we need to do is to get a handle to the standard output device. We do this by using a parameter of -11, arg -11 and invoking the get standard handle windows function. Invoke get standard handle. This returns the handle in EAX. We're going to use it immediately so we don't need to store it. Now we have a handle to the standard output device. We can use the windows right file function to write our data to the screen. We need to declare a D word variable which will be used to indicate how many bytes were written. We'll call that about DD Zero. We'll also set up a prompt message, "prompt DB, enter, character". We can now call the right file routine. We arg keyword to store the function arguments…

Contents