News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

ascii in messages

Started by babymika, August 26, 2005, 11:06:56 AM

Previous topic - Next topic

babymika

hi... we are tasked to do the turbo c interface using masm... my prof told us to use ascii for the borders... Just wana ask, how to use ascii in messages? he gave us one format for printing which is

            MOV DX, OFFSET MESSAGE
            MOV AH, 9
       INT 21H

my question in short is should i declare the ascii for it to be used? or can i just move the ascii value in dx? im really sorry for the noobish questions but it's really confusing since we only got one example which is "Hello World"  :'(

Tedd

MOV DX, OFFSET MESSAGE

means point to the (ascii) message to be displayed. For your 'Hello World' example, this points to the ascii string "Hello World", right?
So what would happen if you made it point to a different message, say one that had the characters for a border perhaps?

Just play with it, you'll understand a lot better by actually doing and finding out :wink
No snowflake in an avalanche feels responsible.

hutch--

I moved your post to the 16 bit forum so you had a better chance of getting an answer. If you have an interrupt list for dos int 21h functions, look at the function for output to a file or device as well, its somewhere about int 21h 39 or 40 hex.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

MichaelW

An on-line HTML version of Ralf Brown's Interrupt List is available here:

http://www.ctyme.com/rbrown.htm

For displaying ASCII from a 16-bit DOS app your choices are:

Use the DOS Interrupt 21h functions
Use the BIOS Interrupt 10h functions
Write directly to the display buffer
Use some combination of the above

eschew obfuscation

babymika

thanks for the replies... im getting a hang of it now!  :toothy :thumbu :cheekygreen: