361 questions
1
vote
1
answer
119
views
Windows blocks my Assembly .exe's from running [closed]
I have recently started assembly programming and I have encountered an issue when assembling into an .exe file and then trying to run the program.
For context, I use the FASM assembler, and I use ...
1
vote
3
answers
169
views
How to force/specify a long jump in fasm?
I am doing some basic tests in fasm
I try to emulate a jump instruction in the reset location of 16 bit 8086 real mode:
$ cat bios.asm
; BIOS ROM START (64 KB ROM)
org 0xF0000
start:
mov ah, 0x0E
...
1
vote
1
answer
118
views
Hello World in real mode
I am trying to write a sample “Hello World” in real mode that will run in QEMU. The host is a 64 bits intel running FreeBSD 14.
I have tried the following:
This is boot.asm file:
format binary
org ...
-1
votes
1
answer
38
views
error else import32.inc with find files with FASM version 1.73.32
I try to find files with fasm version 1.73.32 , the source code can be found at this paste source code.
The error comes with : Unexpected instruction 'else' at line 99.
Any idea why this not work ?
...
0
votes
2
answers
130
views
Available registers for assembly "function"
I am using a typical x86-16 assembly random number generator, using the BIOS timer and the current milliseconds.
random_number:
mov ah, 00h ; interrupts to get system time
int 1Ah ; CX:DX now ...
1
vote
1
answer
177
views
"Guru Meditation" error in VBox with custom bootloader
I am trying to write bootloader for hobby OS. I use FASM, genisoimage (via WSL) and VirtualBox. VBox shows "Guru Meditation" error and it`s only 'M' letter on display. Here is a screenshot:
...
0
votes
1
answer
89
views
Cyrillic to upper function in fasm on linux
I have a part of code that compares 2 bytes in ax like one unicode UTF-8 symbol and converts it's to upper one, but amid Russian alphabet function doesn't work.
; first byte starts with 110
; and ...
0
votes
1
answer
78
views
FASM 64 bit exception on call winmm.dll
Calling any function from winmm.dll causes an exceptional error (0xc0000005).
format PE64 GUI 5.0
entry start
include 'win64a.inc'
section '.code' code readable executable
start:
invoke ...
1
vote
1
answer
239
views
How to load raylib font in assembly?
Problem:
I have computer science classes, we learn assembly using fasm, classes rely on win api, but i use linux so i've got approval to use external libraries.
I've chose Raylib.
Problem is that I ...
1
vote
0
answers
83
views
nmap doesnt see ip from my socket written in fasm
nmap doesn't see socket ip(192.168.0.17)
(assembly is fasm)
i tried with little endian,but it doesnt work anyway. probably trouble in addr and port
i wrote my code by help chromium os and i dont see ...
0
votes
0
answers
106
views
How to pass args from assembly to C function?
Using FASM, x86_64, Linux (Mint)
Passing args to C function
int arg_test(int argc, char *argv[]) {
// output number of args
printf("arg count: %d\n", argc);
printf("%s"...
4
votes
0
answers
126
views
FASM/NASM/GCC don't optimize [RBP + reg] addressing modes to use RBP as the index, costing an extra byte of code size?
I have assembled the (somewhat weird) instruction ADD EAX, DWORD PTR [RBP + RAX*1] with GCC, FASM and NASM. All of them produce the following suboptimal output
0: 03 44 05 00 add eax,...
1
vote
1
answer
78
views
How to set the register from the data from memory using the CMOVG instruction?
The problem is inside the Graphic subroutine at row 236. (4th, 13th and 16th row in sublabel .writePixel).
In this subroutine I browse the graphic pixel from 280 to 487 column and 368 to 385 row. (...
0
votes
1
answer
50
views
FASM assembler, clicking two shift keys at the same time and making capital letters
I have such a program in FASM assembler, I would like to make them capitalize when I enter the letters dfghjkl when I click the left shift and right shift at the same time, currently it works in such ...
1
vote
0
answers
90
views
output is not what was expected FASM BootLoader org 0x7c00
output is not what was expected FASM BootLoader org 0x7c00
use16
org 0x7c00
message db "Hello!"
len equ $ - message
BootLoader:
cli
xor ax, ax
mov ds, ax
mov ...