A simple yet functional Hospital Management System implemented in MIPS Assembly language, designed to run in the MARS simulator. This program demonstrates core assembly programming concepts while providing practical patient management functionality.
-
Patient Record Management:
- Add new patient records
- View all patient records
- Search for specific patients by ID
-
Patient Data Fields:
- Patient ID (unique identifier)
- Full name
- Age
- Gender (M/F)
- Medical diagnosis
-
User-Friendly Interface:
- Text-based menu system
- Clear input prompts
- Formatted output display
- MARS MIPS Simulator (v4.5 or later)
- Basic understanding of MIPS assembly language
-
Download the Assembly File:
git clone https://github.com/dawoodkhatri1/Hospital-management-system-using-assembly-language.git cd Hospital-management-system-using-assembly-language
-
Run in MARS:
- Launch MARS simulator
- Open
hospital.asm
(File → Open) - Assemble (F3)
- Run (F5)
-
Usage in the System:
- Hospital Management System a. Add Patient b. View All Patients c. Search Patient d. Exit
Choose option:
DATA SEGMENT
patients
: Array for patient records (10 max)patient_count
: Current patient countmenu_strings
: All interface text promptstemp_buffers
: Input buffers
TEXT SEGMENT
main
: Program entry point, menu loopadd_patient
: Patient creation logicview_patients
: Display all recordssearch_patient
: Find patient by IDexit_program
: Clean termination
HELPER FUNCTIONS
remove_newline
: String processingcopy_string
: Memory operationscompare_strings
: Search functionality
Hospital Management System
- Add Patient
- View All Patients
- Search Patient
- Exit
Choose option: 1
Enter Patient ID: P1001
Enter Patient Name: John Doe
Enter Patient Age: 35
Enter Patient Gender (M/F): M
Enter Diagnosis: Influenza
Patient added successfully!
Memory Layout: Each patient record occupies 40 bytes:
- ID: 8 bytes
- Name: 20 bytes
- Age: 4 bytes (word)
- Gender: 1 byte
- Diagnosis: 7 bytes
Limitations:
- Volatile storage (data lost on exit)
- Maximum 10 patients
- No persistent storage
- Add file I/O for data persistence
- Implement patient record editing
- Add appointment scheduling
- Expand to 100+ patient capacity
Contributions welcome! Please fork the repository and submit pull requests for:
- Bug fixes
- New features
- Documentation improvements
Note: This project was developed for educational purposes to demonstrate MIPS assembly programming concepts in a practical application context.