home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 13 / CDA13.ISO / cdactual / demobin / share / program / Asm / ASM_0_M.ZIP / JDOS.DOC < prev    next >
Encoding:
Text File  |  1989-03-18  |  13.4 KB  |  385 lines

  1.  
  2.                                JDOS Documentation
  3.                                Richard B. Johnson
  4.                                 PROGRAM EXCHANGE
  5.                                  March 15, 1989
  6.           Forward.
  7.           JDOS is a terminate and stay resident program (TSR) that
  8.           uses VERY LITTLE MEMORY! The resident portion is only about
  9.           3 kb.
  10.  
  11.           When installed, JDOS allows the user to activate a copy of
  12.           the DOS command-processor by typing ^\ (control-backslash)
  13.           while within a program. The command-processor will be acti-
  14.           vated for the user if the following conditions are met:
  15.  
  16.                (1) The program in use has not acquired ALL of the
  17.                system memory.
  18.  
  19.                (2) The program in use has followed DOS's rules for
  20.                memory management.
  21.  
  22.                (3) There is sufficient disk-space on the default drive
  23.                to write two files totaling about 700 kb in size. These
  24.                files are deleted as soon as JDOS returns to the inter-
  25.                rupted program.
  26.  
  27.           Usage:
  28.           JDOS <return>
  29.  
  30.           Note:
  31.           You should see a signon-message on your screen. If you do
  32.           not see this message, your base-board switches or CMOS are
  33.           not set properly to define the screen-card that you are us-
  34.           ing. In this case, the screen contents will not be restored
  35.           after you exit the JDOS window. You might be able to fix
  36.           this with the proper DOS "MODE" command in your AUTOEXEC.BAT
  37.           file.
  38.  
  39.           If you hit ^\ while at the DOS prompt, the console bell will
  40.           sound but nothing else will happen until you execute a tran-
  41.           sient program. That program will then be interrupted as soon
  42.           as JDOS finds a safe time to interrupt. If you accidentally
  43.           interrupt a program, you just wait until the JDOS window ap-
  44.           pears then type EXIT to return to your interrupted program.
  45.  
  46.           Depending upon how fast your hard-disk drive operates, it
  47.           may take several seconds to activate the JDOS window and
  48.           several seconds to get back to your interrupted task. This
  49.           may seem like a long time, but once you get to the JDOS
  50.           window, you will have MOST of the system memory available
  51.           for another application program! Other TSR programs of this
  52.           type permanently acquire large amounts of system memory when
  53.           installed. They then allow only very small programs to be
  54.           activated within the "window". JDOS saves most of the system
  55.           memory contents to disk so it can be used for applications
  56.           programs.
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.                                      - 1 -
  65.           
  66.  
  67.  
  68.  
  69.  
  70.           How it works.
  71.           When invoked at the DOS command-line, JDOS installs itself
  72.           and leaves about 3 kb resident in memory. JDOS continually
  73.           monitors the keyboard, waiting for the control-function, ^\
  74.           to be typed by the user.
  75.  
  76.           If the control-function is typed, JDOS sets a flag that
  77.           tells it to become active as soon as possible. The system
  78.           clock provides an interrupt about 18 times every second.
  79.           When this interrupt is activated, JDOS checks to see if the
  80.           flag has been set, requesting that it become active. If the
  81.           flag has been set, JDOS checks to see if the interrupted
  82.           program lies above JDOS in memory and below the DOS BIOS
  83.           services. If this is true, JDOS does the following:
  84.  
  85.                (1) Saves the current screen mode.
  86.  
  87.                (2) Saves all the characters on the screen in a hidden
  88.                file called SCREEN.$$$.
  89.  
  90.                (3) Saves the cursor type and position.
  91.  
  92.                (4) Saves the contents of the interrupt table.
  93.  
  94.                (5) Saves the state of four possible UARTs for communi-
  95.                cations adapters, COM1 through COM4, then disables
  96.                interrupt control on all of them.
  97.  
  98.                (6) Masks off interrupts IRQ3 and IRQ4 that communica-
  99.                tions programs use.
  100.  
  101.                (7) Sets the timer-tick interrupt that the interrupted
  102.                program might be using to a dummy routine.
  103.  
  104.                (8) Sets the system-timer interrupt, that the inter-
  105.                rupted program might be (dishonorably) using back to
  106.                the correct vector.
  107.  
  108.                (9) Saves the user's data-transfer area.
  109.  
  110.                (10) Saves the default directory and disk.
  111.  
  112.                (11) Saves the contents of memory in a hidden file
  113.                called VIRTUAL.MEM.
  114.  
  115.                (12) Releases memory to load and execute the DOS
  116.                command processor.
  117.  
  118.                (13) Loads the command processor.
  119.  
  120.                (14) At this time, the user may execute DOS commands
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.                                      - 2 -
  129.           
  130.  
  131.  
  132.  
  133.                and may also execute other programs. Since most of the
  134.                memory contents will have been saved in a file, the
  135.                user will have most of the system memory available for
  136.                application programs.
  137.  
  138.           After the user types EXIT at the DOS command line, the
  139.           following things occur:
  140.  
  141.  
  142.                (15) The command-processor returns to JDOS.
  143.  
  144.                (16) The default disk and directory are restored.
  145.  
  146.                (17) The memory released is reacquired.
  147.  
  148.                (18) The saved memory contents from the file are
  149.                written back to memory.
  150.  
  151.                (19) The memory-file is deleted (VIRTUAL.MEM).
  152.  
  153.                (20) The screen mode, cursor type, and position is
  154.                restored.
  155.  
  156.                (21) The screen contents are restored from a file.
  157.  
  158.                (22) The screen file is deleted (SCREEN.$$$).
  159.  
  160.                (23) The data-transfer area is restored.
  161.  
  162.                (24) The contents of the interrupt table is restored.
  163.  
  164.                (25) The interrupt-controller mask is restored to
  165.                enable the interrupted program's interrupts.
  166.  
  167.                (26) The state of the four possible UARTS for the
  168.                communications adapter ports COM1 through COM4 are
  169.                restored including any interrupt-enable bits.
  170.  
  171.                (27) JDOS returns to the interrupted program.
  172.  
  173.           If everything went according to plan, the user continues
  174.           with his work. JDOS may again be activated at any time.
  175.  
  176.           Possible problems:
  177.           There are several things that could go wrong that would
  178.           prevent JDOS from performing correctly. Much care has been
  179.           taken to help prevent a system crash in the event that
  180.           everything didn't go according to plan. Usually, in the
  181.           event of an error, JDOS simply refuses to load the command
  182.           processor and returns to the interrupted task. There are a
  183.           few things you MUST NOT DO when operating in the JDOS
  184.           "window".
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.                                      - 3 -
  193.           
  194.  
  195.  
  196.  
  197.  
  198.  
  199.                (1) Do NOT load a TSR program! JDOS needs the memory
  200.                that the TSR would use and has absolutely no way of
  201.                returning to the interrupted program if this memory
  202.                gets taken away by the TSR program.
  203.  
  204.                (2) Do NOT run CHKDSK with the /F option! There may be
  205.                many open files who's buffers haven't been written to
  206.                disk when JDOS interrupts the task. CHKDSK will assume
  207.                these files are bad and truncate them to zero-length!
  208.  
  209.                (3) Do NOT activate another TSR like Sidekick(tm) or
  210.                Superkey(tm) while inside the JDOS window! Usually you
  211.                can get away with this, but not always. You can improve
  212.                your chances by loading JDOS last.
  213.  
  214.                (4) Do NOT run a program that alters your disk struc-
  215.                ture (like Peter Norton's SD)! This could cause the
  216.                same problems as DOS's CHKDSK.
  217.  
  218.                (5) If operating from a floppy disk, do not remove the
  219.                default disk from the drive! If JDOS can't open the
  220.                virtual-memory file, it will abort so you can't get
  221.                back to the interrupted program.
  222.  
  223.                (6) JDOS creates then deletes two files, VIRTUAL.MEM
  224.                and SCREEN.$$$. These files will reside in the top
  225.                directory of the default disk. They are normally hid-
  226.                den. Should you delete them while in the JDOS window,
  227.                you'll be up the creek without a paddle once you exit
  228.                the JDOS window.
  229.  
  230.  
  231.           If you follow these rules, JDOS should be a useful addition
  232.           to your utilities.
  233.  
  234.                                  ERROR MESSAGES
  235.  
  236.                Need DOS version 3.00 or higher to execute!
  237.           Some versions of DOS 2.XX do not always work. You really
  238.           need DOS 3.XX for all modern applications.
  239.  
  240.                JDOS is already installed!
  241.           You tried to load JDOS again. It won't let you.
  242.  
  243.                Can't load command processor <CR>
  244.           The program that was interrupted had acquired ALL of the
  245.           system memory and won't release any! Just hit the <CR> and
  246.           JDOS will return to the interrupted task.
  247.  
  248.           If this message occurs immediately upon loading JDOS, it
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.                                      - 4 -
  257.           
  258.  
  259.  
  260.  
  261.           means that the command interpreter, COMMAND.COM can't be
  262.           located because of a corrupt environment. Type SET at the
  263.           DOS prompt and verify that the "COMSPEC=" parameter points
  264.           to a valid filename. This should be the COMMAND.COM file
  265.           that DOS loaded at boot-time.
  266.  
  267.                Can't create file \VIRTUAL.MEM
  268.           Not enough directory space in your top directory or not
  269.           enough file "handles" available. Put FILES=30 in your
  270.           CONFIG.SYS file then reboot.
  271.  
  272.                Can't write file \VIRTUAL.MEM
  273.           You are out of disk space. JDOS needs about 700 kb. This
  274.           single file can be as large as 620 kb.
  275.  
  276.                Can't close file \VIRTUAL.MEM
  277.           A disk allocation error prevents updating the directory.
  278.  
  279.                Can't open file \VIRTUAL.MEM
  280.           File was not created because of a previous error.
  281.  
  282.                Can't delete file \VIRTUAL.MEM
  283.           File was not created because of a previous error.
  284.  
  285.                Can't read file \VIRTUAL.MEM
  286.           File was not closed properly because of a previous error.
  287.  
  288.                Can't create file \SCREEN.$$$
  289.           Not enough directory space in your top directory or not
  290.           enough file "handles" available. Put FILES=30 in your
  291.           CONFIG.SYS file then reboot.
  292.  
  293.                Can't write file \SCREEN.$$$
  294.           You are out of disk space. JDOS needs about 700 kb. This
  295.           file is 64 kb in size.
  296.  
  297.                Can't close file \SCREEN.$$$
  298.           Disk allocation error prevents updating the directory.
  299.  
  300.                Can't open file \SCREEN.$$$
  301.           File was not created because of a previous error.
  302.  
  303.                Can't delete file \SCREEN.$$$
  304.           File was not created because of a previous error.
  305.  
  306.                Can't read file \SCREEN.$$$
  307.           File was not closed properly because of a previous error.
  308.  
  309.           If you want to laugh, please read the following message
  310.           stolen from a software instruction manual.
  311.  
  312.                                     WARRANTY
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.                                      - 5 -
  321.           
  322.  
  323.  
  324.  
  325.  
  326.           This material, hereunder referred to as software, whether or
  327.           not in machine-readable form, or existing in the manner re-
  328.           ferred to as source-code, whether or not in a compiler-
  329.           usable form, or existing as a memory image either as object-
  330.           code or binary controls to microprocessor modalities and
  331.           instructions, has neither express nor implied warranties of
  332.           any kind including, but not limited to, merchantability,
  333.           fitness for any particular purpose, or non-infringement of
  334.           patents, copyrights or other proprietary rights of others,
  335.           or any liability or responsibility for damages of any kind,
  336.           including special, indirect or consequential damages,
  337.           arising out of or resulting from the use of same made
  338.           available hereunder, or the use or modification thereof, the
  339.           sole remedy of which is limited, at our option, to the
  340.           replacement of this notice should it become defective in
  341.           normal use for a period not to exceed an unspecified time.
  342.           Some countries, states and principalities do not allow
  343.           limited warranties so this notice may not apply to you.
  344.  
  345.           In other words, "you usa da program, you taka you chances"!
  346.           The source-code is provided so that users may determine for
  347.           themselves if this program may serve a useful purpose. I
  348.           attempted to follow good standards of engineering practice
  349.           so you should not have too many problems.
  350.  
  351.                 Cheers,
  352.  
  353.                 Richard B. Johnson
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.                                      - 6 -
  385.           
  386.  
  387.