It is not "bit banging" the speaker. The speaker is connected to the top bit of the instruction register so the sounds are a side effect of the particular instruction sequence. Of course for playing music the instruction sequence is determined by the note required.
@PeterOGB Well okay, it's not toggling an output by writing to it. However it's doing the rest of what's understood by bit-banging -- i.e. state-change, wait, state-change, wait, directly by the CPU instead of an autonomous timer.
@regregex It's the fundamental operation of the CPU that makes the sound. Every program makes sound, you can't stop it making a sound(except by turning down the volume). It doesn't "wait" either, the instructions are chosen to take the right length of time (e.g. multi-place shifts which take a time proportional to the number of places shifted).
It is not "bit banging" the speaker. The speaker is connected to the top bit of the instruction register so the sounds are a side effect of the particular instruction sequence. Of course for playing music the instruction sequence is determined by the note required.
PeterOGB 1 year ago
@PeterOGB Well okay, it's not toggling an output by writing to it. However it's doing the rest of what's understood by bit-banging -- i.e. state-change, wait, state-change, wait, directly by the CPU instead of an autonomous timer.
regregex 1 year ago
@regregex It's the fundamental operation of the CPU that makes the sound. Every program makes sound, you can't stop it making a sound(except by turning down the volume). It doesn't "wait" either, the instructions are chosen to take the right length of time (e.g. multi-place shifts which take a time proportional to the number of places shifted).
PeterOGB 1 year ago