Real men code in HEX. :)
I have recently upgraded the BIOS in my PIII and one of the side benefits
was that it defeated the power shutdown built into my version of win95b.
What I needed was a small DOS COM file to reset the video mode back to text
mode 2 after win95b shutdown so after brushing off the dust in my release
version of MASM 6.11 and actually looking up the BIOS interrupts, this
following piece of bloatware was the result.
For those with less intestinal fortitude, here is the high level version, it
produces the same opcodes.
Regards,
hutch@movsd.com
I have recently upgraded the BIOS in my PIII and one of the side benefits
was that it defeated the power shutdown built into my version of win95b.
What I needed was a small DOS COM file to reset the video mode back to text
mode 2 after win95b shutdown so after brushing off the dust in my release
version of MASM 6.11 and actually looking up the BIOS interrupts, this
following piece of bloatware was the result.
opcode mnemonic
~~~~~~ ~~~~~~~~
B8 02 00 ; mov ax, 2
CD 10 ; int 10h
CD 20 ; int 20h
For those with less intestinal fortitude, here is the high level version, it
produces the same opcodes.
; ##########################################################################
com_seg segment byte public ; define the ONLY segment
assume cs:com_seg, ds:com_seg ; both code & data in same segment.
org 100h ; go to start adress in memory.
start:
; ##########################################################################
mov ax, 2 ; set video mode 2
int 10h ; call BIOS
int 20h ; call cleanup and exit
; ##########################################################################
assume nothing
com_seg ends ; define the end of the segment.
end start
; ##########################################################################
Regards,
hutch@movsd.com
Why text mode 2? I thoguht Text mode 3 is the standard?
Why "CD20" to terminate a .com when a C3 will do the trick?
Also, I seem to remember that the "mode" thingy from 9x can be
used to return to text mode. But that might be a false memory.
I left that dreadful world long time ago.
Why "CD20" to terminate a .com when a C3 will do the trick?
Also, I seem to remember that the "mode" thingy from 9x can be
used to return to text mode. But that might be a false memory.
I left that dreadful world long time ago.
Just delete LOGOS.SYS and LOGOW.SYS that are in C:\WINDOWS
Regards,
Mav
Regards,
Mav
Yeah, that's a pretty good thing to do. No more of those ugly screens,
and a little extra free diskspace. But even when doing that, at least
one of the 9x versions I tested left me with a black gfx mode screen
(might be due to my video driver). So a "switch back to textmode"
thingy was necessary back then :).
You might want to check out my "80x50", it changes to 80x50
textmode. It probably only works if you're already in textmode,
but it performs the switch without clearing the current text.
Also, it can be installed with a DEVICE= line in config.sys, so you
can get 80x50 even before himem.sys.
It unloads after performing the modeswitch, so it should take up
no extra memory.
and a little extra free diskspace. But even when doing that, at least
one of the 9x versions I tested left me with a black gfx mode screen
(might be due to my video driver). So a "switch back to textmode"
thingy was necessary back then :).
You might want to check out my "80x50", it changes to 80x50
textmode. It probably only works if you're already in textmode,
but it performs the switch without clearing the current text.
Also, it can be installed with a DEVICE= line in config.sys, so you
can get 80x50 even before himem.sys.
It unloads after performing the modeswitch, so it should take up
no extra memory.
It won't be a dodgy driver, those screens are displayed using standard (S?)VGA, or VESA resolutions.
Mirno
Mirno
Thx but I already wrote one myself much, much time ago because I had the same need. Dos at 80 * 50 is nice, I couldn't live without it. ;-)
Greets,
Maverick
Greets,
Maverick
Mirno, couldn't it be a driver that, on shutdown, can't figure out how
to set textmode? I dunno what the problem (if it can be labelled a
problem) is, but on some combination of windows, drivers, software,
and the phase of the moon ;)... I would still be in gfxmode even after
deleting those sys (well, bmp) files.
to set textmode? I dunno what the problem (if it can be labelled a
problem) is, but on some combination of windows, drivers, software,
and the phase of the moon ;)... I would still be in gfxmode even after
deleting those sys (well, bmp) files.
hmmmm,
A RET will work but I have always preferred to close down a file with the documented methods instead of potentially unreliable ones. It probably should have been mode 3 but its no problem to change it and it works fine at the moment.
80 x 50 should be no problem to do but I LIKE CGA resolution in DOS so mine will stay at the default.
Regards,
hutch@movsd.com
A RET will work but I have always preferred to close down a file with the documented methods instead of potentially unreliable ones. It probably should have been mode 3 but its no problem to change it and it works fine at the moment.
80 x 50 should be no problem to do but I LIKE CGA resolution in DOS so mine will stay at the default.
Regards,
hutch@movsd.com
Is there any version of DOS around where the word at ss:sp
doesn't point to the CD20 word in the PSP? I even thought this was
documented behaviour, iirc because of CP/M compatibility.
doesn't point to the CD20 word in the PSP? I even thought this was
documented behaviour, iirc because of CP/M compatibility.
I used to have fun with my logos.sys and logow.sys (win95/98)... just rename them to .bmp and edit them how you want :P
If you are running WinME all you will find is LOGOS.SYS in your C:\Windows directory which is the shutdown screen... the startup "splash" screen is located in the C:\IO.SYS file... if you make a 320*400 256 color bitmap (.bmp) file and rename it to logo.sys then move it to C:\ and WinME will use that file instead.
If you are running WinME all you will find is LOGOS.SYS in your C:\Windows directory which is the shutdown screen... the startup "splash" screen is located in the C:\IO.SYS file... if you make a 320*400 256 color bitmap (.bmp) file and rename it to logo.sys then move it to C:\ and WinME will use that file instead.
Yes, f0dder is right, terminating a COM prog with ret (0 at ) is documented and works with all dos versions.
hmmmm,
I wonder why M$ built int 20h into DOS if it was never needed, it is the recommended method of closing a COM file.
I am inclined to use a system defined method rather that a well known fudge.
Regards,
hutch@movsd.com
I wonder why M$ built int 20h into DOS if it was never needed, it is the recommended method of closing a COM file.
I am inclined to use a system defined method rather that a well known fudge.
Regards,
hutch@movsd.com
You've made me think of long ago DOS :)
In com file you have after loading address of int 20 in the stack.
So that ret and int 20 is the same.
int 4Ch (if I remember right) actually has just one more option despite of all garbige told about the difference in docs.
This option is - an ability to send exit code to the caller of process if there is any.
Is it offtopic BTW? :)
In com file you have after loading address of int 20 in the stack.
So that ret and int 20 is the same.
int 4Ch (if I remember right) actually has just one more option despite of all garbige told about the difference in docs.
This option is - an ability to send exit code to the caller of process if there is any.
Is it offtopic BTW? :)
i do not remember int 4c but i know there exists
ax,004Ch
int 21
ax,004Ch
int 21
on a com file a ret is okay, if your stack is okay. if it rets it lands on a int 20, so they are both okay too :)
and ehr, i prefer
b8 12 11 ;mov 10111rrr - imm16
cd 10 ;int 11001101 - imm8
too. ;).
btw, real men program in OCT ;P
and ehr, i prefer
b8 12 11 ;mov 10111rrr - imm16
cd 10 ;int 11001101 - imm8
too. ;).
btw, real men program in OCT ;P
btw, real men program in OCT ;P
Yeah but there is none of that generation left and Octal does not work real well on x86. :)
Regards,
hutch@movsd.com
Yeah but there is none of that generation left and Octal does not work real well on x86. :)
Regards,
hutch@movsd.com
OCT is a really good way to code since the Intel processors are built up around it. If you group the instructions in groups of 8 you'll see the logic. The same thing with the r/rm bytes.
Real men write batch files with edlin
Real men don't program.. they don't have to demonstrate anything to anybody, programming could be mistaken as a possible hole in their self-confidence.. which is unacceptable for a real man's ego. ;)
:grin:
:grin:
What a discussion...
real men code in hex... real men code in oct...
If YOU are really REAL MEN... you code only in binary :grin:
Zero
real men code in hex... real men code in oct...
If YOU are really REAL MEN... you code only in binary :grin:
Zero