April 1, 1981 238 IPM VM/3 7 0 eMS User's Guide
Page of GC20-1819-2 As Updated April 1, 1981 by TNL GN25-0826 Section 13. Programming for the eMS Environment
This section contains information for assembler language proqrammers who
may occasionally need to write programs to be used in the CMS environment. The conventions described here apply only to CMS virtual
machines; you can not execute these programs under any other operating
systems.
Program Linkage Program linkages, in CMS, are generally made by means of a supervisor
call instruction, SVC 202. The SVC handling routine takes care of
program linkage for you. The registers used and their contents are
discussed in the following paragraphs. Registgr 1: Points to a parameter list of successive doublewords. The
first entry in the list is the name of the called routine or and any successive doublewords may contain arguments passed to the
program. Parameter lists discussed under "Parameter Lists." 13: contains the address of a 2Q-fullword save area, which you
can use to-save your caller's registers. This save area is provided to
satisfy standard OS and DOS linkage conventions; you do not need to Use it in eMS, since the svc routines save the registers. Rggister contains the return address of the SVC handling YoU must return control to this address when you exit from your program.
The eMS routines that get control by way of register 14 close files,
update your disk file directory, and calculate and type the time used in
program execution. These values appear in the CMS ready message, which
is displayed at your terminal when your program finishes execution:
R;T=n.nn/x.xx hh:mm:ss
where n.nn is the CMS CPU time (in seconds) and x.xx is the combined CP and CMS CPU time (also· in seconds). hh:mm:ss is the time of day in
hours, minutes, and seconds. If a routine takes longer than 4,294
seconds (about 71 minutes), CMS will not calculate the time and will
display *.** in place of n.nn or x.xx. 12: contains your program's entry point address. You can use
this address to establish immediate addressability in your program. You should not use it as a base address, however, since all CMS SVCs use it
for communication with your programs.
Fiqure 20 shows a sample CMS assembler lanquage proqram and exit.
section 13. programming for the CMS Environment 239
Previous Page Next Page