You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
LinkMovementCheckRoomInBuffer::; Input: hl: ring buffer to store in.; Output: de: Pointer to Head, Sets Z flag if no room.; clobbers hl, adec hl ld a,[hld] ld e, a ld a,[hld] ld d, a ld a,[hld] ld h,[hl] ld l, a ld a, lsub e ld l, a ld a, h sbc d ld h, a ld a, l cp 1 ; Sets Z flag if no room.retLinkMovementStoreByte:: ; Input: a: Byte to store, hl: ring buffer to store in. ; Output: Z flag if no room. ; clobbers hl, de, b ld b, apush hlcall LinkMovementCheckRoomInBufferpop hlret zinc depush hl ld a,16add l ld l, aadc hsub l cp d jr nz, .continue ld a, l cp e jr nz, .continue ld hl,-16add de, hl.continuepop hldec hl ld a, e ld [hld], a ld a, d ld [hl], a ld a, b ld [de], aretLinkMovementCheckBufferEmpty::; Input: hl: ring buffer to store in.; Output: hl: Pointer to Head, Sets Z flag if no room.; clobbers hl, adec hl ld a,[hld] ld e, a ld a,[hld] ld d, a ld a,[hld] ld h,[hl] ld l, a ld a, esub l ld e, a ld a, d sbc h ld d, a ld a, e cp 1 ; Sets Z flag if no room.retLinkMovementGetByte:: ; Input: hl: ring buffer to get byte from ; Output: a: byte from buffer, Z flag if buffer is empty ; clobbers hl, de, bpush hlcall LinkMovementCheckBufferEmptypop deret zdec ; WIPret
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: