소스 검색

ed: fix broken buf insert logic

pull/10/head
Virgil Dupras 5 년 전
부모
커밋
8d7abd9994
1개의 변경된 파일5개의 추가작업 그리고 2개의 파일을 삭제
  1. +5
    -2
      apps/ed/buf.asm

+ 5
- 2
apps/ed/buf.asm 파일 보기

@@ -147,9 +147,12 @@ bufInsertLine:
; when it's time to insert the line in the space we make.
ld hl, (BUF_LINECNT)
call bufLineAddr
; HL is pointing to *first byte* after last line. Our source needs to
; be the second byte of the last line and our dest is the second byte
; after the last line.
push hl \ pop de
dec hl
dec hl
dec hl ; second byte of last line
inc de ; second byte beyond last line
; HL = BUF_LINECNT-1, DE = BUF_LINECNT, BC is set. We're good!
lddr
; We still need to increase BUF_LINECNT


불러오는 중...
취소
저장