Skip to main content

All Questions

Tagged with
1 vote
1 answer
50 views

My bootloader isn't printing after switching to Protected Mode

I'm trying to print the character "C" after switching to the Protected Mode, but it isn't working, and I don't know why. I'm using Assembly AT&T/GAS syntax Here is the code: .code16 ....
user avatar
1 vote
0 answers
55 views

Whis is this x86_64 AT&T assembly failing, i think foo: is the culprit?

Here is the assembly, I am using Windows 11. Assembling: as .\test.S -o test.out Linking: ld -o test.exe -subsys=console test.out -L "C:\TDM-GCC-64\x86_64-w64-mingw32\lib" -lmsvcrt When i ...
Mihir Patel's user avatar
0 votes
0 answers
100 views

cannot execute: required file not found, linking -lc wth ld command

So basically, I am working on a compiler ... long story short, I codegen and i want to use libc with the x86_64 AT&T Assembly. The object file is generated with 64bit elf architecture. I want to ...
Mihir Patel's user avatar
0 votes
0 answers
79 views

Problem with program in assembly x86 AT&T, division by repeated subtraction algorithm

I have a problem with my program. It should read from STDIN 32 bytes as divident, then next 32 bytes as divisor, after that it should divide divident by divisor using "division by repeated ...
Enumero's user avatar
1 vote
2 answers
42 views

Problem to convert from ASCII to integers in Assembly AT&T 32 bit

ASM newbie here. I'm trying to convert in ASM AT&T (32-bit version) the following ASCII text from ASCII to integer (skipping the commas (44 in ASCII) and newlines (10 in ASCII)): 1,10,2,2\n2,7,6,7\...
sobekan's user avatar
  • 11
2 votes
1 answer
74 views

GNU as: when to use '$'

After a long time I have to use the GNU assembler again. Ever since I had trouble with the '$'. The manual just says: 3.6.2.1 Integers A decimal integer starts with a non-zero digit followed by zero ...
vl106's user avatar
  • 61
1 vote
0 answers
48 views

GAS with AT&T syntax - creating a label by concatenating a variable of a macro

I have an assembly code that generates ISR (interrupt service routine) stubs. I want to automate this process, and for each of the interrupts (there are 256) generate it's own unique stub. This is ...
ThErOmAnEmPiRe's user avatar
1 vote
0 answers
52 views

x86 Assembly: handling exponent 1 in power calculation

I have this code I wrote in x86. The code does a power of the first number I'm pushing to the queue by the second one. Now all cases work as expected except one case that's when the second number ...
user16713791's user avatar
0 votes
1 answer
123 views

Breakpoints for assembly code in VSCode with GDB

I use xUbuntu 22.04.4 and the VSCode current version for linux (1.87.2) I want to set the debugging of a .s assembly (AT&T) file. I created a task.json and a launch.json file and allowed ...
Netchaiev's user avatar
  • 337
0 votes
0 answers
15 views

jle instruction failed to jump properly [duplicate]

I am writing a bubble sort algorithm, and here is my code, using AT&T format, x86-64. .section .data values: .int 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 .section .text .globl _start _start: movl $...
max huo's user avatar
1 vote
1 answer
34 views

Loading disk sector into memory (AT&T)

I want to load a sector into a memory address starting at (0xD000). I use index addressing to complete disk load with 0x13 BIOS interrupt. Using 16bit mode, BIOS, AT& Syntax assembly. I am having ...
CharlesTheZouch's user avatar
0 votes
0 answers
26 views

Are these two x86_64 assembly programs the same? [duplicate]

I'm on an Ubuntu 22.04 x86_64 system, kernel 6.5.0-15-generic. I'm learning how to make simple programs that make system calls by using GAS AT&T assembly format. My goal was to create a simple ...
Kode1000's user avatar
0 votes
1 answer
312 views

Hello World x86_64. Is this 100% correct?

I'm on an Ubuntu 22.04 x86_64 system, kernel 6.5.0-15-generic. I'm learning how to make simple programs that make system calls by using GAS AT&T assembly format. This assembly program is in the ...
Kode1000's user avatar
0 votes
1 answer
91 views

How do I go about creating a GAS AT&T format main assembly program that uses the syscall instruction to print "Hello World"?

I'm on a Linux x86_64 system and my goal is to create an assembly program inside the classic main function. I've tried this and it works fine : .code64 .section .rodata msg: .ascii "Hello, World!\...
Kode1000's user avatar
0 votes
0 answers
50 views

AT&T Assembly how to compare Strings from console

I have the string "-l" stored in a variable called lineSpace and I want to check if its equal to a value which I get from the console arguments. I try to get the first part of the argument ...
Keksemann's user avatar

15 30 50 per page
1
2 3 4 5
65