-
Notifications
You must be signed in to change notification settings - Fork 9
/
ch7pg18.mlc
32 lines (32 loc) · 1.16 KB
/
ch7pg18.mlc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
PRINT NOGEN
****************************************************************
* FILENAME: CH7PG18.MLC *
* AUTHOR : Bill Qualls/z390 adaption by Anthony Delosa *
* SYSTEM : z390 V1703 *
* REMARKS : Book exercises from chapter 7 pg 18 *
****************************************************************
START 0
BEGIN SUBENTRY
CP A,B If A > B
BH USEB GOTO USEB
WTO 'A < B' Console message
B DONE GOTO DONE
USEB EQU *
WTO 'A > B' Console message
SP A,=P'1' subtract 1 from A
DONE EQU *
WTO 'DONE'
UNPK WTOTEXT(7),A
MVZ WTOTEXT+6(1),=X'F0' Remove sign
WTO MF=(E,WTOBLOCK)
RETURN
LTORG
DS 0H * INSURE HALF-WORD ALIGNMENT
WTOBLOCK EQU *
DC H'80' * For WTO, length of WTO buffer...
DC H'0' should be binary zeroes...
WTOTEXT DC CL76' '
A DC PL3'12'
B DC PL3'11'
C DC PL4'3'
END BEGIN