Skip to content
Advertisement

Tag: assembly

Is there a way of coding IBM’s BAL on ZLinux?

I am trying to learn IBM’s basic assembly language and I was wondering if there was a way of assembling BAL code on a Linux guest running on a mainframe? I have nasm and as installed, but I think these are normally used for Intel processors rather than Z. Answer There is a tool chain in Linux so that you

How to link C language libraries?

I am interested in executing a function which is written in C language:- I want to call this fun() through assembly language which i have written:- (NASM 64bit) I have created object file by using these commands nasm -f elf64 MyAsm.asm and gcc -c CLang.c. When I merge these two file with gcc gcc MyASM.o CLang.o i get an error

What are the correct permissions while “sys_open”ing a file?

I am trying to read the contents of a file using x86 assembly on Linux. The question is, what we should put into edx – the “permissions” register for sys_open. I’ve used open() of C before; but there wasn’t any “permissions” field. I am trying to read a file belongs to the same owner of the executable. The file’s permissions

Segmentation fault when using memory with custom ELF file

I am trying to program a small ELF program with a custom ELF header but have a segmentation fault whenever i am writing to memory. Why would that code trigger a segmentation fault ? %assign LOAD_ADDRESS 0x08048000 BITS 32 org LOAD_ADDRESS ; load address ehdr: ; Elf32_Ehdr db 0x7F, “ELF”, 1, 1, 1 ; e_ident times 9 db 0 ;

Interpreting basic ARM instructions

I have been a set few questions, one of them is: Which of these ARM instructions clears register r5, so that all of it’s bits are set to ’0’? From my understanding sub r5, r5, r5 clears the register as it subtracts the number from itself. The and and eor ones clearly look wrong. Does the lsr r5, #32 also

Advertisement