Comments (7)
It is not a bug, it is a feature. To perform input in a program you should enter a text before running a program.
from sasm.
You can find a description of the library on the site http://dman95.github.io/SASM/english.html
In brief, macros determine a type of the arguments and call an according code, in which C library functions are used.
from sasm.
I've already seen the docs from the link you given.
I need something else: at least I need info on how to make basic IO functions work.
Eg. I've written the following code:
format ELF
extrn _printf
section '.text' executable
public _main
_main:
push message
call _printf
xor eax, eax
ret
message db 'Hello!', 0
It is compiled successfully with fasm from sasm, but when I try to run it, it prints nothing.
from sasm.
I've finally found helloworld for fasm in the directory of sasm, it works fine, so I will try to use it as a reference.
from sasm.
printf, puts are working, but I failed to make work scanf - it just passes through it without waiting of input.
P.S. It actually works, but it doesn't wait for input (as I expected), and just reads from the input window. Here's an example of working code:
format ELF
section '.data' writeable
num dd 0
format_str db "%d", 0
section '.text' executable
public _main
extrn _printf
extrn _scanf
_main:
mov ebp, esp; for correct debugging
push num
push format_str
call _scanf
add esp, 8
push [num]
push format_str
call _printf
add esp, 8
xor eax, eax
ret
from sasm.
There are many libraries that have already been made for other assemblers. Look up FreshLib for a fasm macro library.
from sasm.
@ThomasThelen, the request was not about libraries for fasm in general. It was limited to rewriting existing io.inc file, which works with nasm, to the syntax of fasm.
Personally I don't need such include file for using in my projects, but I think it would be useful for some people for educational purposes.
from sasm.
Related Issues (20)
- An error has occurred in the debugger. Please check the names of the sections. HOT 2
- How do you get SASM to save a .lst file?
- my SASM could not show the registers view HOT 1
- Debbugger ASCII addon HOT 1
- couldnt work on macos HOT 1
- windows11 sasm "Unable to start assembler. Check your settings." HOT 2
- Debug mode / Functions C do not work HOT 1
- install_binfile error MacOS HOT 1
- I created a kind of "dark theme" HOT 3
- Unable to link & call 32-bit Windows APIs using GAS Mode
- SASM won't build simple hello.asm file on Archlinux64
- Compile error when running make command HOT 3
- error:"QString::arg: Argument missing: p 0 , /tmp/SASM/input.txt" on Ubuntu 22.04
- Attempting to compile and link very simple code on a Raspberry Pi 400 HOT 2
- Where do the object and executable files get created? HOT 1
- Allow for other source code filetypes HOT 5
- Not full functionality in version 3.14.0. for Windows HOT 1
- Wrong variable or address
- Text edit don't work correctly in DebugMode
- CMake support for building
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sasm.