Skip to content

Conversation

@IanSeyler
Copy link
Member

This pull request adds support for serial port interrupts and improves the integration of serial input/output with the system's input handling. The main changes include configuring the serial interrupt handler, updating the input and output routines to handle both keyboard and serial input, and ensuring proper processing of special characters in serial output.

Serial port interrupt support:

  • Added configuration for the serial interrupt handler in serial_init: to set up the interrupt gate, enable the serial IRQ, and configure the serial port to generate interrupts when data is available. (src/drivers/serial.asm)
  • Implemented the int_serial: interrupt handler, which calls the serial input routine, acknowledges the IRQ, and wakes up all SMP threads as a workaround. (src/interrupt.asm)
  • Added the serial_interrupt: routine to receive characters from the serial port and treat them as keyboard input. (src/drivers/serial.asm)

Input/output integration improvements:

  • Updated the b_input syscall to scan for input from both keyboard and serial sources, using the shared key variable set by interrupt handlers. (src/syscalls/io.asm)
  • Enhanced the serial output routine to handle special characters: backspace (decrement cursor) and line feed (convert to carriage return + line feed), ensuring correct serial output formatting. (src/syscalls/io.asm) [1] [2]

Ian Seyler added 2 commits October 14, 2025 10:59
- Enable serial interrupt
- Add serial interrupt handler
- `b_output_serial` will automatically output CR if LF is detected
@IanSeyler IanSeyler self-assigned this Oct 14, 2025
@IanSeyler IanSeyler merged commit d430545 into master Oct 14, 2025
6 checks passed
@IanSeyler IanSeyler deleted the serial_no-LFB branch October 14, 2025 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants