Isa

Results 14 comments of Isa

Could Zig start supporting Intel's assembler syntax like LLVM's clang does? You can see an example of how I use it[ here.](https://github.com/isoux/4RING_OS/blob/main/boot/load_grub2.c#L94-L118) These are the options I add to clang...

That's right man. I got an [answer](https://discord.com/channels/605571803288698900/751157713135730761/1076061143237414942) that can partially help me for Zig... Like this: ``` asm volatile( \\.intel_syntax noprefix \\mov rax, rbx \\lea rax, [rax + 10] );...

I think this is a [simpler](https://github.com/isoux/BareMetal/commit/797f20d7e891bf2ed8862ead22205b9e9f50194a) solution, without introducing new jmp and ret instructions... Always save the index of the called function (in memory) and use it only when needed?...

You're right, I didn't know or think about that. I will work to suggest another solution...

I think this [proposal](https://github.com/ReturnInfinity/BareMetal/pull/85/commits/880b1eabb5249dfbeec6116b4a2fedbad312649a) is acceptable. Yes, it is slightly slower due to function calls, but the code is more elegant. ... My initial idea was like this to call...

Another [solution](https://github.com/ReturnInfinity/BareMetal/pull/85/commits/acb47ec53eecffbf76888045cf25eee110a3c281): call function from the stack! No more taking RCX reg at stack (just inside the functions). Just one rygly thing: variable for empting the stack...

IF ``` cmp rcx, 0xFF jg b_system_end ``` THEN ``` b_system_end: pop rcx ret ``` How are you going to POP RCX when you don't PUSH it anywhere for the...

No problem! What are you saying for > Another [solution](https://github.com/ReturnInfinity/BareMetal/pull/85/commits/acb47ec53eecffbf76888045cf25eee110a3c281): call function from the stack! No more taking RCX reg at stack (just inside the functions). > > Just one...

Great, If the final code is merged in your branch and if you agree I will copy it and do another final PR I would like to be merged it...