Asciinema: asciinema
macro.asm
: This file contains macros used within the assembly program.
-
open_file
,read_file
,write_file
,close_file
,seek_file
,write_stdout
,write_one_byte
,write_newline
,read_stdin
: These functions are imported from external sources to perform file operations, standard input/output operations, and seek operations. -
init_args
,get_argc
,get_argv
,get_arg
: These functions are used to handle command-line arguments. -
strlen
,strcmp
,itoa
: These functions are used for string manipulation.
-
BUFFER_SIZE
: Defines the size of the buffer used for reading files. -
Open flags (
O_RDONLY
,O_WRONLY
): Flags used for file opening mode. -
Seek flags (
SEEK_SET
,SEEK_CUR
,SEEK_END
): Flags used for seeking within files.
- Contains various messages used by the program, such as help messages, error messages, and prompts.
- Defines uninitialized memory for variables such as buffer, file descriptor, line number, and current file line count.
- Description: Displays the help message, including program usage and author information.
- Description: Entry point of the program. Processes command-line arguments and calls relevant functions based on the provided arguments.
- Description: Processes a single file. Opens the file, reads its content, displays line numbers, and handles pagination.
- Description: Determines the maximum line length in a file.
- Description: Displays lines from a file, handling pagination if necessary.
- Description: Retrieves the length of the next line in a file and seeks back to the original position.
- Description: Displays a single line from the buffer.
- Description: Fills the buffer with white spaces.
- Description: Handles pagination by prompting the user to read more lines or exit.
- Description: Exits the program with an error message in case of a segmentation fault.
- Description: Exits the program successfully.
- Description: Exits the program with a usage message if no files are provided.
- Description: Exits the program with an error message.