home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hall of Fame
/
HallofFameCDROM.cdr
/
3x400
/
addlibl.lzh
/
BINCVT.ARC
/
CPP2051.RPG
< prev
Wrap
Text File
|
1985-12-02
|
1KB
|
21 lines
I/TITLE Convert a 2-byte or 4-byte binary value to decimal.
I* Program - CPP2051
I* CPP for - BINCVT
IBIN DS
I B 01 020LENGTH
I B 03 040B2
I B 03 060B4
C *ENTRY PLIST
C PARM BIN Binary input
C PARM VALUE 150 Decimal output
C LENGTH IFEQ 2 If 2-byte value
C Z-ADDB2 VALUE Convert to dec.
C ELSE
C LENGTH IFEQ 4 If 4-byte value
C Z-ADDB4 VALUE Convert to dec.
C ELSE If neither,
C Z-ADD0 VALUE Then ZAP value.
C END
C END
C MOVE '1' *INLR