32-bit

run 32 bit assembly on 64 bit processor with mac os x

元气小坏坏 提交于 2019-12-01 12:13:40
I have a problem with running 32 bit assembly on my 64 bit mac running os x 10.9.5. I also have NASM 2.11.08 installed. I am currently reading Assembly Language Step by Step by Jeff Duntemann. In the book he specifies instructions for 32 bit assembly on a linux operating system. How can I run this program on my 64 bit mac os x computer. ; eatsyscall.asm SECTION .data ; Section containing initialised data EatMsg: db "Eat at Joes!",10 EatLen: equ $-EatMsg SECTION .bss ; Section containing uninitialized data SECTION .text ; Section containing code global _start ; Linker needs this to find the

Converting byte-stream into numeric data-type

做~自己de王妃 提交于 2019-12-01 11:23:36
问题 Let's say I have a byte-stream in which I know the location of a 64-bit value (a 64-bit nonce). The byte-order is Little-Endian. As PHP's integer data-type is limited to 32-bit (at least on 32-bit operating systems) how would I convert the byte-sequence into a PHP numeric representation (float would be sufficient I think)? $serverChallenge = substr($bytes, 24, 8); // $serverChallenge now contains the byte-sequence // of which I know that it's a 64-bit value 回答1: Just looked up the code for

C# System.Diagnostics.Process: can't launch a 32 bit exe file in 64 bit OS

空扰寡人 提交于 2019-12-01 09:18:39
I have a 32 bit exe file compiled with Turbo Pascal. I need to launch it. It worked well when I had Windows 7 32 bit, but now I'm on Windows 7 64 bit, and I get the following exception: The specified executable is not a valid application for this OS platform. To make sure it works on 32 bit systems, I launched the C# program in a 32 bit platform - it works. So how can I launch a 32 bit exe file in 64 bit OS? Thanks Turbo Pascal could only generate 16-bit code, there was never a version that could create 32-bit executables. Running 16-bit code requires a virtual machine that uses the real-mode

Rules-of-thumb for minimising floating-point errors in C?

点点圈 提交于 2019-12-01 09:16:17
Regarding minimising the error in floating-point operations, if I have an operation such as the following in C: float a = 123.456; float b = 456.789; float r = 0.12345; a = a - (r * b); Will the result of the calculation change if I split the multiplication and subtraction steps out, i.e.: float c = r * b; a = a - c; I am wondering whether a CPU would then treat these calculations differently and thereby the error may be smaller in one case? If not, which I presume anyway, are there any good rules-of-thumb to mitigate against floating-point error? Can I massage data in a way that will help?

C# System.Diagnostics.Process: can't launch a 32 bit exe file in 64 bit OS

你离开我真会死。 提交于 2019-12-01 07:09:14
问题 I have a 32 bit exe file compiled with Turbo Pascal. I need to launch it. It worked well when I had Windows 7 32 bit, but now I'm on Windows 7 64 bit, and I get the following exception: The specified executable is not a valid application for this OS platform. To make sure it works on 32 bit systems, I launched the C# program in a 32 bit platform - it works. So how can I launch a 32 bit exe file in 64 bit OS? Thanks 回答1: Turbo Pascal could only generate 16-bit code, there was never a version

How to allow 32 bit apps on 64 bit windows to execute 64 bit apps provided in Windows\\System32

£可爱£侵袭症+ 提交于 2019-12-01 06:40:45
Say you have an app, that you want to provide users ability to browse the system32 directory and execute programs in (like telnet). What is the best method for supporting this when you need to support XP onwards as a client and 2k onwards for server? Having written all this up I wonder if it's just too much time/effort in providing a browse to do this, where they could just copy it from explorer. Still requires ability to launch. I have found some discussion on Nynaeve . So far it seems there are the following options Create a sysnative folder in windows which will allow you to browse/execute

Adding 32 bit floating point numbers.

帅比萌擦擦* 提交于 2019-12-01 06:39:07
问题 I'm learning more then I ever wanted to know about Floating point numbers. Lets say I needed to add: 1 10000000 00000000000000000000000 1 01111000 11111000000000000000000 2’s complement form. The first bit is the sign, the next 8 bits are the exponent and the last 23 bits are the mantisa. Without doing a conversion to scientific notation, how do I add these two numbers? Can you walk through it step by step? any good resources for this stuff? Videos and practice examples would be great. 回答1:

Rules-of-thumb for minimising floating-point errors in C?

霸气de小男生 提交于 2019-12-01 05:38:52
问题 Regarding minimising the error in floating-point operations, if I have an operation such as the following in C: float a = 123.456; float b = 456.789; float r = 0.12345; a = a - (r * b); Will the result of the calculation change if I split the multiplication and subtraction steps out, i.e.: float c = r * b; a = a - c; I am wondering whether a CPU would then treat these calculations differently and thereby the error may be smaller in one case? If not, which I presume anyway, are there any good

How to allow 32 bit apps on 64 bit windows to execute 64 bit apps provided in Windows\System32

烈酒焚心 提交于 2019-12-01 04:32:34
问题 Say you have an app, that you want to provide users ability to browse the system32 directory and execute programs in (like telnet). What is the best method for supporting this when you need to support XP onwards as a client and 2k onwards for server? Having written all this up I wonder if it's just too much time/effort in providing a browse to do this, where they could just copy it from explorer. Still requires ability to launch. I have found some discussion on Nynaeve. So far it seems there

Can a 32-bit processor really address 2^32 memory locations?

孤者浪人 提交于 2019-12-01 03:56:05
I feel this might be a weird/stupid question, but here goes... In the question Is NULL in C required/defined to be zero? , it has been established that the NULL pointer points to an unaddressable memory location, and also that NULL is 0 . Now, supposedly a 32-bit processor can address 2^32 memory locations. 2^32 is only the number of distinct numbers that can be represented using 32 bits. Among those numbers is 0 . But since 0 , that is, NULL , is supposed to point to nothing, shouldn't we say that a 32-bit processor can only address 2^32 - 1 memory locations (because the 0 is not supposed to