x86

The most correct way to refer to 32-bit and 64-bit versions of programs

青春壹個敷衍的年華 提交于 2021-01-27 20:32:23
问题 This question is about terminology for 32-bit vs. 64-bit x86. If I have 2 directories with source code of the same program - one for 32-bit Windows and another for 64-bit Windows, what will be the more correct names for these folders: x86-64 and x64 ? or IA-32 and x64 ? I already have read some web resources, but can't understand. Just for the record: https://superuser.com/questions/179919/x86-vs-x64-why-is-32-bit-called-x86 Difference between x86, x32, and x64 architectures? https://en

Assembly - Problems running a bootloader in bochs

∥☆過路亽.° 提交于 2021-01-27 20:22:37
问题 I am currently trying to compile and run a simple bootloader in bochs. Currently, this is my bootloader.asm file: [BITS 16] [ORG 0x7C00] ;Where the code gets mapped top: jmp top ;Loop forever times 510-($-$$) db 0 ;Pad with 0 dw 0xAA55 ;Bootloader signature (backwards) ;; dw declares a word (2 bytes because we’re 16 bits) From my pragmalinux-img directory I then type in the following commands: yasm bootloader.asm dd if=bootloader bs=512 bochs Upon running bochs I get the following error

How do I print an address in x86 NASM assembly language? [duplicate]

拜拜、爱过 提交于 2021-01-27 18:53:17
问题 This question already has answers here : How to convert a binary integer number to a hex string? (2 answers) Closed 1 year ago . I am trying to print address of variable in NASM x86 assembly. When I assemble this code it assembles fine, however when I run this code it prints two characters instead of the address. section .bss Address: RESB 4 section .data variable db 1 section .text global _start _start: mov eax , variable ; variable Address is stored in eax register mov [Address] , dword eax

Java environment does not start even in the control panel [closed]

混江龙づ霸主 提交于 2021-01-27 18:12:05
问题 Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 months ago . Improve this question I have this problem for some time but I have not been able to solve it, Java environment or JVM (sorry if I confuse both) just won't start, and programs like Jdownloader2 or Minecraft launcher do not start either, there is also no error message, even when I try

Assembly imul signed

依然范特西╮ 提交于 2021-01-27 17:51:56
问题 thx for help my question is about ax value received from code below? mov al,22h mov cl,0fdh imul cl Actual machine result: ff9a What I expected: 00:9a (by multiplying in binary) The first number is 22h so its 34 decimal its already unsigned the second number is fd in binary its goes like 11111101 so its signed that mean its like -3 so 22* -3 its 66; and -66 on signed 9a so why there is ff at the beginning 回答1: imul cl does AX = AL * CL , producing a full 16-bit signed product from 8-bit

What causes “x.asm:(.text+0xd): undefined reference to `y'”?

我们两清 提交于 2021-01-27 16:12:51
问题 For a long time I had not programmed with C and Assembler (about 2 years). Now I have decided to start again but I would like to do something much more complicated. I thought about creating a simple kernel. Now I found this source code on the internet: boot.asm: global loader extern kernel_main MAGIC equ 0xbad FLAGS equ 0x3 CHECKSUM equ -(MAGIC+FLAGS) section .text align 4 dd MAGIC dd FLAGS dd CHECKSUM loader: call kernel_main cli quit: hlt jmp quit kernel.c: void print(char *text) { char

What causes “x.asm:(.text+0xd): undefined reference to `y'”?

心不动则不痛 提交于 2021-01-27 16:10:43
问题 For a long time I had not programmed with C and Assembler (about 2 years). Now I have decided to start again but I would like to do something much more complicated. I thought about creating a simple kernel. Now I found this source code on the internet: boot.asm: global loader extern kernel_main MAGIC equ 0xbad FLAGS equ 0x3 CHECKSUM equ -(MAGIC+FLAGS) section .text align 4 dd MAGIC dd FLAGS dd CHECKSUM loader: call kernel_main cli quit: hlt jmp quit kernel.c: void print(char *text) { char

What causes “x.asm:(.text+0xd): undefined reference to `y'”?

匆匆过客 提交于 2021-01-27 15:52:24
问题 For a long time I had not programmed with C and Assembler (about 2 years). Now I have decided to start again but I would like to do something much more complicated. I thought about creating a simple kernel. Now I found this source code on the internet: boot.asm: global loader extern kernel_main MAGIC equ 0xbad FLAGS equ 0x3 CHECKSUM equ -(MAGIC+FLAGS) section .text align 4 dd MAGIC dd FLAGS dd CHECKSUM loader: call kernel_main cli quit: hlt jmp quit kernel.c: void print(char *text) { char

What causes “x.asm:(.text+0xd): undefined reference to `y'”?

限于喜欢 提交于 2021-01-27 14:57:16
问题 For a long time I had not programmed with C and Assembler (about 2 years). Now I have decided to start again but I would like to do something much more complicated. I thought about creating a simple kernel. Now I found this source code on the internet: boot.asm: global loader extern kernel_main MAGIC equ 0xbad FLAGS equ 0x3 CHECKSUM equ -(MAGIC+FLAGS) section .text align 4 dd MAGIC dd FLAGS dd CHECKSUM loader: call kernel_main cli quit: hlt jmp quit kernel.c: void print(char *text) { char

Compiler optimizations allowed via “int”, “least” and “fast” non-fixed width types C/C++

試著忘記壹切 提交于 2021-01-27 13:08:30
问题 Clearly, fixed-width integral types should be used when the size is important. However, I read (Insomniac Games style guide), that "int" should be preferred for loop counters / function args / return codes / ect when the size isn't important - the rationale given was that fixed-width types can preclude certain compiler optimizations. Now, I'd like to make a distinction between "compiler optimization" and "a more suitable typedef for the target architecture". The latter has global scope, and