Just another update

This commit is contained in:
Ingy döt Net 2015-02-20 00:35:01 -05:00
parent a25938f123
commit 00a190b0a6
6591 changed files with 94363 additions and 23227 deletions

View file

@ -0,0 +1,27 @@
WHILE CSECT , This program's control section
BAKR 14,0 Caller's registers to linkage stack
LR 12,15 load entry point address into Reg 12
LA 13,0 inidicate caller no savearea
USING WHILE,12 tell assembler we use Reg 12 as base
XR 3,3 Register 3 zero.
XR 4,4 clear even divident reg
LA 5,1024 load odd divident reg
LA 9,2 divisor in reg 9
LA 8,WTOLEN address of WTO area in Reg 8
MVC WTOTXT,=C'1024'
WTO TEXT=(8) write to operator initial value 1024
LOOP DS 0H
DR 4,9 divide r4/5 by r9
CLR 3,4 less than zero?
BL RETURN yes, return
CVD 5,PACKED convert result to (packed) decimal
OI PACKED+7,X'0F' prepare unpack
XC WTOTXT,WTOTXT clear wto text
UNPK WTOTXT,PACKED packed decimal to zoned (printable)
WTO TEXT=(8) and write-to-operator
B LOOP loop.
RETURN PR , return to caller.
WTOLEN DC H'4' fixed WTO length of four
WTOTXT DS CL4
PACKED DS CL8
END WHILE