Read from the file mov rax, mov rdi, mov rsi, mov rdx, syscall ; SYS_read qword [fileDescr] readBuffer BUFF_SIZE ; print

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
correctanswer
Posts: 43759
Joined: Sat Aug 07, 2021 7:38 am

Read from the file mov rax, mov rdi, mov rsi, mov rdx, syscall ; SYS_read qword [fileDescr] readBuffer BUFF_SIZE ; print

Post by correctanswer »

Read From The File Mov Rax Mov Rdi Mov Rsi Mov Rdx Syscall Sys Read Qword Filedescr Readbuffer Buff Size Print 1
Read From The File Mov Rax Mov Rdi Mov Rsi Mov Rdx Syscall Sys Read Qword Filedescr Readbuffer Buff Size Print 1 (76.45 KiB) Viewed 58 times
Read from the file mov rax, mov rdi, mov rsi, mov rdx, syscall ; SYS_read qword [fileDescr] readBuffer BUFF_SIZE ; print the buffer ; add null for the print string mov rsi, mov byte [rsi+rax], NULL mov rdi, call printString printNewLine Close the file mov rax, SYS_close mov rdi, qword [fileDescr] syscall Program done readBuffer readBuffer I
Register for solutions, replies, and use board search function. Answer Happy Forum is an archive of questions covering all technical subjects across the Internet.
Post Reply