Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ eis(3) — Purdue Xinu

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

cc11(1)

subEIS(1)

EIS(3)

NAME

EIS − extended instruction set for the LSI-11/2

SYNOPSIS

jsr pc,times2
jsr pc,over2
jsr pc,shift2
jsr pc,cshft2

DESCRIPTION

Library eis.a contains assembly language routines to simulate LSI-11 multiply, divide, arithmetic shift, and arithmetic shift combined instructions.  Normally, an assembly language listing should be filtered through the programs subMUL, subDIV, subASH, and subASHC to replace any of the extended instructions with the proper calling sequence.  The resulting assembly language program must be loaded with this library, which contains the routines called. 

These routines do not use the C calling conventions. The multiply routine is called by:

mfps-(sp)/ push psw
movA,-(sp)/ push multiplier
movR,-(sp)/ push multiplicand
jsrpc,times2/ call mul simulation routine
mov(sp)+,R/ save low word of product
mov(sp)+,R+1/ save high word of product
mtps(sp)+/ put in new psw

where the instruction being mimicked is "mul A,R" and R is an even-numbered register (if R is odd, change the "mov (sp)+,R" to "tst (sp)+" and the "mov (sp)+,R+1" to "mov (sp)+,R"). 

The division routine is called by:

mfps-(sp)/ push psw
movA,-(sp)/ push divisor
movR,-(sp)/ push high word of dividend
movR+1,-(sp)/ push low word of dividend
jsrpc,over2/ call div simulation routine
mov(sp)+,R+1/ save remainder
mov(sp)+,R/ save quotient
tst(sp)+/ reset stack pointer
mtps(sp)+/ put in new psw

where the instruction being mimicked is "div A,R". 

The arithmetic shift routine is called by:

mfps-(sp)/ get psw
movA,-(sp)/ push shift count onto the stack
movr0,-(sp)/ push number to be shifted onto the stack
jsrpc,shift2/ call the simulation routine
mov(sp)+,r0/ save the result
tst(sp)+/ reset stack pointer
mtps(sp)+/ put in new psw

where the instruction being mimicked is "ash A,R".  The arithmetic shift combined routine is called by:

mfps-(sp)/ get psw
movA,-(sp)/ push shift count onto the stack
movr0,-(sp)/ push high word onto the stack
movr1,-(sp)/ push low word onto the stack
jsrpc,shift2/ call the simulation routine
mov(sp)+,r1/ save the low word
mov(sp)+,r0/ save the high word
tst(sp)+/ reset stack pointer
mtps(sp)+/ put in the new psw

where the instruction being mimicked is "ashc A,R". 

FILES

{Xinu-directory}/lib/libeis.a
{Xinu-directory}/bin/subMUL
{Xinu-directory}/bin/subDIV
{Xinu-directory}/bin/subASH
{Xinu-directory}/bin/subASHC

SEE ALSO

cc11(1), subEIS(1)

DIAGNOSTICS

The condition codes are correctly set by the above calling sequence. 

December 01, 1986  —  Xinu Programmer’s Manual

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026