Zeal8bit / Zeal-8-bit-OS

An Operating System for Z80 computers, written in assembly
Apache License 2.0
574 stars 54 forks source link

video: make video write report bytes written #29

Closed chiralos closed 5 months ago

chiralos commented 5 months ago

I noticed that the write() call to the video device wasn't returning the number of bytes written on success; it always updated BC (or length pointer param in C) with zero.

This commit sandwiches the print_buffer call between push / pop to retain length. It assumes that the write will always be full-length successful, which seems to be the case.

Zeal8bit commented 5 months ago

Thank you @chiralos for your fix! This is indeed a bug :smile: