mirror of
https://github.com/SEPPDROID/Digital-Research-Source-Code.git
synced 2025-10-22 16:04:18 +00:00
54 lines
1.9 KiB
Plaintext
54 lines
1.9 KiB
Plaintext
.TITLE COMP3. (UTIL-VAX Library Routine DECSIZ)
|
|
;-----------------------------------------------------------------------
|
|
;
|
|
; D I S C L A I M E R N O T I C E
|
|
; ------------------- -----------
|
|
;
|
|
; This document and/or portions of the material and data furnished
|
|
; herewith, was developed under sponsorship of the U. S. Government.
|
|
; Neither the U.S. nor the U.S.D.O.E., nor the Leland Stanford Junior
|
|
; University, nor their employees, nor their respective contractors,
|
|
; subcontractors, or their employees, makes any warranty, express or
|
|
; implied, or assumes any liability or responsibility for accuracy,
|
|
; completeness or usefulness of any information, apparatus, product
|
|
; or process disclosed, or represents that its use will not infringe
|
|
; privately-owned rights. Mention of any product, its manufacturer,
|
|
; or suppliers shall not, nor is it intended to, imply approval, dis-
|
|
; approval, or fitness for any particular use. The U. S. and the
|
|
; University at all times retain the right to use and disseminate same
|
|
; for any purpose whatsoever. Such distribution shall be made by the
|
|
; National Energy Software Center at the Argonne National Laboratory
|
|
; and only subject to the distributee furnishing satisfactory proof
|
|
; that he has a valid license from the Intel Corporation in effect.
|
|
;
|
|
;-----------------------------------------------------------------------
|
|
|
|
.PSECT UTIL_CODE,RD,NOWRT,EXE,GBL,CON,LONG
|
|
|
|
; DECSIZ: PROCEDURE (VALUE) BYTE PUBLIC;
|
|
; DECLARE VALUE ADDRESS;
|
|
; END DECSIZ;
|
|
|
|
.ENTRY DECSIZ,^M<>
|
|
MOVZWL 4(AP),R1
|
|
CMPW R1,#10
|
|
BGEQU 1$
|
|
MOVL #1,R0 ; 0-9: SIZE=1.
|
|
RET
|
|
1$: CMPW R1,#100
|
|
BGEQU 2$
|
|
MOVL #2,R0 ; 10-99: SIZE=2.
|
|
RET
|
|
2$: CMPW R1,#1000
|
|
BGEQU 3$
|
|
MOVL #3,R0 ; 100-999: SIZE=3.
|
|
RET
|
|
3$: CMPW R1,#10000
|
|
BGEQU 4$
|
|
MOVL #4,R0 ; 1000-9999: SIZE=4.
|
|
RET
|
|
4$: MOVL #5,R0 ; 10000-65536: SIZE=5.
|
|
RET
|
|
|
|
.END
|