https://github.com/BenSlivka/OS2_PSCHAR
[3.7 KLOC C/ASM, 1.2 KLOC comments] 1988: A character-mode full-screen/visual Process Status tool for OS/2 v1.1. See especially FMT.ASM [555 LOC], which is a compatible and nearly-complete re-implementation of the C run-time sprintf() function in blazing fast 16-bit x86 assembly code.
https://github.com/BenSlivka/OS2_PSCHAR
Last synced: 15 days ago
JSON representation
[3.7 KLOC C/ASM, 1.2 KLOC comments] 1988: A character-mode full-screen/visual Process Status tool for OS/2 v1.1. See especially FMT.ASM [555 LOC], which is a compatible and nearly-complete re-implementation of the C run-time sprintf() function in blazing fast 16-bit x86 assembly code.
- Host: GitHub
- URL: https://github.com/BenSlivka/OS2_PSCHAR
- Owner: BenSlivka
- Created: 2021-02-09T22:42:15.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-02-09T23:00:58.000Z (about 4 years ago)
- Last Synced: 2024-11-01T18:37:50.312Z (5 months ago)
- Language: C
- Homepage:
- Size: 93.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-blazingly-fast - OS2_PSCHAR - 1988: A character-mode full-screen/visual Process Status tool for OS/2 v1.1. See especially FMT.ASM, which is a compatible and nearly-complete re-implementation of the C run-time sprintf() function in blazing fast 16-bit x86 assembly code. (C)
README
# OS2_PSCHAR
A character-mode full-screen/visual Process Status tool for OS/2 v1.1 ca. 1988.The initial version was very sluggish.
I had written a CPU profiling tool earlier (ca. 1987), which worked by increasing the real-time clock interrupt rate to 1KHz from 60Hz, and storing the current CS:IP in a fixed memory buffer.
Using this tool, I determined that the C run-time routine sprintf() -- which takes a formatting string and arguments that are integers, strings, etc., and generates a new string -- was a big performance bottleneck.So I wrote FMT.ASM -- a lean-and-mean subset of sprintf()! Didn't do floating point, and a few other obscure data types/formats.
Used all the assembly language tricks I had learned in the 1970s-1980s on the Control Data Corporation 6400 at Northwestern University's Vogelback Computing Center. The COMPASS assembly language was very sophisticated, with not only MACROs but also MICROs (an in-line text replacement mechanism).From the vantage point of 2/9/2021 -- nearly 30 years later -- this code seems hopelessly complex and yet trivial.
As we write massive web apps that run in gigabytes (even terabytes) of RAM.
While OS/2 1.1 would run well in 4Mb of RAM.
[email protected] (1985-1999)