Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/theluqmn/console.asm
Several subroutines to ease CLI developments using NASM-assembled x86 64-bit assembly.
https://github.com/theluqmn/console.asm
asm asmx86 assembly assembly-language assembly-x86 subroutines
Last synced: about 17 hours ago
JSON representation
Several subroutines to ease CLI developments using NASM-assembled x86 64-bit assembly.
- Host: GitHub
- URL: https://github.com/theluqmn/console.asm
- Owner: theluqmn
- Created: 2024-05-19T03:32:03.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-05-19T03:32:07.000Z (4 months ago)
- Last Synced: 2024-09-24T22:57:08.514Z (about 22 hours ago)
- Topics: asm, asmx86, assembly, assembly-language, assembly-x86, subroutines
- Language: Assembly
- Homepage:
- Size: 1000 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Console.asm
**Assembled using the [NASM](https://www.nasm.us/) assembler, x86 64-bit.**
## Available functions
Please note that the code examples shown below are only to demostrate the usage of the subroutines, and may not necessarily include all the required script, variables and subroutines to create a functioning program.
### `_console_get`
Console read mode, input value is stored in the `value` variable, inside `section .bss`.
Example usage:
```asm
.section data
message: dd "What is your name: "
.section text
; using the _console_out subroutine to print the message
mov rax, message ; store message in rax register
call _console_out ; call the subroutine to print out the message; reading the input from the console
call _console_get ; call the subroutine to read the input
mov rax, input ; store the input in rax register
call _console_out ; call the subroutine to print out the input
```### `_console_out`
Prints out a message (stored in the `rax` register) to the console, **creation** of a new line.
Example usage:
```asm
.section data
message: dd "Hello, world!" ; message to be printed
.section text
mov rax, message ; store message in rax register
call _console_out ; call the subroutine
```### `_console_space`
Moves the console to a new line.
Example usage:
```asm
.section data
message: dd "Enter your name: " ; mess
```### `_exit`
Exits the program.
```asm
call _exit
```