aboutsummaryrefslogtreecommitdiff
path: root/proc1.asm
diff options
context:
space:
mode:
authorBen Burwell <ben@benburwell.com>2015-04-01 20:26:26 -0400
committerBen Burwell <ben@benburwell.com>2015-04-01 20:26:26 -0400
commite282a861d5868868940b449681f2ee5da3e439e8 (patch)
treedc1fb0b3708d717e6c3695fffc77d5df7a0934a8 /proc1.asm
parente781fb26fdd422ea72c3a0eeba817e4faa5f663b (diff)
as of 2013-10-292013-10-29
Diffstat (limited to 'proc1.asm')
-rw-r--r--proc1.asm62
1 files changed, 62 insertions, 0 deletions
diff --git a/proc1.asm b/proc1.asm
new file mode 100644
index 0000000..06aa1d4
--- /dev/null
+++ b/proc1.asm
@@ -0,0 +1,62 @@
+;*************************************************************************
+;
+; MPX-PC Test Process
+; Name: PROC1
+; Description: Test process
+; Module: 4
+;
+;************************************************************************
+
+
+ CON EQU 01H
+ PRT EQU 02H
+ WRITE EQU 01H
+
+ CR EQU 0DH
+ LF EQU 0AH
+
+ STACK SEGMENT STACK
+ DB 32 DUP ('STACK ') ; 256 BYTES
+ STACK ENDS
+
+ DATA SEGMENT
+ MSG1 DB 'Proc1 dispatched. ',CR,LF,'$'
+ LEN DW 20
+ DATA ENDS
+
+ CODE SEGMENT
+ ASSUME CS:CODE,DS:DATA,ES:DATA,SS:STACK
+
+ MAIN PROC FAR
+ START: MOV AX,DATA ; SET UP DATA SEGMENT
+ MOV DS,AX
+ MOV ES,AX ; SET UP EXTRA SEGMENT
+
+ ; Set up stack for dummy sys_call
+
+ MOV DX,OFFSET LEN
+ PUSH DX ; LOAD LENGTH PARM
+ MOV DX,OFFSET MSG1
+ PUSH DX ; LOAD MESSAGE ADDRESS
+ MOV DX,WRITE
+ PUSH DX ; LOAD OPERATION TYPE
+ MOV DX,PRT
+ PUSH DX ; LOAD OPERATION NUMBER
+ MOV DX,0AAH
+ PUSH DX ; PUSH EXTRA BYTE TO MAINTAIN
+ MOV DX,0ABH ; COMPATIBILITY WITH C ROUTINES
+ PUSH DX
+
+ LOOP: MOV DX,OFFSET MSG1
+ MOV AH,09H ; PRINT STRING
+ INT 21H
+
+ MOV CX,0 ; RUN ONLY ONCE
+ INT 60H ; INT TO DISP
+ JMP LOOP
+
+ MAIN ENDP
+ CODE ENDS
+ END START
+
+