l3tol or ltol3 Subroutine

Purpose

Converts between 3-byte integers and long integers.

Library

Standard C Library (libc.a)

Syntax

void l3tol ( LongPointer,  CharacterPointer,  Number)
long *LongPointer;
char *CharacterPointer;
int Number;

void ltol3 (CharacterPointer, LongPointer, Number)
char *CharacterPointer;
long *LongPointer;
int Number;

Description

The l3tol subroutine converts a list of the number of 3-byte integers specified by the Number parameter packed into a character string pointed to by the CharacterPointer parameter into a list of long integers pointed to by the LongPointer parameter.

The ltol3 subroutine performs the reverse conversion, from long integers (the LongPointer parameter) to 3-byte integers (the CharacterPointer parameter).

These functions are useful for file system maintenance where the block numbers are 3 bytes long.

Parameters

Item Description
LongPointer Specifies the address of a list of long integers.
CharacterPointer Specifies the address of a list of 3-byte integers.
Number Specifies the number of list elements to convert.