From 13067957c813b1d1c5ede4dd2556c45033398580 Mon Sep 17 00:00:00 2001 From: Robert Pengelly Date: Sat, 24 Aug 2024 16:17:56 +0100 Subject: [PATCH] Command manipulation --- build/chimaera.img | Bin 368640 -> 368640 bytes build/chimaera.vhd | Bin 34120704 -> 34120704 bytes src/apps/pcomm/pcomm.asm | 308 +++++++++++++++++++++++++++++++++++- src/apps/pcomm/writestr.asm | 2 + 4 files changed, 302 insertions(+), 8 deletions(-) diff --git a/build/chimaera.img b/build/chimaera.img index ca1e7c2b1534bd86815bb9fb55b163cdfb27ef9a..2b9ed57069b0832c5072abb226bc8f96c6baa676 100644 GIT binary patch delta 3861 zcmb7H4^UG_8sEHxfD{5)K?F=*ct}9t`JMqwLKG4FmjbpsptLv@g zy!nMi_ncRSd|-FK@*{TVJGmNGxK>^&c*YJmYxve8j^AI*@vSAC-s1|l5rd`qC?k6K z{UsdfkKb4kJbr>fHoK!K7u9n7zTF%aE<`V|a^#O9`529C?qrco8g`KHbMW=B;n|TT^hQf<-ZwMhv`Sz84uQEv= zq=9jM|3!_q1u%5P`Sdz^;1KuMnq!5N2v9_AF-vRHyVGMgVG? z(*GWEUkoQJQpr=}{ynI9`y{h9f{rAmw&x#HDT}~YyJCts)9I~B|652LTrInAm$rm! z84_>sIqD*ATWo0;gKmE9R7+mIHJ@woB<~6ihJ)Q;uer*FEBwA+ak%Bg(~TuuEqMG4 z5IgPhjk;j3T5IQ9i#c)7bh=*Y{|xcewtlEK+XfCIu%WGttX~2wNZtzlkW0@?Ft0Ax zI!bLV-fj&mPVMju*TxPAp0)~SwXP;u99%;&-j6Br0ic%SuFtX;1c06A=K{l@UrGuS zqKPRfpb8#mozz8a0}lY$Ky{=f-HDEdJ<%j5s*bvKo*98EPNn~B>a^x zJ<^#7PN*)|=o zbZ)GGncq#>>}8J9@}5muVMQ z3bX>jwo<8AmbtScb-I(+y($qTFm|A#rmYhx#UWp$G*L{{i<@p)x2lD~I|C!irana{ z0u}fot1F#%`T?_WJK#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OECG&>tzw3syCIA2c diff --git a/build/chimaera.vhd b/build/chimaera.vhd index 14c5bb51022cb044e309923ec4537fa3451f094c..b1a091a2a30387274520016b98f9385bff3b2ed4 100644 GIT binary patch delta 6704 zcmdUyd010t+J{e0Amku~ML-11LS%I1eDQ!*LQvY&E&f7`|R&| z&htL+drqp4ZuYGPI~yf#-?sU$-Lqe^TW<)RrQP`rnVsm<=X|$(ooqb>bBDuN;qHCgn3sdQNtB+SCbZ zEY*yk^Tz!*$Yo+v(b;n(Yo3%VvImCdx;4-D1*TTt7n(CNrav^Cb>DF}H2aRT*_?sR zx;d}=-<$pSCr;1EyzhzK89N%@BH8=2eC4`Sg<5y1AXnGgwY8{}-;}B4w`6JgP1#ya zYniuMj55_6Wc985mTawfD0D`l$IW9bW47d1r!wVQe&cGbpwn=H0XbUnMZNeT(>c3Q z&6us{^2MLV2v=p?n6PAh%}wdzz?z%vLSJi_7^4@9nNFE4+f7vJg~=XV1)HxE+B~@6 zFq5vH-JM|9RCjwWl3`V6*XS;+IHT_n!*xP)ESKmtjT4PJhrn3G6DdNHoKq3 z)_=>T!W9`eM0iflnb?pNp+U|ivx8HFD{^io`=L?TsN+oBejT1mF1i_nS@B$?u#e-0 zv%WgvOODI(PvI%lAPUvbHcc+Z@(p7>xi{G1JK}H`e#?1E5(tF z9tQFFj1sPSaVnoZu><01P7>ndxM9M0Z!U$Mo+MOybHVJGBw>v=HzSIR zJ?ugs+A}<+A>D^_lV+kDR|REijVBjM9qSl<$9QMYu2N=eYtQPh^J8S0+C{;+O)PWc zt0I}To!^wMt!<55<>7&cyso}fR-n7UZ+uuQ)cSMtsR$XgdVNr>y)I;AfiGqAEDBoX;YNXIKm`e_Dg?5G?7@BZAmK*M+3lxpRUG>5X zNdf4eMcM)Vvy^xBPjvv7#D?%fLjV;FFI)+rf=TErnBlI1iRvquKq{Ew!k2+uyl+uB zx}@CCrV9|KhKp5K8peBa23E)k=Aw!&s>B~u^+W9%e)DQ=bBqNwJ6liL0DH*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ADxGXbakb5D*H&Kzk4lI)Dfe2|9vKzyhqm24oNgI)i8s1G<1%&=qt8aiBY}gC0Nu z@gM;tf+Wxr^a8!XL!b{x1}PvF^aW|4A9xt_2Lr%BFbE6=LqIwh3WkB<;1TdB7y(9t zQD8I}0~{a&WCAA`3&w#gkPXIz954Y)1e3sHU^2)BkAo>-DwqbI0KWrIg6ZHX@Ov-= zJPn=!&w}T`Oz=GT1DFM7gFKKA=7722k6<2n0lWz2gFk@c9c;DL4oYfzN;&d=3tSBjBH)9{dX&1z&(;;7f2Ed<9N`li(EiH)sH- z!5Q#1I19c3=fHo!x8OUV0S`D28o~GA0{8*^2>uH$f}g-8@H4m!u7IoH8u$fV2RA?y zXa+aIt))i?>0SqvNa-m9)h0sFBntYBV*5a!?sm zCgr5YQsbyBDw`Tlu^+U#S(8O1(wBO}#_?je3__Nv)zvsMS;{wT49j(kEoBSjnpP;Gqr^(r?yhts0yl*s-m`2)zl8^6KW^5 zi>je^Q+uddYA>~q+E3L{2dGb}gVZ7FGs;bUP93I>Q2(Ursee&NsV}Hw)R)w8>MQC5 zb&@(o{hMl_PE%*7uc@=tH`F=mKh(F>ca%nXsPj}K^*wcg`hoh9`Y&~n`iZ(k{Y+h^ zu25I0Yt%2)b?OGyL^V@4saraH{zRt!H0W&C-6;S7 diff --git a/src/apps/pcomm/pcomm.asm b/src/apps/pcomm/pcomm.asm index 81272c8..7dfad70 100644 --- a/src/apps/pcomm/pcomm.asm +++ b/src/apps/pcomm/pcomm.asm @@ -96,18 +96,27 @@ _main: mov ah, HEX (08) int HEX (21) + cmp al, HEX (47) + je .L74 + cmp al, HEX (48) je .L1 cmp al, HEX (4B) - je .L4 + je .L57 + + cmp al, HEX (4D) + je .L58 - ;cmp al, HEX (4D) - ;je .L58 + cmp al, HEX (4F) + je .L75 cmp al, HEX (50) je .L2 + cmp al, HEX (53) + je .L71 + jmp .L11 .L10: @@ -552,13 +561,101 @@ _main: cmp al, HEX (7F) ja .L11 - mov ah, HEX (02) - mov dl, al - int HEX (21) + push ax + push bx + push cx + push dx + push si + push di + push ax + + mov bx, offset _scratch + + mov ax, di + sub ax, bx + + mov cl, ch + xor ch, ch + + cmp ax, cx + je .L68 + + push cx + mov si, offset _scratch + mov di, offset _temp + + push ax + push cx + + mov cx, ax + rep movsb + + xor al, al stosb + + pop cx + pop ax + + sub cx, ax + rep movsb + + xor al, al + stosb + + pop cx + inc cx + + mov si, offset _temp + mov di, offset _scratch + + rep movsb + +.L68: + + pop ax + pop di + +.L69: + + stosb + + mov ax, HEX (0300) + xor bx, bx + int HEX (10) + + mov bx, di + dec bx + + call _writestr + + cmp dl, HEX (4F) + jb .L73 + + xor dl, dl + inc dh + + jmp .L70 + +.L73: + + add dl, 1 + +.L70: + + mov ax, HEX (0200) + xor bx, bx + int HEX (10) + + pop si + pop dx + + pop cx inc ch + pop bx + pop ax + jmp .L11 .L58: @@ -658,8 +755,141 @@ _main: .L4: - call _handle_backspace - jmp .L11 + cmp di, offset _scratch + je .L11 + + push es + push ds + push ax + push bx + push cx + push dx + push si + push di + + mov bx, offset _scratch + + mov ax, di + sub ax, bx + + mov cl, ch + xor ch, ch + + mov si, di + dec di + + sub cx, ax + rep movsb + + xor al, al + stosb + + call _erase_char + pop di + dec di + + mov ax, HEX (0300) + xor bx, bx + int HEX (10) + + mov cx, dx + + mov bx, di + call _writestr + + mov ah, HEX (02) + xor dl, dl + int HEX (21) + + mov dx, cx + + mov ax, HEX (0200) + xor bx, bx + int HEX (10) + + pop si + pop dx + + pop cx + dec ch + + pop bx + pop ax + pop ds + pop es + + jmp .L11 + +.L71: + + push ax + push bx + push cx + push dx + push si + push di + + mov bx, offset _scratch + + mov ax, di + sub ax, bx + + mov cl, ch + xor ch, ch + + cmp ax, cx + je .L72 + + mov si, di + inc si + + sub cx, ax + rep movsb + + xor al, al + stosb + + pop di + + mov ax, HEX (0300) + xor bx, bx + int HEX (10) + + mov cx, dx + + mov bx, di + call _writestr + + mov ah, HEX (02) + xor dl, dl + int HEX (21) + + mov dx, cx + + mov ax, HEX (0200) + xor bx, bx + int HEX (10) + + pop si + pop dx + + pop cx + dec ch + + pop bx + pop ax + + jmp .L11 + +.L72: + + pop si + pop dx + pop cx + pop bx + pop ax + + jmp .L11 .L3: @@ -1053,6 +1283,68 @@ _main: call _history_down jmp .L11 +.L75: + + and ch, ch + jz .L11 + + push ax + push bx + push cx + push dx + + xor ah, ah + mov al, cs:[_curr_col] + + xor dx, dx + + mov cl, ch + xor ch, ch + + add ax, cx + + mov di, offset _scratch + add di, cx + + mov cx, 80 + div cx + + mov dh, cs:[_curr_row] + add dh, al + + mov ax, HEX (0200) + xor bx, bx + int HEX (10) + + pop dx + pop cx + pop bx + pop ax + + jmp .L11 + +.L74: + + push ax + push bx + push cx + push dx + + mov dh, cs:[_curr_row] + mov dl, cs:[_curr_col] + + mov ax, HEX (0200) + xor bx, bx + int HEX (10) + + mov di, offset _scratch + pop dx + pop cx + pop bx + pop ax + + jmp .L11 + ;****************************************************************************** ; @function _format_path ;****************************************************************************** diff --git a/src/apps/pcomm/writestr.asm b/src/apps/pcomm/writestr.asm index 161b82e..64cc800 100644 --- a/src/apps/pcomm/writestr.asm +++ b/src/apps/pcomm/writestr.asm @@ -16,6 +16,7 @@ _writestr: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; push ax push bx + push dx push si push bp @@ -66,6 +67,7 @@ _writestr.done: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; pop bp pop si + pop dx pop bx pop ax -- 2.34.1