flat assembler
Message board for the users of flat assembler.

Index > DOS > Collection of small but usefull COM-files, bit updated now

Author
Thread Post new topic Reply to topic
MCD



Joined: 21 Aug 2004
Posts: 604
Location: Germany
MCD
All coded by myself and I think I should make them freely accessible.

post if you have any questions/bugs/improvements.
Most of these stuff require 386+ (not all).

(sorry for the syntax, but I'm using a kind of "shorthand" Embarassed )

The archive contains:
------------------------

-LOADFONT: loads a user specified font (file) to change the characters to be displayed in standard text mode (via Video-BIOS ints). Comes with an example called "HEXVIEW.FON" which allows to see the DOS-prompt both with standard 8*8 charchters set with additional hexadecimal-info about each character on screen! really amazing!
Currently, LOADFONT requires the FULL path of the font-file (I should change this ASAP).
The format of the font is simple:

offset
0 (byte): number of characters in font
1 (byte): character width
2 (byte): character height
3 (number_of_characters x character_width x character_height shr 3): charcter data 1bit/pixel

-NIGHT: switch into APM energy saving mode until any interrupt (keybard, mice etc)
-OFF: switch PC off with APM v1.2
-OFFCAD: like OFF, but as an TSR with Ctrl+Alt+Del press plus a HLT-based CPU-cooler (in the DOS-idle loop)

-STEX: A TSR that switches standard text mode into higher vertical refresh rates. Usefull when working lot under DOS. (It uses some VESA v1.0 stuff to switch into some higher "DAC-rate" and then enables the user-specific DAC-rates on CRTC register).
Works with most tested monitors, but should give problems with small monitors < 15''.

-TSCBENCH: A high-precision CPU time-stamp-counter benchmark used to benchmark single/couples of instruction for speed optimization purposes.
It uses some special tricks to be even precise under modern PCs (and with removing previleged instrunctions even under Windows DOS-Box).
It is single CPU-cycle precise, except when accessing RAM. Full 64bit TSC Calculation.
You must just insert the tested instruction between 2 comment lines.

Other stuff have already be explained elsewhere by me in this forum.


Description: An updated version. The syntax shorthand has changed.
Download
Filename: MYPROGS.RAR
Filesize: 48.64 KB
Downloaded: 313 Time(s)


_________________
MCD - the inevitable return of the Mad Computer Doggy

-||__/
.|+-~
.|| ||


Last edited by MCD on 07 Dec 2004, 17:03; edited 3 times in total
Post 22 Sep 2004, 20:01
View user's profile Send private message Reply with quote
MCD



Joined: 21 Aug 2004
Posts: 604
Location: Germany
MCD
This thread contains stuff that is not published anwhere else.
Post 14 Oct 2004, 21:31
View user's profile Send private message Reply with quote
Matrix



Joined: 04 Sep 2004
Posts: 1171
Location: Overflow
Matrix
MCD,
don't be like that:

Code:
OffScrBuf       = 200000h;Where image should be rendered in RAM < cute assume

RefreshRate     = 100 < in 1024x768 ? not all of us have that
    


MATRIX
Post 15 Oct 2004, 18:38
View user's profile Send private message Visit poster's website Reply with quote
Matrix



Joined: 04 Sep 2004
Posts: 1171
Location: Overflow
Matrix
MCD

Code:
----------P0070007F--------------------------
PORT 0070-007F - CMOS RAM/RTC (REAL TIME CLOCK)
Note:   the real-time clock may be either a discrete MC146814, MC146818, or
   an emulation thereof built into the motherboard chipset
SeeAlso: PORT 00A0h"XT"

0070  -W  CMOS RAM index register port (ISA, EISA)
                 bit 7  = 1  NMI disabled from reaching CPU
                 = 0  NMI enabled
             bit 6-0     CMOS RAM index
                 (64 bytes in early systems, now usually 128 bytes)
  Note:       any write to PORT 0070h should be followed by an action to
            PORT 0071h or the RTC wil be left in an unknown state.
0071  RW  CMOS RAM data port (ISA, EISA) (see #P0409)

(Table P0409)
Values for Real-Time Clock register number (see also CMOS.LST):
 00h-0Dh clock registers
 0Eh       diagnostics status byte
 0Fh shutdown status byte
 10h    diskette drive type for A: and B:
 11h       reserved / IBM fixed disk / setup options
 12h       fixed disk drive type for drive 0 and drive 1
 13h   reserved / AMI Extended CMOS setup (AMI Hi-Flex BIOS)
 14h   equipment byte
 15h  LSB of system base memory in Kb
 16h MSB of system base memory in Kb
 17h LSB of total extended memory in Kb
 18h      MSB of total extended memory in Kb
 19h      drive C extension byte
 1Ah  drive D extension byte
 1Bh-2Dh reserved
 20h-27h commonly used for first user-configurable drive type
 2Eh    CMOS MSB checksum over 10-2D
 2Fh    CMOS LSB checksum over 10-2D
 30h    LSB of extended memory found above 1Mb at POST
 31h  MSB of extended memory found above 1Mb at POST
 32h  date century in BCD
 33h     information flags
 34h-3Fh   reserved
 35h-3Ch commonly used for second user-configurable drive type
 3Dh-3Eh word to 82335 MCR memory config register at [22] (Phoenix)
 42h-4Ch AMI 1990 Hyundai super-NB368S notebook
        ???
 54h-57h AMI 1990 Hyundai super-NB368S notebook
      ???
 5Ch-5Dh AMI 1990 Hyundai super-NB368S notebook
      ???
 60h-61h AMI 1990 Hyundai super-NB368S notebook
      ???
    


especially take a look at this line:

Code:
  Note:       any write to PORT 0070h should be followed by an action to
            PORT 0071h or the RTC wil be left in an unknown state.
    


i whouldn't put my life on your codes

MATRIX
Post 15 Oct 2004, 19:10
View user's profile Send private message Visit poster's website Reply with quote
MCD



Joined: 21 Aug 2004
Posts: 604
Location: Germany
MCD
You're right, but to be honest, you are the first feedback I got to these progs Smile

sorry, the file VESADEMO.ASM wasn't meant to be included in this archive in the first place, since it is to experimental and I have uploaded it somewhere else already.

Quote:

OffScrBuf = 200000h;Where image should be rendered in RAM < cute assume

This will be fixed soon. Xms memoy detection.

Quote:

RefreshRate = 100 < in 1024x768 ? not all of us have that

As already described, lower the value, e.g. 60Hz. If this doesn't work on your monitor, then try a lower VESA-mode, but this will change the actual demo. if your monitor has problems with VESA 2.0+ in general, this code should be nothing to test on your machine. Anyway, this file was included accidentially in the archive.

Quote:

Note: any write to PORT 0070h should be followed by an action to
PORT 0071h or the RTC wil be left in an unknown state.

Even though I've read this part in RB's interrupt list, none of my test pcs showed any problem. But this should be fixed soon, since this kind of code relies on undocumented behaviours. I must have forgotten this since I've been writing many CMOS stuff yet.

_________________
MCD - the inevitable return of the Mad Computer Doggy

-||__/
.|+-~
.|| ||
Post 19 Oct 2004, 13:57
View user's profile Send private message Reply with quote
MCD



Joined: 21 Aug 2004
Posts: 604
Location: Germany
MCD
Post 29 Nov 2004, 18:23
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar.

Powered by rwasa.