Get_Byte

procedure get_byte {
    arguments_none
    returns byte
    variable count byte
    variable char byte

    while (serial_in) {
	call delay()
    }

    call delay()
    call delay()
    call delay()
    char := 0
    count_down count 8 {
	call delay()
	char := char >> 1
	if (serial_in) {
	    char@7 := 1
	}
        call delay()
        call delay()
	nop extra_instructions_per_bit - 7
    }
    call delay()
    call delay()
    return char
}