Turn off computer
Turn off computer
Does anybody have any assembly code that can be used to shut down the computer?
I am creating a mouse driven GUI called DREAM16 OS (which I will post about later) that needs this for its turn off computer option.
I will compile the code and load it from a DATA statement.
thanks.
I am creating a mouse driven GUI called DREAM16 OS (which I will post about later) that needs this for its turn off computer option.
I will compile the code and load it from a DATA statement.
thanks.
- burger2227
- Veteran
- Posts: 2466
- Joined: Mon Aug 21, 2006 12:40 am
- Location: Pittsburgh, PA
Code: Select all
SUB Memory
'----------------------------------
'Get memory size (extended mem, kB)
'----------------------------------
OUT &H70, &H15
b% = INP(&H71)
OUT &H70, &H16
b1% = INP(&H71)
BaseMem = CVI(CHR$(b%) + CHR$(b1%))
OUT &H70, &H17
b% = INP(&H71)
OUT &H70, &H18
b1% = INP(&H71)
ExtMem = CVI(CHR$(b%) + CHR$(b1%))
TotalMem = BaseMem + ExtMem
PRINT "Base Memory:"; BaseMem; "K + Extended:"; ExtMem; "K TOTAL ="; TotalMem; "K"
END SUB
Please acknowledge and thank members who answer your questions!
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
- burger2227
- Veteran
- Posts: 2466
- Joined: Mon Aug 21, 2006 12:40 am
- Location: Pittsburgh, PA
There are several ways, but doing that could corrupt open files. Files opened need to be saved or closed first. Including Windows stuff. I have a debug routine on my 98 machine if you STAY in DOS only.
You need to determine the OS version to shutdown Windows.
You need to determine the OS version to shutdown Windows.
Please acknowledge and thank members who answer your questions!
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
My GUI is meant to run on a DOS machine or a 95 in DOS mode. This code will be placed at the part of the gui that saves its user made settings and shuts down. As long as it works in true DOS, it is perfect.
I will create a break key or something that shuts down the GUI for people trying it in Windows.
I will create a break key or something that shuts down the GUI for people trying it in Windows.
- burger2227
- Veteran
- Posts: 2466
- Joined: Mon Aug 21, 2006 12:40 am
- Location: Pittsburgh, PA
Then your "OS" is doomed because FEW people use DOS alone. Including myself.
Please acknowledge and thank members who answer your questions!
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
Wel, I am creating this mainly for practice as well as for personal use. Also I am including a special exit option for Windows users that does not shut down the computer, but simply exits.
It is coming along quite well (for my 1st OS). I just got done adding new features, like the ability to drag icons on the desktop with the mouse or save the desktop as well as making it customizable.
It is coming along quite well (for my 1st OS). I just got done adding new features, like the ability to drag icons on the desktop with the mouse or save the desktop as well as making it customizable.
WHOOPS
WHOOPS, I USE THE MS-DOS 7.1 = WINDOWS 98SE BUT I COULDN'T FIND IT;Nodtveidt wrote:MS-DOS 7.10 comes with a utility called SHUTDOWN.EXE.
INSTEAD I FOUND IT IN A MORE ADVANCED WINDOWS VERSIONS:
Microsoft DOS shutdown command
IN MY WIN98SE I USE:
SHELL "START/MAX C:\WINDOWS\RUNDLL32.EXE USER.EXE,EXITWINDOWS"
MY PAGE: http://Qbasic.phatcode.net" target="_blank
(I ONLY USE WINDOWS 98SE YET, BELIEVE IT OR NOT)
(I ONLY USE WINDOWS 98SE YET, BELIEVE IT OR NOT)
- burger2227
- Veteran
- Posts: 2466
- Joined: Mon Aug 21, 2006 12:40 am
- Location: Pittsburgh, PA
IS YOUR CAP LOCK KEY STUCK? QUIT YELLING AT PEOPLE GENIUS!
Please acknowledge and thank members who answer your questions!
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
NO, BUT I LIKE UPPERCASING FOR EVERYTHING.burger2227 wrote:IS YOUR CAP LOCK KEY STUCK?
I DO NOT LISTEN ANY NOISE IN MY SORROUNDINGS.burger2227 wrote:QUIT YELLING AT PEOPLE GENIUS!
SEE THIS PAGE OF MY WEBSITE?
http://basic.phatcode.net/tut/bco.htm
IN THE FUTURE MY WHOLE SITE WILL BE SEEN THAT WAY,
BUT I HAVE NOT HAD TIME TO DO IT (SORRY!)
MY PAGE: http://Qbasic.phatcode.net" target="_blank
(I ONLY USE WINDOWS 98SE YET, BELIEVE IT OR NOT)
(I ONLY USE WINDOWS 98SE YET, BELIEVE IT OR NOT)
- burger2227
- Veteran
- Posts: 2466
- Joined: Mon Aug 21, 2006 12:40 am
- Location: Pittsburgh, PA
The fellow is pretty good, but he does not seem to grasp that people cannot read his site pages.
Then he comes here and YELLS at everybody where we can see it VERY well?
LOL
Then he comes here and YELLS at everybody where we can see it VERY well?
LOL
Please acknowledge and thank members who answer your questions!
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
I AGREE WITH THAT, BUT I'M THOSE KIND OF NERDS WHO CAN LISTEN EVILSbongomeno wrote:My advice would be to change the colors to something more eye friendly.
AND THEY MENACE ME IF I USE ANOTHER COLORS. SOME DAY I'LL CHANGE
THEM FOR THE 'MATRIX' COLORS THAT I LIKE THEM SINCE THE MS-DOS WAS
THE KING OF THE HILL WITH THE GREEN PHOSPHORUS MONITORS.
MY PAGE: http://Qbasic.phatcode.net" target="_blank
(I ONLY USE WINDOWS 98SE YET, BELIEVE IT OR NOT)
(I ONLY USE WINDOWS 98SE YET, BELIEVE IT OR NOT)
- BigBadKing
- Veteran
- Posts: 83
- Joined: Fri Oct 09, 2009 12:39 pm
- Location: Space
- Contact:
if you are going to make a matrix-colored site, with everything uppercase.
nobody will bother to visit your site... put up a Unique-Visitor hit counter
on your site, check your hit counter afew days after and see how many
persons visited your site.
nobody will bother to visit your site... put up a Unique-Visitor hit counter
on your site, check your hit counter afew days after and see how many
persons visited your site.
<a href="http://mccorp.orgfree.com">Macselent Corporation Offical Site</a>
- BigBadKing
- Veteran
- Posts: 83
- Joined: Fri Oct 09, 2009 12:39 pm
- Location: Space
- Contact:
I THINK IT WOULD BE EASIER TO BE READ. I HAVE COUNTED THE VISITORS SINCE I DIDBigBadKing wrote:if you are going to make a matrix-colored site, with everything uppercase. nobody will bother to visit your site.
CREATE THE PAGE AND I HAVE AN AVERAGE OF 300 NOT UNIQUE VISITORS BY DAY.
I DID TRY IT USING AN INNER COUNTER OF THE SERVER BUT IT GIVES ME ANBigBadKing wrote:... put up a Unique-Visitor hit counter on your site,...
ERROR THAT I COULDN'T SOLVE (IT NEEDS A FILE THAT IT IS NOT CREATED).
MY PAGE: http://Qbasic.phatcode.net" target="_blank
(I ONLY USE WINDOWS 98SE YET, BELIEVE IT OR NOT)
(I ONLY USE WINDOWS 98SE YET, BELIEVE IT OR NOT)
- BigBadKing
- Veteran
- Posts: 83
- Joined: Fri Oct 09, 2009 12:39 pm
- Location: Space
- Contact:
*sign* a NON-UNIQUE hit counter, counts every page visit. i tried to
use it on my site but replaced it with an UNIQUE one. when i had a NON
UNIQUE counter, everything i visited one my own pages. it was added
by one. so a non-unique counter counts every-yours and your-visitor's
visit to every page...
use it on my site but replaced it with an UNIQUE one. when i had a NON
UNIQUE counter, everything i visited one my own pages. it was added
by one. so a non-unique counter counts every-yours and your-visitor's
visit to every page...
<a href="http://mccorp.orgfree.com">Macselent Corporation Offical Site</a>