| 1 |
*> { dg-do run } |
| 2 |
*> { dg-output-file "group2/Complex_HEX__VALUE_and_MOVE.out" } |
| 3 |
|
| 4 |
identification division. |
| 5 |
program-id. hex-init. |
| 6 |
data division. |
| 7 |
working-storage section. |
| 8 |
01 var-01020304. |
| 9 |
05 filler1. |
| 10 |
10 filler2 pic x(2) VALUE "33". |
| 11 |
10 as-value pic x(4) VALUE X'01020304'. |
| 12 |
10 filler3 pic x(2) VALUE "33". |
| 13 |
05 as-pointer redefines filler1 usage pointer. |
| 14 |
|
| 15 |
01 var-low. |
| 16 |
05 filler1. |
| 17 |
10 filler2 pic x(2) VALUE "33". |
| 18 |
10 as-value pic x(4) VALUE LOW-VALUES. |
| 19 |
10 filler3 pic x(2) VALUE "33". |
| 20 |
05 as-pointer redefines filler1 usage pointer. |
| 21 |
01 var-space. |
| 22 |
05 filler1. |
| 23 |
10 filler2 pic x(2) VALUE "33". |
| 24 |
10 as-value pic x(4) VALUE SPACE. |
| 25 |
10 filler3 pic x(2) VALUE "33". |
| 26 |
05 as-pointer redefines filler1 usage pointer. |
| 27 |
01 var-quote. |
| 28 |
05 filler1. |
| 29 |
10 filler2 pic x(2) VALUE "33". |
| 30 |
10 as-value pic x(4) VALUE QUOTE. |
| 31 |
10 filler3 pic x(2) VALUE "33". |
| 32 |
05 as-pointer redefines filler1 usage pointer. |
| 33 |
01 var-zero. |
| 34 |
05 filler1. |
| 35 |
10 filler2 pic x(2) VALUE "33". |
| 36 |
10 as-value pic x(4) VALUE ZERO. |
| 37 |
10 filler3 pic x(2) VALUE "33". |
| 38 |
05 as-pointer redefines filler1 usage pointer. |
| 39 |
01 var-high. |
| 40 |
05 filler1. |
| 41 |
10 filler2 pic x(2) VALUE "33". |
| 42 |
10 as-value pic x(4) VALUE HIGH-VALUES. |
| 43 |
10 filler3 pic x(2) VALUE "33". |
| 44 |
05 as-pointer redefines filler1 usage pointer. |
| 45 |
01 move-target. |
| 46 |
05 filler1. |
| 47 |
10 filler2 pic x(2) VALUE "33". |
| 48 |
10 as-value pic x(4) VALUE "3333". |
| 49 |
10 filler3 pic x(2) VALUE "33". |
| 50 |
05 as-pointer redefines filler1 usage pointer. |
| 51 |
procedure division. |
| 52 |
display "the value is " as-pointer of var-01020304. |
| 53 |
display "should be 0x3333040302013333" |
| 54 |
display "var-low : " as-pointer of var-low |
| 55 |
display "var-space: " as-pointer of var-space |
| 56 |
display "var-quote: " as-pointer of var-quote |
| 57 |
display "var-zero : " as-pointer of var-zero |
| 58 |
display "var-high : " as-pointer of var-high |
| 59 |
display "initial " as-pointer of move-target |
| 60 |
move low-value to as-value of move-target |
| 61 |
display "low-value " as-pointer of move-target |
| 62 |
move space to as-value of move-target |
| 63 |
display "space " as-pointer of move-target |
| 64 |
move quote to as-value of move-target |
| 65 |
display "quote " as-pointer of move-target |
| 66 |
move zeroes to as-value of move-target |
| 67 |
display "zeroes " as-pointer of move-target |
| 68 |
move high-value to as-value of move-target |
| 69 |
display "high-value " as-pointer of move-target |
| 70 |
move X'01020304' to as-value of move-target |
| 71 |
display "01020304 " as-pointer of move-target |
| 72 |
move "33333333" to move-target |
| 73 |
move X'00' to filler3 of move-target(1:1) |
| 74 |
display "ref-mod " as-pointer of move-target |
| 75 |
stop run. |
| 76 |
|