diff options
author | Leo C | 2015-12-11 15:09:23 +0100 |
---|---|---|
committer | Leo C | 2015-12-11 15:09:23 +0100 |
commit | 7813a2e4a8bc4b3453911e811f3e196936ea2a3b (patch) | |
tree | 9ee131cd34de66ce62c67012a34a774cac5b0d49 | |
parent | 49a5f06233e92c28feaf0b42d2b0521b1ebf5bd9 (diff) | |
download | kermit-80-master.zip |
-rw-r--r-- | cpxac.asm | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -707,7 +707,7 @@ outcon: outmdm:
push hl
ld hl,(outptr)
- ld (hl),e ;return buffered char
+ ld (hl),e ;save char in buffer
inc hl
ld (outptr),hl
ld a,(outcnt)
@@ -750,22 +750,23 @@ omf_2: ld a,2 ;start write transaction
out (VI2C_CTRL),a
- ld hl,outbuf+2
- ld (outptr),hl
+ ld hl,outbuf+2 ;buffer start
ld a,(outcnt)
- sub c
+ sub c ;buffer now empty?
ld (outcnt),a
jr z,omfex
- push de
- ld d,h
+ push de ;no, shift remaining chars down
+ ld d,h ;dest = buffer start
ld e,l
ld b,0
- add hl,bc
+ add hl,bc ;src = buffer start + num chars last transmitted
ld c,a
ldir
+ ex de,hl
pop de
omfex:
+ ld (outptr),hl
pop bc
pop hl
ret
|