I have to say your tutorials about assembly are really great. Somehow you manage to explain this topic better than any professor I ve had so far
@oneloveafrica886011 ай бұрын
I don't know why this channel still less than million subscriber .. it's the best channel I ever seen
@Alex-fn3go10 ай бұрын
Hi, you're doing such a great job by explaining thing so clearly. But I have a question, why did you define pathname as DD and not DB. I would expect it to fail with DD with reading chars, but it isn't. What am i lacking?
@Sam-dh7fr10 ай бұрын
By the way, you dont need to keep wrting stepi. Just do it one, then press enter after that
@nickeax6 ай бұрын
Thanks!
@Sam-dh7fr10 ай бұрын
pathname did not have a null terminator. Still, while debugging, it knew where it ended. Is it because memory after the last letter/byte was nulled/zeroed ?
@mdmostainbillah5399 Жыл бұрын
Super awesome ❤
@ethanxenon4044 ай бұрын
Thanks, I put the database file in the same directory as the program. It did not work, however when I reduced "pathname" to only the file name, the code worked. Is it only looking for a relative path?
@ethanxenon4044 ай бұрын
Well, works now. I probably got my path wrong, file descriptor was coming back -2 but is 3 now.
@vaishakvinayАй бұрын
It's showing -2 for me instead of 3
@ashwinsanthosh915411 ай бұрын
Amazing tutorials! There does seem to be an issue with the links provided though, all of them redirect to the same page.
@olivestemlearning11 ай бұрын
Thanks for letting me know! I've updated the links
@decb.7959 Жыл бұрын
One thing I am curious about is how the assembler / linker knows what the address of `pathname`, for example, will be. I'm also wondering why the addresses are so high and don't start at 0.
@olivestemlearning Жыл бұрын
Generally, all ELF programs will start at the same address, 0x08048000. When a process runs, the stack memory for the process is placed below the program instructions. Because the stack grows from high memory down to low memory, the program starts at a high address to provide space for stack growth. Regarding how the assembler knows what the address of pathname is, when the assembler assembles the code, it will place everything from the .data section into memory. When it does this, it keeps track of where the data was placed, then replaces the variable name with the memory location it corresponds with. The assembler will generally pick a fixed offset from the end of the program instructions to start placing data into memory