As a part of the library that I am writing, there is a PutString procedure that writes the string directly to the video RAM with the given attribute. The problem is that i was using the 0xB800 segment for the text mode 80*25 and it was working yesterday but not right now!!!. Does anybody have any idea why? Is it a variable segment address or what?
Posted on 2006-10-01 22:41:39 by XCHG
b800 always worked for me, and i believe your bug is elsewhere.

but yes, it is variable, you have to query BIOS (if you used it to set mode) where is video memory located
Posted on 2006-10-02 00:13:15 by vid
Variable?!?!?!? I don't really think so... Videomode correct? Try B000 instead of B800. But I don't suppose you're using and old Hercules gfx Card :D
Posted on 2006-10-02 04:16:25 by Firefall
What about a higher offset?
I notice that some of the things I have worked on use an offset over 04000h in the video segment.

(not figured out why yet tho.)
Posted on 2006-10-02 06:46:03 by eek
What makes me tick is that my procedure was working yesterday but not today and there is nothing that i have changed regarding the video card or anything. I have already checked 0xB000 and 0xB800 but none of them worked. Ironically, when i use the function number 0x00 in the trap in the IVT indexed 0x10 with the AL register set to 03 to set-up the 80*25 text mode, the procedure would work but i suppose when you run the CMD command in XP it should by default be in that mode right?
Posted on 2006-10-02 08:57:28 by XCHG
Maybe there were residual registers or memory set yesterday from your various tweaking/compiling that won't work today because they haven't been set to the same values again by todays code.

Happens to me sometimes when I'm messing about and tweaking with stuff in the middle of a routine.

Got to admit that(say) es-B800 and di-722 has never been a problem, unless the screen is constantly refreshing of course, which would erase it.

Posted on 2006-10-02 10:17:59 by eek
No, the cmd-thingie is not!!! It starts in 80*50 Mode (which is actually not Standard VGA, I think...), and NOT in Mode 03h, which is 80*25 as you said.
Posted on 2006-10-03 06:18:17 by Firefall
I used this trick where I first moved something to the first WORD in both the 0xB800 and also 0xB000 segment address and then moved the cursor to the upper left corner of the screen. Then I read the WORD and determined if it was equal to the original data or not. I could then know which one of these segments where the default but now neither of them works even though I have explicitly set the 80x25 mode in the properties dialog of the console window but its not working. It?s really bugging me.
Posted on 2006-10-04 00:20:27 by XCHG
Post failing code.
Posted on 2006-10-04 08:40:44 by f0dder
Here is my code:

  MOV     AX , 1202h
  MOV    BL , 30h
  DW      10CDh
This would simply update the video mode but would not clear the content of the screen. Either way, it is not what i used to do before, because whenever i opened the console window, without changing or modifying anything, the first code used to work, but now it is not.
Posted on 2006-10-04 15:05:28 by XCHG
Have you tried any workarounds in case it's the segment override ?
Just to see if anything prints.

MOV    WORD PTR ES:[01E0h] , AX

could be:

mov di,0x01E0h

Which should be pretty indestructible for at least printing "A"
Posted on 2006-10-04 21:32:37 by eek
Try maximizing the console window.  Believe it or not this makes a difference.
Posted on 2006-10-05 16:09:20 by PBrennick
Hmm... perhaps you need to trigger something before full emulation kicks in. Yeah, seems like it - just running your code doesn't produce any output, but after I've stepped through it in debug, it gives output every time.

You probably need to call some BIOS interrupt before full vdm stuff is enabled and you can write directly to screen.
Posted on 2006-10-05 17:04:08 by f0dder
Well I figured i was better off using 98 lol. XP was really giving me headache especially when dealing with the display segments. Thank you guys for the information and replies. I Appreciate it.
Posted on 2006-10-08 08:03:20 by XCHG
The following code worked OK for me, except the "A" doesn't flash when windowed.

  mov ax,0083h    ;set bit 7 of AL to not clear screen
  int 10h
  mov ax,0b800h
  mov es,ax
  mov word ptr es:[1e0h],8a41h

Posted on 2006-10-09 05:39:24 by sinsi
Yeah works for me too that way but it is *supposed* to be blinking. There are certain times that it works and some that it doesn't. I really don't get it. I switched to 98 and it is working fine.
Posted on 2006-10-09 07:03:04 by XCHG
Oops, just remembered your earlier post...shame on me.

So, the problem is getting it to blink in a window?
I tried to set blink through INT 10h and it still doesn't bloody blink in a window.
Posted on 2006-10-09 07:43:59 by sinsi