mirror of
https://github.com/SEPPDROID/Digital-Research-Source-Code.git
synced 2025-10-26 09:54:20 +00:00
Upload
Digital Research
This commit is contained in:
74
MPM OPERATING SYSTEMS/MPM II/MPM II SOURCE/UTIL5/CNS.PLM
Normal file
74
MPM OPERATING SYSTEMS/MPM II/MPM II SOURCE/UTIL5/CNS.PLM
Normal file
@@ -0,0 +1,74 @@
|
||||
$title ('MP/M II V2.0 Console Identification')
|
||||
console:
|
||||
do;
|
||||
|
||||
$include (copyrt.lit)
|
||||
/*
|
||||
Revised:
|
||||
14 Sept 81 by Thomas Rolander
|
||||
*/
|
||||
|
||||
declare start label;
|
||||
declare jmp$to$start structure (
|
||||
jmp$instr byte,
|
||||
jmp$location address ) data (
|
||||
0C3H,
|
||||
.start-3);
|
||||
|
||||
mon1:
|
||||
procedure (func,info) external;
|
||||
declare func byte;
|
||||
declare info address;
|
||||
end mon1;
|
||||
|
||||
mon2:
|
||||
procedure (func,info) byte external;
|
||||
declare func byte;
|
||||
declare info address;
|
||||
end mon2;
|
||||
|
||||
/**************************************
|
||||
* *
|
||||
* B D O S Externals *
|
||||
* *
|
||||
**************************************/
|
||||
|
||||
print$console$buffer:
|
||||
procedure (buffer$address);
|
||||
declare buffer$address address;
|
||||
call mon1 (9,buffer$address);
|
||||
end print$console$buffer;
|
||||
|
||||
/**************************************
|
||||
* *
|
||||
* X D O S Externals *
|
||||
* *
|
||||
**************************************/
|
||||
|
||||
terminate:
|
||||
procedure;
|
||||
call mon1 (143,0);
|
||||
end terminate;
|
||||
|
||||
get$console$number:
|
||||
procedure byte;
|
||||
return mon2 (153,0);
|
||||
end get$console$number;
|
||||
|
||||
|
||||
/*
|
||||
Main Program
|
||||
*/
|
||||
|
||||
declare cnsmsg (*) byte initial
|
||||
(0dh,0ah,'Console = x','$');
|
||||
|
||||
start:
|
||||
do;
|
||||
cnsmsg(12) = get$console$number + '0';
|
||||
call print$console$buffer (.cnsmsg);
|
||||
call terminate;
|
||||
end;
|
||||
|
||||
end console;
|
||||
|
||||
Reference in New Issue
Block a user