Jump to content
  • Advertisement
Sign in to follow this  
F-Kop

dos & asm

This topic is 4423 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

I've learned that the character buffer is at b8000h, but is there an address somewhere that you can use to move the cursor? I know there's an interrupt, but an address would be better.

Share this post


Link to post
Share on other sites
Advertisement
well i haven't ;D
kidding, but i'm programming for 16 bit dos in asm to get practice with lower level programming. i will need it to develop for nes. (also old ;D)

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
NES doesnt use x86 instructions. I believe that CPU was a derivative of the 65c816 processor which is way over in motorola land.

Share this post


Link to post
Share on other sites

VIDEO - SET CURSOR POSITION
AH = 02h
BH = page number
0-3 in modes 2&3
0-7 in modes 0&1
0 in graphics modes
DH = row (00h is top)
DL = column (00h is left)
Return:Nothing


from Ralph Brown's Interrupt List (quite famous). http://www.ctyme.com/intr/rb-0087.htm
I can also recommend TechHelp. http://margo.student.utwente.nl/el/pc/help/techhelp.zip

Share this post


Link to post
Share on other sites
Writing directly to the graphics memory is indpendent of cursor positions and such. It is like a framebuffer similar to video devices.

If you want to draw text where the cursor is, you should use dos/bios interrupts instead of direct writing to the memory.

Are you sure you want to program games for the NES. You can write NES-like games for modern environments. I don't know how well documented is the NES platform, but it sure isn't like DOS asm programming.

I recommend learning at least some assembly programming, anyway. It might prove useful when trying to find a job or doing low-level stuff.

-Riku


Share this post


Link to post
Share on other sites
Yeah, RichardoX is right. If you are in say 80x25 mode, you have at b800:0 80*25 pairs of bytes, with one byte for the character and one byte for color and blinking (iirc). 0 is the top left, then every byte higher move you to the right, then to the next line on the right, etc. So you don't need a cursor indeed.

Share this post


Link to post
Share on other sites
Quote:
Original post by Anonymous Poster
NES doesnt use x86 instructions. I believe that CPU was a derivative of the 65c816 processor which is way over in motorola land.


it uses 6502

Quote:
Original post by roel
Yeah, RichardoX is right. If you are in say 80x25 mode, you have at b800:0 80*25 pairs of bytes, with one byte for the character and one byte for color and blinking (iirc). 0 is the top left, then every byte higher move you to the right, then to the next line on the right, etc. So you don't need a cursor indeed.


but i need the cursor to indicate where input will be echoed. i'll use an interrupt for it if i have to, but i prefer addressing memory directly.

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!