{"id":23561852,"url":"https://github.com/ahmedsobhy01/assembly-serial-chat","last_synced_at":"2025-05-16T02:30:29.291Z","repository":{"id":269588987,"uuid":"903825320","full_name":"AhmedSobhy01/assembly-serial-chat","owner":"AhmedSobhy01","description":"A simple chat application built for 8086 assembly that uses a serial communication (UART) interface to send and receive text. The program splits the screen into two parts for bi-directional messaging, allowing you to chat with another terminal via serial port.","archived":false,"fork":false,"pushed_at":"2024-12-27T17:15:53.000Z","size":493,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-17T15:51:53.430Z","etag":null,"topics":["8086","assembly","baud-rate","chat","masm","serial-communication","uart","x86-assembly"],"latest_commit_sha":null,"homepage":"","language":"Assembly","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AhmedSobhy01.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-15T16:50:04.000Z","updated_at":"2024-12-27T17:15:57.000Z","dependencies_parsed_at":"2024-12-24T17:27:42.525Z","dependency_job_id":null,"html_url":"https://github.com/AhmedSobhy01/assembly-serial-chat","commit_stats":null,"previous_names":["ahmedsobhy01/assembly-serial-chat"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AhmedSobhy01%2Fassembly-serial-chat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AhmedSobhy01%2Fassembly-serial-chat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AhmedSobhy01%2Fassembly-serial-chat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AhmedSobhy01%2Fassembly-serial-chat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AhmedSobhy01","download_url":"https://codeload.github.com/AhmedSobhy01/assembly-serial-chat/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254455626,"owners_count":22074019,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["8086","assembly","baud-rate","chat","masm","serial-communication","uart","x86-assembly"],"created_at":"2024-12-26T16:13:21.926Z","updated_at":"2025-05-16T02:30:29.275Z","avatar_url":"https://github.com/AhmedSobhy01.png","language":"Assembly","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 8086 Serial Chat 📃\n\n**8086 Serial Chat** is a bi-directional communication program written in 8086 Assembly language. It allows real-time text-based communication between two machines or terminals connected through the serial port (UART). The program splits the screen into two sections for input and output, simulating a basic \"chat window.\"\n\n## Features\n\n- **Screen Division**: The display is divided into two sections:\n  - **Top Section**: Your input (typed text).\n  - **Bottom Section**: Received messages from the serial port.\n- **Serial Communication**: Data is transmitted and received using UART (Universal Asynchronous Receiver/Transmitter).\n- **Scrolling**: Automatically scrolls text when the screen reaches its limit.\n- **Exit Option**: Press `ESC` to gracefully exit the program.\n\n## Prerequisites\n\nTo run this program, you'll need the following:\n\n1. **DOSBox-X**: A DOS emulator with enhanced features. Download it [here](https://dosbox-x.com/).\n2. **Python**: To automate running the program.\n3. A compatible assembler:\n    - TASM (Turbo Assembler)\n    - MASM (Microsoft Macro Assembler)\n\n## Installation\n\n1. **Clone the Repository**:\n\n    ```bash\n    git clone https://github.com/AhmedSobhy01/assembly-serial-chat.git\n    cd assembly-serial-chat\n    ```\n\n2. **Set Up DOSBox-X**:\n\n    - Ensure DOSBox-X is installed on your computer and its path is configured properly.\n\n3. **Run the Program Using Python**:\n   The provided `run.py` script will automate launching the program in DOSBox-X:\n\n    ```bash\n    python run.py\n    ```\n\n    This script assembles the code (if needed) and executes the program seamlessly in DOSBox-X.\n\n## How It Works\n\n- **Initialization**:\n\n  - The program initializes the serial port for communication using standard UART configuration.\n  - The screen is divided into two parts with a horizontal separator.\n\n- **Chat Input and Output**:\n\n  - **Input**: Type characters, which are transmitted to the connected terminal.\n  - **Output**: Incoming characters are displayed in the lower section of the screen.\n\n- **Scrolling**:\n\n  - If text reaches the end of the screen, the program scrolls the display to keep the conversation flowing.\n\n- **Exit**:\n  - Press `ESC` to exit the program.\n\n## Program Flowchart\n\n```text\nSTART\n   │\n   ├─► Clear Screen\n   ├─► Draw Separator\n   ├─► Initialize Serial Port\n   │\n   └─► MAIN LOOP\n         ├─► Check for Incoming UART Data\n         │    └─► Display Received Character\n         │\n         ├─► Check for Keyboard Input\n         │    └─► Send Character to UART\n         │\n         └─► Check for Exit Command (ESC)\n                 └─► EXIT\n```\n\n## Keyboard Controls\n\n- **Type Text**: Sends the text to the other terminal.\n- **Press `ESC`**: Exits the program.\n\n## Customization\n\n### Baud Rate\n\nThe current program is set to a baud rate divisor of `0x0C` for 9600 baud. Modify the following lines in `INIT_SERIAL` for other baud rates:\n\n```assembly\nMOV DX, 3F8h\nMOV AL, 0Ch  ; LSB of baud rate divisor (0x0C = 9600 baud)\nOUT DX, AL\n\nMOV DX, 3F9h\nMOV AL, 00h  ; MSB of baud rate divisor\nOUT DX, AL\n```\n\n## Running with Python Script\n\nThe `run.py` script simplifies launching the program in **DOSBox-X**. Ensure the following:\n\n1. DOSBox-X is installed and its executable is available in your system's PATH.\n2. Run the script:\n\n    ```bash\n    python run.py\n    ```\n\nThe script will assemble the program (if necessary) and open DOSBox-X to execute it.\n\n## License\n\nThis project is released under the [MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahmedsobhy01%2Fassembly-serial-chat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fahmedsobhy01%2Fassembly-serial-chat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahmedsobhy01%2Fassembly-serial-chat/lists"}