GitJer / Some_RPI-Pico_stuff

Some experiments I did with the Raspberry Pi Pico

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Small correction in the HCSR04 README regarding JMP X--

dan-corneanu opened this issue · comments

Hi there,
The README currently reads

The jmp x-- test decrements x and if this does not result in a 0 in x, it jumps to testing for the stop criterion (here the Echo pin going low).

However, according to the documentation, the test is done before decrementing the X register.

JMP X-- and JMP Y-- always decrement scratch register X or Y, respectively. The decrement is not conditional on the current value of the scratch register. The branch is conditioned on the initial value of the register, i.e. before the decrement took place: if the register is initially nonzero, the branch is taken.

Regards,
Dan

You're right. I have changed the sentence. Thanks!