Arabic Basmallah
1991 · C:\PESM\PESM.EXE
Loading PESM.EXE, 4 KB
The Basmala drawn 16 times, in every mix of bold, underline and italic, at two sizes and in different colors, by its own copy of ARABART.
The story
PESM is a test card for the engine that became ARABART. Sixteen calls draw the Basmala, a sacred Islamic phrase. The style keys in front of each line count from 0 to 15 in binary, so every mix of the four styles appears once. Its joining code and letter shapes are the same bytes that ARABART 4.15 carries in 1993. PESM calls the engine directly, with the same arguments that programs later send to ARABART.
Sixteen lines, counting to fifteen
PESM writes the Basmala, بسم الله الرحمن الرحيم, sixteen times. Every line switches on a new mix of bold, underline, italic and double size, until it has drawn them all.
This is the first appearance of his Arabic engine, in 1991. Press Run and watch it work through every style, one call at a time.
mov dx,026Chthe textmov ax,3608hAL: dark graymov cx,0190hx = 400mov bx,01DFhy = 479call 0284hhis engineDecimal 15 Hex Fh
Watch the four switches. PESM never sets a style outright. In front of each line it puts only the style keys that need to flip: @ for bold, # for underline, ! for italic. The switches carry over from one line to the next, so the prefixes count in binary: 0, 1, 2, 3, all the way to 15.
Line 9 starts the second column with *$: every switch off, then double size on. That is 8, binary 1000, and the count runs on to 1111. Sixteen lines, every combination of four styles, and not one line repeated. A complete test card, in a few bytes of text.
The engine inside, byte for byte
PESM carries its own copy of his Arabic engine. Its joining code and its letter shapes are the very bytes ARABART 4.15 carries two years later.
Pick a block and compare the two files live. Two years on, he had no reason to touch the code that gives every letter its shape.
ARABART runs as a service in memory. Programs reach it through the PC’s built-in video service, INT 10h, the way a web page calls a browser API. PESM keeps the engine inside its own file and calls it directly, with the very same arguments: the color, x, y and the text. Today we call that static linking: one file, nothing to install first.
So the same code serves both ways. For a quick demo, link it in. For many programs on one PC, load it once and let all of them call it. ARABART is the second way.
| 1991 to 1993 | 2026 | Why it is the same idea |
|---|---|---|
| PESM carries the engine inside its own file | A statically linked binary, the way Go builds by default | One file that runs anywhere, with nothing to install. |
| ARABART loads once and serves every program | A shared library, or a local background service | One copy in memory for every program that needs it. |
The same inputs for call 0284h and int 10h | One API with two backends | Code written for one works with the other. |
| Sixteen lines, every mix of styles | A visual test page, like a Storybook story for every variant | Draw every combination once, and see them all at a glance. |
For engineers: the entry PESM calls
mov cs:[05B9h],ds / mov cs:[05BBh],dx ; where the text is mov cs:[05C7h],al ; the color mov cs:[05BFh],bx / mov cs:[05BDh],cx ; y and x mov dl,[di] / cmp dl,0 / je 02BDh ; each key, up to the zero mov al,cs:[si+09FBh] ; key to glyph code: his table mov [di],al / inc di ; stored in place dec di / inc di / mov dl,[di] / cmp dl,0C8h ; the shaping pass: 136 bytes, the same as ARABART 0238h PESM fills the registers exactly as a program fills them for ARABART: AH = 36h, AL the color, CX the x, BX the y, DS:DX the text. Pixels go straight into VGA memory, mode 12h, 640 by 480, through the VGA Graphics Controller: Set/Reset holds the color and the Bit Mask picks the pixels, exactly as in ARABART. One difference shows how the engine grew: in PESM the style switches carry over from call to call, which is what lets the sixteen lines count. ARABART 4.15 clears them at the start of every call, so each string carries its own styles. See the engine in Every Byte.
The Basmala, in 22 keys
The whole sentence is fsl hggi hgvplk hgvpdl: 22 keys on an English keyboard, pressed as if it had Arabic key caps. Two more lines wait in PESM’s data, in the same code.
One is his own name. The other names a computer center, Al-Nour. Pick a line, then pick any key to see what it becomes.
Every key here is the Arabic-keyboard encoding: f is ب, s is س, l is م. His markup lives inside the text, style keys and all, the same way it does in ARABART. Type your own on ARABART.
Every Byte of PESM.EXE
Each square is one byte of the program in memory, colored by what it is. Tap a part to open it in the full map, down to the single instruction.
3,739 bytes on the disk, packed by DIET
6,144 bytes in memory, 6,096 of them his own code
- Font56%
- Table19%
- Code17%
- Text7.3%
- Header0.5%
- Data0.3%
- Empty space0.2%
- Fix-up list<0.1%
The biggest parts, his first
- Font3,418 bytesYasser
- Row address table1,000 bytesYasser
- Glyph drawing616 bytesYasser
- 16 strings392 bytesYasser
- Main: 16 calls252 bytesYasser
- Shaper136 bytesYasser
Mapped by hand from the program’s own bytes.