Improving giscus for Microcontroller & Embedded Projects #1681
Closed
CamilaDziubat
started this conversation in
Ideas
Replies: 1 comment
-
|
The markdown is rendered by GitHub, so there isn't anything giscus-specific here. Best you can do is making sure you add the language (e.g. ```asm
; ----------------------------------------------------------------------------------------
; Writes "Hello, World" to the console using only system calls. Runs on 64-bit Linux only.
; To assemble and run:
;
; nasm -felf64 hello.asm && ld hello.o && ./a.out
; ----------------------------------------------------------------------------------------
global _start
section .text
_start: mov rax, 1 ; system call for write
mov rdi, 1 ; file handle 1 is stdout
mov rsi, message ; address of string to output
mov rdx, 13 ; number of bytes
syscall ; invoke operating system to do the write
mov rax, 60 ; system call for exit
xor rdi, rdi ; exit code 0
syscall ; invoke operating system to exit
section .data
message: db "Hello, World", 10 ; note the newline at the end
```Result: ; ----------------------------------------------------------------------------------------
; Writes "Hello, World" to the console using only system calls. Runs on 64-bit Linux only.
; To assemble and run:
;
; nasm -felf64 hello.asm && ld hello.o && ./a.out
; ----------------------------------------------------------------------------------------
global _start
section .text
_start: mov rax, 1 ; system call for write
mov rdi, 1 ; file handle 1 is stdout
mov rsi, message ; address of string to output
mov rdx, 13 ; number of bytes
syscall ; invoke operating system to do the write
mov rax, 60 ; system call for exit
xor rdi, rdi ; exit code 0
syscall ; invoke operating system to exit
section .data
message: db "Hello, World", 10 ; note the newline at the end |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi giscus team! 👋
I’m currently working with IAR Embedded Workbench and Assembly code (.asm) for microcontroller projects. I noticed that integrating code examples or discussions about embedded systems in GitHub Discussions can be challenging.
I would like to suggest or discuss:
Are there ways to improve giscus support for code snippets in Assembly or embedded languages?
Can we enhance syntax highlighting or formatting for .asm code inside Discussions?
Any tips for sharing microcontroller code effectively using giscus in public repositories?
I’d love to hear your thoughts and any best practices you recommend for developers working with embedded projects.
Thank you! 🙏
Beta Was this translation helpful? Give feedback.
All reactions