Public Group

Once again, Mode 13h

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

Recommended Posts

I'm learning asm for a project required of me for a class. I'm using the 16bit version of TASM. From this tutorial and this one, I'm attempting to enter and use mode 13h in XP (emulated?) I'm entering a black fullscreen with:
mov ax,13h ; set mode 13h
int 10h    ; call BIOS service
However, when I use this:
.data
Y         dw 130
X         dw 220
Color     db 01101010b
.code
.... ; test for 13h availability etc

;Prepare for writing to the video buffer
mov  di, 0a000h     ;Put the video segment into DI
mov  es, di         ; so it can easily be put into ES
xor  di, di         ;Start writing at coordinates (0,0)

;Plot a pixel in video mode 13h, where
;PixelAddress = (320 * Y) + X
mov  ax, 320        ; Prepare for the multiplication
mul  [Y]            ; Assuming that Y is defined in the data segment
;   earlier in the program
mov  di, ax         ; Put in into the pointer to the offset of ES
add  di, [X]        ; Assuming that X is defined in the data segment
;   earlier in the program
mov  al, [Color]    ; Assuming that Color is defined in the data
;   segment earlier in the program
stosb               ; Write it to the screen!

...


It doesn't seem to actually be plotting a pixel. Am I actually entering 13h when I get the black full screen? Is this possible in XP?

Share on other sites
Actually, that is of great help. Thanks a lot. That's pretty nifty.

And my pixel plotting is evidently working (in dos box).

Is there a way to achieve the same thing in XP?

Share on other sites
Have you tried it in compatibilty modes? Failing that, try running it through VDMSound - that's a sound-for-DOS program, but oddly enough it seems to have helped certain apps with graphics too.

Share on other sites
I'm not too familiar with running things in compatibility mode, but I've set it to win95 and win98 to no luck. Should I just play with the settings (there don't seem to be many)?

Share on other sites
Quote:
 Original post by kordovaI'm not too familiar with running things in compatibility mode,
Right click your exe. -> properties -> compatibility.

Share on other sites
I doubt it'll get you too far, unfortunately.
DOS + XP isn't great, sadly.

Share on other sites
Quote:
 Original post by benryvesI doubt it'll get you too far, unfortunately.DOS + XP isn't great, sadly.

Yeah, I'm getting that picture.

I'm going to see if I can get clearance to have it run on an emulator.

I'd be surprised if there was no way to pull this off though...

Share on other sites
Does it need to be mode13?
I've done a lot of QB development in WinXP, and all the graphics modes that uses work fine...

Share on other sites
mode 13h actually only is a operand for the int operation.
Int stands for interrupt and essential you can say the computer uses int to send signals that will trigger events for the processor and it later sending it to dos. I believe there are some other modes even though it was long time ago I last used assemble for x86. But I say google it. (and correct is that you by chaning the 13h to something else will get other result perhaps not even dos modes.

• 21
• 15
• 9
• 17
• 13