Category : Assembly Language Source Code
Archive   : UCRASM27.ZIP
Filename : SHELL.ASM

Output of file : SHELL.ASM contained in archive : UCRASM27.ZIP
include stdlib.a
includelib stdlib.lib

; Global variables go here:

dseg segment para public 'data'
dseg ends

cseg segment para public 'code'
assume cs:cseg, ds:dseg

; 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 ?
mmm "Hello",cr,lf,0
; Here is a good place to put other routines:
; 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
mov dx, 0
jnc GoodMemInit

db "Error initializing memory manager",cr,lf,0
jmp Quit

; Put your main program here.

Quit: ExitPgm
Main endp

cseg 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 (?)
zzzzzzseg ends
end Main

  3 Responses to “Category : Assembly Language Source Code
Archive   : UCRASM27.ZIP
Filename : SHELL.ASM

  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: