Bit&Byte operations : Register problems with StonyBrookModula-2 32-bit 
Author Message
 Bit&Byte operations : Register problems with StonyBrookModula-2 32-bit

Hello,
Does anyone have the following procedures for a 32-bit environment ? Or :
Could anyone give me a tip for creating them ?
I do have them for 16-bit (written in Assembler !), but they don't function
in a 32-bit environment.

1) Clear( at   : ADDRESS;
       size : CARDINAL );
    (* Move size bytes with 0 on address 'at' *)

2) MoveBytes( to,
           from : ADDRESS;
           size : CARDINAL );
   (* Moves size bytes starting at 'from' to address 'to' *)

3) MoveBytesForward( to,
                  from : ADDRESS;
                  size : CARDINAL );
   (* Moves size bytes starting at address 'from' to address 'from'+size *)

4) MoveBytesBackward( to,
                   from : ADDRESS;
                   size : CARDINAL);
   (* Moves size bytes starting at 'from'+size to address 'from' *)

5) Fill( at     : ADDRESS ;
      totSz  : CARDINAL;
      fillup : ADDRESS ;
      fillSz : CARDINAL );
   (* Move fillSz bytes from 'fillup' to address 'at' for complete size
totSz;
   'at' will be completely filled up with 'fillup' *)

6) Compare( word1,
         word2 : ADDRESS;
         size  : CARDINAL ) : CARDINAL;
   (* Check first size bytes from 'word1' with the first size bytes from
'word2' *)

7) Locate( Word     : ADDRESS ;
        WordLen  : CARDINAL;
        bytes    : ADDRESS ;
        NumBytes : CARDINAL ) : CARDINAL;
   (* Find bytes (with length NumBytes) in Word (Length WordLen) and return
the
   starting position *)

Thanks for any help.



Mon, 22 Jan 2001 03:00:00 GMT  
 Bit&Byte operations : Register problems with StonyBrookModula-2 32-bit
Your subject title implies you are a Stony Brook User. Look at the MemUtils
module.

--
Norman Black
Stony Brook Software
To reply via email remove the ".dud" from my address.

Quote:

>Hello,
>Does anyone have the following procedures for a 32-bit environment ? Or :
>Could anyone give me a tip for creating them ?
>I do have them for 16-bit (written in Assembler !), but they don't function
>in a 32-bit environment.

>1) Clear( at   : ADDRESS;
>       size : CARDINAL );
>    (* Move size bytes with 0 on address 'at' *)

>2) MoveBytes( to,
>           from : ADDRESS;
>           size : CARDINAL );
>   (* Moves size bytes starting at 'from' to address 'to' *)

>3) MoveBytesForward( to,
>                  from : ADDRESS;
>                  size : CARDINAL );
>   (* Moves size bytes starting at address 'from' to address 'from'+size *)

>4) MoveBytesBackward( to,
>                   from : ADDRESS;
>                   size : CARDINAL);
>   (* Moves size bytes starting at 'from'+size to address 'from' *)

>5) Fill( at     : ADDRESS ;
>      totSz  : CARDINAL;
>      fillup : ADDRESS ;
>      fillSz : CARDINAL );
>   (* Move fillSz bytes from 'fillup' to address 'at' for complete size
>totSz;
>   'at' will be completely filled up with 'fillup' *)

>6) Compare( word1,
>         word2 : ADDRESS;
>         size  : CARDINAL ) : CARDINAL;
>   (* Check first size bytes from 'word1' with the first size bytes from
>'word2' *)

>7) Locate( Word     : ADDRESS ;
>        WordLen  : CARDINAL;
>        bytes    : ADDRESS ;
>        NumBytes : CARDINAL ) : CARDINAL;
>   (* Find bytes (with length NumBytes) in Word (Length WordLen) and return
>the
>   starting position *)

>Thanks for any help.



Mon, 22 Jan 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Bit&Byte operations : Register problems with StonyBrookModula-2 32-bit

2. Division 32-Bit/32-Bit with 16-Bit Register

3. 32-bit bin2ascii with 16-bit registers

4. Errors: cannot use 16-bit register with a 32-bit address

5. 32-bit bin2ascii with 16-bit registers

6. Changing bit order in 32-bit register

7. Building 32 bit DLL from 32 bit EXE

8. 32 Bit ASM from 32 Bit Windows COBOL

9. 32 Bit ASM from 32 Bit Windows COBOL

10. Calling 32-bit FORTRAN dlls from 32-bit VB

11. top 32 bits of 64-bit product of two 32-bit integers

12. 32-bit ST/V outruns 32-bit ST80 on Intel

 

 
Powered by phpBB® Forum Software