master
s 56 lines 1.57 KB
Raw
1 .org 0x8d
2 ilc:
3 .org 0x8e
4 program_interruption_code:
5 .org 0x94
6 monitor_class:
7 .org 0xb0
8 monitor_code:
9 .org 0x150
10 program_old_psw:
11 .org 0x1d0 /* program new PSW */
12 .quad 0x180000000,pgm /* 64-bit mode */
13 .org 0x200 /* lowcore padding */
14 .globl _start
15 _start:
16 stctg %c8,%c8,c8 /* enable only monitor class 1 */
17 mvhhi c8+6,0x4000
18 lctlg %c8,%c8,c8
19 mc_nop:
20 mc 123,0
21 mc_monitor_event:
22 mc 321,1
23 j failure
24 mc_specification:
25 mc 333,16
26 j failure
27 pgm:
28 lgrl %r0,program_old_psw+8 /* ilc adjustment */
29 llgc %r1,ilc
30 sgr %r0,%r1
31 larl %r1,mc_monitor_event /* dispatch based on old PSW */
32 cgrje %r0,%r1,pgm_monitor_event
33 larl %r1,mc_specification
34 cgrje %r0,%r1,pgm_specification
35 j failure
36 pgm_monitor_event:
37 chhsi program_interruption_code,0x40 /* monitor event? */
38 jne failure
39 chhsi monitor_class,1 /* class from mc_monitor_event? */
40 jne failure
41 cghsi monitor_code,321 /* code from mc_monitor_event? */
42 jne failure
43 j mc_specification /* next test */
44 pgm_specification:
45 chhsi program_interruption_code,6 /* specification exception? */
46 jne failure
47 lpswe success_psw
48 failure:
49 lpswe failure_psw
50 .align 8
51 c8:
52 .quad 0
53 success_psw:
54 .quad 0x2000000000000,0xfff /* see is_special_wait_psw() */
55 failure_psw:
56 .quad 0x2000000000000,0 /* disabled wait */