FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
java-samples/PeekOSMemory.java at master · zsystems/java-samples · GitHub
zsystems
/
java-samples
Public
Notifications
You must be signed in to change notification settings
Fork
20
Star
35
Code
Issues
4
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
java-samples
/
PeekOSMemory.java
Copy path
More file actions
More file actions
Latest commit
History
History
History
41 lines (37 loc) · 1.48 KB
Breadcrumbs
java-samples
/
PeekOSMemory.java
Copy path
File metadata and controls
41 lines (37 loc) · 1.48 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
33
34
35
36
37
38
39
40
41
/*
* %Z%%W% %I%
*
* =========================================================================
* Licensed Materials - Property of IBM
* "Restricted Materials of IBM"
* (C) Copyright IBM Corp. 2005. All Rights Reserved
*
* DISCLAIMER:
* The following [enclosed] code is sample code created by IBM
* Corporation. This sample code is not part of any standard IBM product
* and is provided to you solely for the purpose of assisting you in the
* development of your applications. The code is provided 'AS IS',
* without warranty of any kind. IBM shall not be liable for any damages
* arising out of your use of the sample code, even if they have been
* advised of the possibility of such damages.
* =========================================================================
*/
package
com
.
ibm
.
jzos
.
sample
;
import
com
.
ibm
.
jzos
.
ByteUtil
;
import
com
.
ibm
.
jzos
.
ZUtil
;
/**
* Sample program that dumps 500 bytes from the CVT to System.out
* <p>
* @see com.ibm.jzos.ZUtil#peekOSMemory(long, int)
* @see com.ibm.jzos.ZUtil#peekOSMemory(long, byte[])
* @see com.ibm.jzos.ByteUtil#dumpHex(String, byte[], OutputStream)
*/
public
class
PeekOSMemory
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
byte
[]
ba
=
new
byte
[
500
];
long
pPSA
=
0L
;
long
pCVT
=
ZUtil
.
peekOSMemory
(
pPSA
+
16
,
4
);
// get address of CVT from PSA+16
ZUtil
.
peekOSMemory
(
pCVT
,
ba
);
// get bytes from the CVT
ByteUtil
.
dumpHex
(
"CVT:"
,
ba
,
System
.
out
);
// dump the bytes in hex
}
}
Back
|
FazBrowse Home
|
New Git URL