Z80 Assembly 85: Fast Block Fill (memset/bfill) with a Constant
The Need for a Fast Block Fill In game development and system programming, you frequently need to clear large areas of RAM—such as setting the entire screen buffer to a black background or zeroing out a data structure. Doing this one byte at a time with a simple loop is slow. Goal: Write a routine that fills a specified memory range (START_ADDR′ to END_ADDR′) with a single constant byte (`FILL_BYTE′) as quickly as possible. ...