A simple 8086 Assembly language project that simulates a mini operating system utilities menu with three main features: a calculator, string reversal, and file information viewer. Designed for EMU8086.
-
Calculator
- Supports addition (+), subtraction (-), multiplication (*), and division (/).
- Handles single and double-digit results.
- Validates division by zero.
-
Reverse String
- Prompts the user to input a string (up to 50 characters).
- Outputs the string in reverse order.
-
File Info
- Reads a filename from the user.
- Opens the file and retrieves its size in bytes.
- Handles file-not-found errors.
- Works for files up to 65535 bytes.
-
Menu
- Clear screen on each option.
- Provides a simple text-based menu for navigation.
- Exit option to terminate the program.
- Assembly language (8086)
- EMU8086 emulator
- DOS interrupts (
int 21h) for input/output and file handling
- Open EMU8086.
- Create a new project and paste the assembly code (
.asmfile). - Assemble and run the program.
- Navigate using the menu:
- Press
1for Calculator. - Press
2to Reverse String. - Press
3for File Info. - Press
4to Exit.
- Press
- For file info, ensure the file exists in the MyBuild folder.
-
Calculator
- Uses registers
AL,CL,BLfor storing operands and operation. - Supports two-digit results using basic division/modulus logic.
- Uses registers
-
Reverse String
- Uses buffered input (0Ah).
- Correctly prints characters from the end to the start.
-
File Info
- Zero-terminates the filename buffer before calling DOS
3Dh. - Uses DOS function
42hto move the file pointer and get file size. - Prints file size using a 16-bit number-to-ASCII routine (
print_number16).
- Zero-terminates the filename buffer before calling DOS
-
Screen clearing
- Uses BIOS interrupt
10h / 03hto clear screen before displaying menu.
- Uses BIOS interrupt