Похожие чаты

How do I return current rax register value?

7 ответов

3 просмотра

Really? You are programming in C++ to deal with registers?

You can use inline asm for that in gcc, clang and nvcc at the very least

Nils- Автор вопроса
Danya🔥
Really? You are programming in C++ to deal with re...

I am programming in C right now without any stdlibs and I need to call OS

Nils- Автор вопроса
rc_05
Use inline assembly then

#define SYSCALL(id) ret; __asm__ volatile("syscall" : "=a"(ret) : "a"(id) : "memory"); return ret // Syscalls ssize_t write(int fd, const void *buf, size_t count) { ssize_t SYSCALL(1); } void *mmap(void *addr, size_t length, int prot, int flags, int fd, size_t offset) { void *SYSCALL(9); }

Nils- Автор вопроса

Похожие вопросы

Обсуждают сегодня

Hi everyone! I have a two-folded message to share today. First: updates and news, as we are being asked for those. We still want to go like we did the last 6 years: we w...
Marten | Unibright.io
31
комрады, че-та лыжы не едут var tmpFont: TFont; begin tmpFont:= TFont.Create; try case rgFontColor.ItemIndex of 0: tmpFont.Color:= clWindowText; 1: tmpFo...
Ed Doc
34
Интересно, нет ли какого-то способа получить из dll не адрес самой метки, а адрес со смещением?
The Bird of Hermes
54
generic procedure function test<T>(param: T); type case T of longint: NewT = word; longword: NewT = byte; end; var v1: NewT; Как это можно сделать? Чтобы у меня...
notme
21
Guys, mexc or gate.io (only exchanges with the token I need, unfortunately): depositing xmr, not withdrawing, is safe rn, or can fall for shotgun kyc? (I heard gate is alread...
another one bites the dust
20
Whoa, did you guys see this FUNToken Seed Grant announcement? 💸
Noah Noure
37
Делал задачу вот такую https://stepik.org/lesson/4985/step/9?unit=1083 получилось такое https://play.haskell.org/saved/ipKrepqe оно работает, тестов много не писал, но работае...
Fedor
22
The cynical view of ETFs in crypto is that it denotes the capture of the industry leading projects like Bitcoin by legacy/establishment infrastructure. A glass half full (or ...
ZecMec 21
1
hello guys, I have a laptop, if you connect wired headphones, the sound will come from the headphones and the built-in speakers AT THE SAME TIME. How can I make the sound com...
El Pepe
21
[xnewbie.] buy and sell order book ergo on gate io, is a fake order.. actually there is not as much ERG liquidity as displayed. when you make a market buy or market sell accor...
DiscordBridge
5
Карта сайта