Category : Assembly Language Source Code
Archive   : RHSTDLIB.ZIP
Filename : SHELL.A

 
Output of file : SHELL.A contained in archive : RHSTDLIB.ZIP
cseg segment para public 'code'
assume cs:cseg, ds:dseg
;
include stdlib.a
;
;
; Variables that wind up being used by the standard library routines.
; The MemInit routine uses "PSP" and "zzzzzzseg" labels. They must be
; present if you intend to use getenv, MemInit, malloc, and free.
;
;
public PSP
PSP dw ?
;
;
;
; Main is the main program. Program execution always begins here.
;
Main proc
mov cs:PSP, es ;Save pgm seg prefix
mov ax, seg dseg ;Set up the segment registers
mov ds, ax
mov es, ax
MemInit ;Initialize Memory Manager
;
Quit: mov ah, 4ch
int 21h
;
;
Main endp
cseg ends
;
;
; Normally, you should allocate global variables in DSEG:
;
dseg segment para public 'data'
dseg ends
;
;
; Allocate a reasonable amount of space for the stack (2k).
;
sseg segment para stack 'stack'
stk db 256 dup ("stack ")
sseg ends
;
;
;
; zzzzzzseg must be the last segment that gets loaded into memory!
;
zzzzzzseg segment para public 'zzzzzz'
LastBytes db 16 dup (?)
zseg ends
end Main


  3 Responses to “Category : Assembly Language Source Code
Archive   : RHSTDLIB.ZIP
Filename : SHELL.A

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/