• PMATE 3.21: Fixes for bugs found while playing with it ...

    From Martin@21:1/5 to All on Fri Nov 19 06:12:37 2021
    Hi all!

    PMATE *IS* the editor magically touching me :-)

    As a student I constantly dreamed of sometimes getting it,
    but it never happened, it was out of reach for "hobbyists".

    Now, the great effort of PMATE lovers made it possible.
    Thanks to all of you!


    It took a lot of time to discover enough of its inner workings,
    but it was *REALLY* worth it. It's like a "Magic Machine"!

    I just let the fixes out for every PMATE lover to know,
    without a lot descriptions. Just ask :-)


    Have fun!
    Martin


    ; PMATE 3.21
    ; CONPMATE.COM
    < old
    ---
    new


    ========

    ; BUG: If the FD auxin file status is active, XI without
    ; BUG: filename tries to read from an invalid auxin file

    < 0403 32 5c 41 LD (415c),A
    ---
    0403 cd ee 51 CALL 51ee

    < 51ee 00 00 00 00 00 00 00 00
    ---
    51ee 32 5c 41 LD (415c),A ; set FD current input file status unused
    51f1 97 SUB A
    51f2 32 4d 41 LD (414d),A ; set FD auxin file inactive
    51f5 c9 RET

    ========

    ; BUG: Command XC performs no I/O FILE CHECK
    ; BUG: If issued without input-output file, it overwrites
    ; BUG: page zero through the undefined sector buffer pointer

    < 2854 cd 0e 3b CALL 3b0e ; select FD output file into FD current output file
    < 2857 cd e3 3e CALL 3ee3 ; flush buffer, close file
    < 285a 21 e2 37 LD HL,37e2 ; "DISK FULL"
    < 285d da cf 35 JP C,35cf ; error
    < 2860 cd 83 1f CALL 1f83 ; reset input-output handling
    < 2863 37 SCF
    < 2864 c9 RET
    ---
    2854 3a 13 39 LD A,(3913) ; input-output file
    2857 a7
  • From Tony Nicholson@21:1/5 to Martin on Fri Nov 19 14:00:38 2021
    On Friday, November 19, 2021 at 4:13:12 PM UTC+11, Martin wrote:
    Hi all!

    PMATE *IS* the editor magically touching me :-)

    As a student I constantly dreamed of sometimes getting it,
    but it never happened, it was out of reach for "hobbyists".

    Thanks for these Martin.

    Have you done a disassembly of CONPMATE?

    It's one of those things I've been waiting for "a round tuit" to
    get started on.

    Another bug I've noticed (but done nothing about) is that sometimes
    a reverse scroll (Ctrl-U) when the buffer must be read from disk
    sometimes corrupts the text with what looks like a repeated copy
    of the same sector of data. When this happens I just quit and
    restart (and perhaps have to re-apply some edits).

    Tony

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Martin@21:1/5 to Tony Nicholson on Sat Nov 20 04:04:47 2021
    Am 11/19/2021 11:00 PM, Tony Nicholson schrieb:
    On Friday, November 19, 2021 at 4:13:12 PM UTC+11, Martin wrote:
    Hi all!

    PMATE *IS* the editor magically touching me :-)

    As a student I constantly dreamed of sometimes getting it,
    but it never happened, it was out of reach for "hobbyists".

    Thanks for these Martin.

    Have you done a disassembly of CONPMATE?

    It's one of those things I've been waiting for "a round tuit" to
    get started on.

    Another bug I've noticed (but done nothing about) is that sometimes
    a reverse scroll (Ctrl-U) when the buffer must be read from disk
    sometimes corrupts the text with what looks like a repeated copy
    of the same sector of data. When this happens I just quit and
    restart (and perhaps have to re-apply some edits).

    Tony


    Hi Toni!

    I would call it a partial disassembly with a lot of annotations.
    Clearly not yet in a form suitable for re-assembly.

    Whenever I have time, I look over it trying to recognize more
    code sequences and match them with the functionality described
    in the manuals.

    Slowly more of the listing gets annotations, and I are constantly update
    them to be refrlect my increasing knowledge.

    I often begin by jumping over all occurances of a single memory location
    to get an idea of where and how it is used.


    This could probably help you a little bit to get into it :-)

    The main command processing rotine
    Command and Subcommand Tables
    Predfined Commands
    Instant Commands
    I/O Subsystem Variables


    ; Reset entry point
    0b9b 2a f3 01 LD HL,(01f3) ; start of command line
    0b9e 23 INC HL
    0b9f 22 f5 01 LD (01f5),HL ; end of command line
    0ba2 36 00 LD (HL),000
    0ba4 3e 0c LD A,00c ; Init Buffer Base Index
    0ba6 32 d8 01 LD (01d8),A
    0ba9 3a 24 01 LD A,(0124) ; INITMD: COMMAND (0), INS (1), OVR (2)
    0bac 32 29 39 LD (3929),A ; Edit Mode

    ; command prompt
    0baf 31 ef 03 LD SP,03ef
    0bb2 cd 9f 04 CALL 049f ; (BASE+#1) = (BASE+#2)
    0bb5 a4 ; 0221 ; Parenthesis SP
    0bb6 a0 ; 021d
    0bb7 cd 9f 04 CALL 049f ; (BASE+#1) = (BASE+#2)
    0bba aa ; 0227 ; Iteration SP
    0bbb a6 ; 0223
    0bbc cd 9f 04 CALL 049f ; (BASE+#1) = (BASE+#2)
    0bbf b2 ; 022f ; Subroutine SP
    0bc0 ae ; 022b
    0bc1 cd 9f 04 CALL 049f ; (BASE+#1) = (BASE+#2)
    0bc4 ba ; 0237 ; Number SP
    0bc5 b6 ; 0233
    0bc6 cd 8d 04 CALL 048d ; (BASE+#3) = (BASE+#1) - (BASE+#2)
    0bc9 78 ; 01f5 ; end of command line
    0bca 76 ; 01f3 ; start of command line
    0bcb 8e ; 020b ; Exec Offset

    0bcc 97 SUB A
    0bcd 32 fe 38 LD (38fe),A ; current mode
    0bd0 32 10 39 LD (3910),A ; trace mode
    0bd3 cd 9f 04 CALL 049f ; (BASE+#1) = (BASE+#2)
    0bd6 3c ; 01b9 ; saved numeric argument
    0bd7 3a ; 01b7 ; numeric argument
    0bd8 3a 0f 39 LD A,(390f) ; startup macros
    0bdb 32 2a 39 LD (392a),A ; wait for keypress
    0bde a7 AND A
    0bdf ca 06 0c JP Z,0c06 ; no

    0be2 97 SUB A ; startup macros done
    0be3 32 0f 39 LD (390f),A

    0be6 2a 85 01 LD HL,(0185) ; PERMANENT MACROS
    0be9 7e LD A,(HL)
    0bea 23 INC HL
    0beb fe 13 CP 013
    0bed ca f3 0b JP Z,0bf3 ; Startup Macro defined
    0bf0 21 eb 0c LD HL,0ceb ; Default Startup Macro
    0bf3 cd 7e 16 CALL 167e ; Execute Macro

    0bf6 2a 85 01 LD HL,(0185) ; PERMANENT MACROS
    0bf9 7e LD A,(HL) ; ONLY FIRST ENTRY
    0bfa fe 09 CP 009
    0bfc c2 03 0c JP NZ,0c03 ; not Initial Macro
    0bff 23 INC HL
    0c00 cd 7e 16 CALL 167e ; Execute Macro

    0c03 cd 1d 4c CALL 4c1d ; video clear screen

    0c06 2a 27 01 LD HL,(0127) ; user command table
    0c09 cd 7e 16 CALL 167e ; Execute Macro

    0c0c cd 7d 4e CALL 4e7d ; show editor status
    0c0f 3a 29 39 LD A,(3929) ; Edit Mode
    0c12 a7 AND A
    0c13 ca 3c 0c JP Z,0c3c ; command mode

    0c16 3a 2a 39 LD A,(392a) ; wait for keypress
    0c19 a7 AND A
    0c1a ca 26 0c JP Z,0c26 ; no
    0c1d cd c9 49 CALL 49c9 ; incremental screen update
    0c20 cd 56 51 CALL 5156 ; chack console input
    0c23 d2 1d 0c JP NC,0c1d ; no key pressed

    0c26 3a 29 39 LD A,(3929) ; Edit Mode
    0c29 fe 02 CP 002
    0c2b 3e 00 LD A,000 ; set command mode
    0c2d 32 29 39 LD (3929),A ; Edit Mode
    0c30 ca 39 0c JP Z,0c39 ; overtype mode

    0c33 cd 5e 31 CALL 315e ; go to insert mode
    0c36 c3 3c 0c JP 0c3c

    0c39 cd 6e 31 CALL 316e ; go to overtype mode

    0c3c 06 02 LD B,002 ; init ESC counter

    ; command processing
    0c3e cd 4d 4f CALL 4f4d ; input
    0c41 d2 4a 0c JP NC,0c4a ; no instant command

    0c44 cd de 0c CALL 0cde ; handle instant command
    0c47 c3 3e 0c JP 0c3e

    0c4a 4f LD C,A
    0c4b 78 LD A,B
    0c4c fe 02 CP 002
    0c4e 79 LD A,C
    0c4f ca 82 0c JP Z,0c82 ; two ESC seen

    0c52 fe 7f CP 07f
    0c54 ca aa 0c JP Z,0caa ; DEL
    0c57 04 INC B
    0c58 fe 1b CP 01b
    0c5a ca 5f 0c JP Z,0c5f ; ESC

    0c5d 06 00 LD B,000 ; reset ESC count

    0c5f cd ae 04 CALL 04ae ; cmpw (BASE+#1),(BASE+#2)
    0c62 78 ; 01f5 ; end of command line
    0c63 06 ; 0183 ; last text location
    0c64 d2 d8 0c JP NC,0cd8 ; (BASE+#1) >= (BASE+#2), error

    0c67 cd c9 04 CALL 04c9 ; incw (BASE+#1)
    0c6a 78 ; 01f5 ; end of command line
    0c6b cd 6f 0b CALL 0b6f ; Increment Exec Offset
    0c6e 2a f5 01 LD HL,(01f5) ; end of command line
    0c71 16 00 LD D,000
    0c73 72 LD (HL),D ; store zero terminator
    0c74 2b DEC HL
    0c75 77 LD (HL),A ; store command
    0c76 cd c2 4e CALL 4ec2 ; update command line
    0c79 78 LD A,B
    0c7a fe 02 CP 002
    0c7c ca f1 0c JP Z,0cf1 ; if second ESC, execute command line
    0c7f c3 3e 0c JP 0c3e

    0c82 fe 1b CP 01b
    0c84 c2 8e 0c JP NZ,0c8e ; not ESC after two ESCs

    0c87 97 SUB A
    0c88 cd c2 4e CALL 4ec2 ; update command line
    0c8b c3 f1 0c JP 0cf1 ; execute command line

    0c8e fe 7f CP 07f
    0c90 ca aa 0c JP Z,0caa ; DEL

    0c93 2a f3 01 LD HL,(01f3) ; start of command line
    0c96 23 INC HL
    0c97 36 00 LD (HL),000
    0c99 22 f5 01 LD (01f5),HL ; end of command line
    0c9c 21 01 00 LD HL,0001 ; Init Exec Offset
    0c9f 22 0b 02 LD (020b),HL
    0ca2 f5 PUSH AF
    0ca3 cd b6 4d CALL 4db6 ; command processing
    0ca6 f1 POP AF
    0ca7 c3 5d 0c JP 0c5d

    0caa cd d8 04 CALL 04d8 ; decw (BASE+#1)
    0cad 78 ; 01f5 ; end of command line
    0cae cd ae 04 CALL 04ae ; cmpw (BASE+#1),(BASE+#2)
    0cb1 78 ; 01f5 ; end of command line
    0cb2 76 ; 01f3 ; start of command line
    0cb3 c2 bf 0c JP NZ,0cbf

    0cb6 cd c9 04 CALL 04c9 ; incw (BASE+#1)
    0cb9 78 ; 01f5 ; end of command line
    0cba 06 00 LD B,000
    0cbc c3 3e 0c JP 0c3e

    0cbf cd d8 04 CALL 04d8 ; decw (BASE+#1)
    0cc2 8e ; 020b ; Exec Offset
    0cc3 2a f5 01 LD HL,(01f5) ; end of command line
    0cc6 4e LD C,(HL)
    0cc7 97 SUB A
    0cc8 77 LD (HL),A
    0cc9 79 LD A,C
    0cca fe 1b CP 01b
    0ccc c2 d0 0c JP NZ,0cd0

    0ccf 05 DEC B

    0cd0 3e 7f LD A,07f
    0cd2 cd c2 4e CALL 4ec2 ; update command line
    0cd5 c3 3e 0c JP 0c3e

    0cd8 21 12 36 LD HL,3612 ; "MEMORY SPACE EXHAUSTED"
    0cdb c3 cf 35 JP 35cf ; error


    ; handle instant command
    0cde 21 fc 38 LD HL,38fc
    0ce1 70 LD (HL),B
    0ce2 cd 9e 30 CALL 309e ; Predefined Commend
    0ce5 21 fc 38 LD HL,38fc
    0ce8 46 LD B,(HL)
    0ce9 c9 RET


    0cea 00

    ; Default Startup Macro
    0ceb 58 ; "XF^A:$"
    0cec 46
    0ced 01
    0cee 3a
    0cef 1b
    0cf0 00


    ; execute command line
    0cf1 97 SUB A
    0cf2 32 00 39 LD (3900),A ; clear error flag
    0cf5 32 01 39 LD (3901),A ; clear error suppress flag
    0cf8 3e ff LD A,0ff ; disable String Argument Count
    0cfa 32 d7 01 LD (01d7),A
    0cfd 3e 0c LD A,00c ; Init Buffer Base Index
    0cff 32 d8 01 LD (01d8),A
    0d02 21 01 00 LD HL,0001 ; Init Exec Offset
    0d05 22 0b 02 LD (020b),HL
    0d08 cd 0e 0d CALL 0d0e
    0d0b c3 af 0b JP 0baf ; command prompt


    0d0e 97 SUB A
    0d0f 32 f8 38 LD (38f8),A ; argument undefined
    0d12 32 0d 39 LD (390d),A
    0d15 21 00 00 LD HL,0000 ; Init numeric argument
    0d18 22 b7 01 LD (01b7),HL

    0d1b 21 1d 0e LD HL,0e1d ; Identity
    0d1e 22 bd 01 LD (01bd),HL ; last numeric operation

    ; Command TAB, CR, ESC, '^_', SPACE
    0d21 cd 56 51 CALL 5156 ; chack console input
    0d24 cd a6 17 CALL 17a6 ; check abort

    0d27 3a 10 39 LD A,(3910) ; trace mode
    0d2a a7 AND A
    0d2b ca 39 0d JP Z,0d39 ; no
    0d2e cd 2f 15 CALL 152f ; trace processing
    0d31 d6 1b SUB 01b
    0d33 c2 39 0d JP NZ,0d39 ; not ESC
    0d36 32 10 39 LD (3910),A ; exit trace mode

    0d39 cd 68 0b CALL 0b68 ; fetch command byte
    0d3c 11 65 0f LD DE,0f65 ; Main Command Table
    0d3f cd 43 0d CALL 0d43 ; fetch table entry
    0d42 e9 JP (HL)

    ; fetch table entry
    0d43 87 ADD A,A
    0d44 83 ADD A,E
    0d45 5f LD E,A
    0d46 d2 4a 0d JP NC,0d4a
    0d49 14 INC D
    0d4a 1a LD A,(DE)
    0d4b 6f LD L,A
    0d4c 13 INC DE
    0d4d 1a LD A,(DE)
    0d4e 67 LD H,A
    0d4f c9 RET



    ; Main Command Table
    ; 00
    0f65 16c3 0d50 0d50 0d50 0d50 0d50 0d50 0d50
    0f75 0d50 0d21 0d50 0d50 0d50 0d21 0d50 0d50
    ; 10
    0f85 0d50 0d50 0d50 0d50 0d50 0d50 0d50 0d50
    0f95 16c3 0d50 0d50 0d21 0d50 0d50 0d50 0d21
    ; 20 < !"#$%&'()*+,-./>
    0fa5 0d21 0ec9 11e0 15ac 0d50 18bb 0eaf 0ee3
    0fb5 0f3d 0f4c 0e49 0e25 11d7 0e37 1617 0e81
    ; 30 "0123456789:;<=>?"
    0fc5 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e 0e0e
    0fd5 0e0e 0e0e 190e 1918 0ef2 0f20 0f0f 1549
    ; 40 "@ABCDEFGHIJKLMNO"
    0fe5 1027 1bfa 2989 1eb2 1b1b 1551 2b0b 1559
    0ff5 0d50 1dd2 18c9 1b3b 1b61 1baf 3138 0d50
    ; 50 "PQRSTUVWXYZ[\]^_"
    1005 1b91 1233 1e2d 1c10 159f 1f0a 11f5 1b73
    1015 1fac 2ec5 1c05 17b5 1ed7 181b 18aa 1882
    ; 60
    1025 0d50


    ; @-Subcommand Table
    1185
    43 1052 - C
    4c 1061 - L
    4d 1081 - M
    54 105a - T
    53 1123 - S
    52 1090 - R
    50 1097 - P
    45 109e - E
    4b 10ac - K
    49 10b2 - I
    4f 10b9 - O
    41 10c0 - A
    57 10e4 - W
    58 10dd - X
    59 10ed - Y
    5a 1103 - Z
    56 111d - V
    47 1089 - G
    48 1130 - H
    55 10c7 - U
    42 10d7 - B
    44 10cf - D
    40 1157 - @
    46 115e - F
    4a 1170 - J
    51 110d - Q
    2f 1176 - /
    00


    ; Q-Subcommand Table
    14d7
    4f 126a - O
    49 1262 - I
    53 1294 - S
    43 129d - C
    42 12a6 - B
    41 12b6 - A
    4d 12fd - M
    44 1364 - D
    50 12cb - P
    46 12e3 - F
    54 12ad - T
    4c 12ec - L
    4b 12f4 - K
    52 138a - R
    55 12d3 - U
    58 13ac - X
    59 13c0 - Y
    5a 13c9 - Z
    48 13db - H
    21 13f8 - !
    45 1402 - E
    2d 140b - -
    47 1414 - G
    23 1426 - #
    4a 143d - J
    2f 1468 - /
    56 148b - V
    4e 1494 - N
    51 1445 - Q
    00


    ; U-Subcommand Table
    1f65
    41 1f3f - A
    5a 1f4b - Z
    53 1f57 - S
    43 1f5e - C
    00


    ; X-Subcommand Table
    2952
    41 1fcd - A
    52 25c0 - R
    59 2605 - Y
    57 22b3 - W
    45 27d7 - E
    54 2638 - T
    48 281a - H
    4f 2865 - O
    49 28ea - I
    43 2854 - C
    46 27c2 - F
    4a 2812 - J
    4b 282d - K
    44 403b - D
    4c 2920 - L
    58 2918 - X
    53 400a - S
    4d 294d - M
    00


    ; B-Subcommand Table
    2af5
    4b 29b9 - K
    47 2a83 - G
    43 2a45 - C
    44 2a53 - D
    4d 2a5e - M
    4e 2a72 - N
    45 2ac6 - E
    00


    ; Y-Subcommand Table
    3014
    44 2f3c - D
    53 2ef5 - S
    4b 2f2c - K
    45 2f12 - E
    46 2f59 - F
    52 2fad - R
    49 2eec - I
    00


    ; Predfined Command Table
    ; 80
    302a 3468 3473 3448 344b 3450 3452 3454 345b
    ; 88
    303a 3459 3460 3464 3344 315d 30c3 33cd 33d1
    ; 90
    304a 33da 350b 338c 33a8 33f0 3157 316d 3488
    ; 98
    305a 34c9 34d6 3498 34b7 3504 3508 348e 34ae
    ; a0
    306a 3466 34dd 34f4 3475 3485 3478 350d 352d
    ; a8
    307a 354b 354f 3552 3557 355b 3567 3572 358a
    ; b0
    308a 3159 35a0 35a3 35a8 35ab 35b6 35c1 35c4
    ; b8
    309a 35c8 35cb


    ; Predfined Commands
    3448 (130) -M
    344b (131) -M0W
    3450 (132) M
    3452 (133) W
    3454 (134) -M0L
    3459 (136) L
    345b (135) -@DL
    3460 (137) @DL
    3464 (138) D
    3466 (160) A
    3468 (128) @C=0[Z][A]
    3473 (129) Z
    3475 (163) UA
    3478 (165) @C=0[UZ][UA]
    3485 (164) UZ
    3488 (151) I^M$-M
    348e (158) @X,-L@SQX
    3498 (154) @V=2[@X,-L@SQX][-M0L]
    34ae (159) @X,L@SQX
    34b7 (155) @V=2[@X,L@SQX][L]
    34c9 (152) @X>0[@X-1QX]
    34d6 (153) .@X+1QX
    34dd (161) .@V=2[@X>0[@X-1QX]][-M]
    34f4 (162) @V=2[@X+1QX][M]
    3504 (156) #BM
    3508 (157) BG
    350b (145) T
    350d (166) @T>96[@T-32R][@T>64[@T+32R][M]]
    352d (167) -2M@E%M@0,@TV0-M@T,@0R@SR@SV0
    354b (168) L-M
    354f (169) 0L
    3552 (170) -@JL
    3557 (171) @JL
    355b (172) @X,-@DL@SQX
    3567 (173) @X,@DL@SQX
    3572 (174) @V=2[@X,-@DL@SQX][-@DL]
    358a (175) @V=2[@X,@DL@SQX][@DL]
    35a0 (177) 0K
    35a3 (178) @XQ/
    35a8 (179) Q#
    35ab (180) @/+4Q/@/QX
    35b6 (181) @/-4Q/@/QX
    35c1 (182) QJ
    35c4 (183) -QJ
    35c8 (184) QQ
    35cb (185) -QQ



    ; Instant Command Table
    5273
    a5 01 00 ; (165) ^A
    82 07 00 ; (130) ^G
    84 08 00 ; (132) ^H
    9a 19 00 ; (154) ^Y
    9b 02 00 ; (155) ^B
    83 0f 00 ; (131) ^O
    85 10 00 ; (133) ^P
    a9 06 0d ; (169) ^F^M
    ae 15 00 ; (174) ^U
    af 0a 00 ; (175) ^J
    b6 06 19 ; (182) ^F^Y
    b7 06 02 ; (183) ^F^B
    b8 06 07 ; (184) ^F^G
    b9 06 08 ; (185) ^F^H
    8a 04 00 ; (138) ^D
    8b 0b 00 ; (139) ^K
    92 17 00 ; (146) ^W
    93 11 00 ; (147) ^Q
    95 18 00 ; (149) ^X
    8c 0e 00 ; (140) ^N
    96 16 00 ; (150) ^V
    8e 03 00 ; (142) ^C
    8d 1f 00 ; (141) ^_
    8f 06 13 ; (143) ^F^S
    a6 06 03 ; (166) ^F^C
    90 06 06 ; (144) ^F^F
    94 12 00 ; (148) ^R
    91 14 00 ; (145) ^T
    97 0c 00 ; (151) ^L
    9c 05 00 ; (156) ^E
    9d 1a 00 ; (157) ^Z
    a7 06 12 ; (167) ^F^R
    b3 06 14 ; (179) ^F^T
    b2 06 09 ; (178) ^F^J
    b4 06 10 ; (180) ^F^P
    b5 06 0f ; (181) ^F^O
    bf 13 00 ; (191) ^S
    ff


    ; I/O Subsystem

    412d 00 0000 005c 0080 ; FD input file

    4134 00 ; error input file
    4135 ff ; error output file

    4136 00 0000 4168 4189 ; FD output file

    413d 00 0000 3a77 4209 ; FD tempin file

    4144 00 ; FD tempin file active
    4145 00 ; FCB tempin file open

    4146 00 0000 432a 434b ; FD auxin file

    414d ff ; FD auxin file active

    414e 80 42aa 4289 42aa ; FD auxout file

    4155 29 43a2 432a 434b ; FD current input file

    415c ff ; FD current input file status (ff: unused, 00: input, 01:
    auxin)

    415d 00 ; FD current input file active
    415e ff ; current input file defined

    415f 26 4304 4289 42aa
    4166 0000 ; FD current output file address

    4168 DS 21h ; FCB output file
    4189 DS 80h ; sector buffer output

    4209 DS 80h ; sector buffer tempin

    4289 DS 21h ; FCB auxout file
    42aa DS 80h ; sector buffer auxout

    432a DS 21h ; FCB auxin file
    434b DS 80h ; sector buffer auxin

    43cb DS 21h ; FCB misc
    43ec DS 80h ; sector buffer misc

    446c DS 0fh ; filename input file
    447b DS 0fh ; filename output file
    448a DS 0fh ; filename misc

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Martin@21:1/5 to Tony Nicholson on Sat Nov 20 10:08:35 2021
    Am 11/19/2021 11:00 PM, Tony Nicholson schrieb:
    On Friday, November 19, 2021 at 4:13:12 PM UTC+11, Martin wrote:
    Hi all!

    PMATE *IS* the editor magically touching me :-)

    As a student I constantly dreamed of sometimes getting it,
    but it never happened, it was out of reach for "hobbyists".

    Thanks for these Martin.

    Have you done a disassembly of CONPMATE?

    It's one of those things I've been waiting for "a round tuit" to
    get started on.

    Another bug I've noticed (but done nothing about) is that sometimes
    a reverse scroll (Ctrl-U) when the buffer must be read from disk
    sometimes corrupts the text with what looks like a repeated copy
    of the same sector of data. When this happens I just quit and
    restart (and perhaps have to re-apply some edits).

    Tony


    I really would like to find that one!

    So, let's beginn with looking into the inner workings.

    The instant command "^U" is runs a predfined command,
    which one depends on your editor configuration.

    The old (135): -@DL
    Or this (174): @V=2[@X,-@DL@SQX][-@DL]

    Both result in -@DL so the problem inside PMATE will also
    be triggered if you just scroll via "^Y" instant command
    or the "-L" command.

    This is very unlikely, probably is really a screen update
    problem, because multi line scrolling forces a full screen
    update vs. insert line / delete line in the single line case.

    There is the instant command "^F^F" which redraws the
    whole screen. Could you try that the next time?

    If the screen is redrawn ok, then the problem lies somewhere
    in your custom terminal confguration.


    Hth Martin

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Martin@21:1/5 to Martin on Mon Dec 27 17:39:14 2021
    Am 11/19/2021 06:12 AM, Martin schrieb:
    Hi all!

    PMATE *IS* the editor magically touching me :-)

    As a student I constantly dreamed of sometimes getting it,
    but it never happened, it was out of reach for "hobbyists".

    Now, the great effort of PMATE lovers made it possible.
    Thanks to all of you!


    It took a lot of time to discover enough of its inner workings,
    but it was *REALLY* worth it. It's like a "Magic Machine"!

    I just let the fixes out for every PMATE lover to know,
    without a lot descriptions. Just ask :-)



    To clean up that quick mess a little bit,
    I brought these into a form that is easy to process.

    The following ASM source code generates a HEX file
    you use to patch the CONPMATE.COM 3.21.


    It goes like so...

    a:asm pmpatch
    CP/M ASSEMBLER - VER 2.0
    5E0D
    000H USE FACTOR
    END OF ASSEMBLY

    a:mload conpm.com=conpmate.com,pmpatch
    MLOAD ver. 2.5 Copyright (C) 1983, 1984, 1985
    by NightOwl Software, Inc.
    Loaded 302 bytes (012EH) to file B0:CONPM.COM
    Over a 24576 byte binary file
    Start address: 0100H Ending address: 6100H Bias: 0000H
    Saved image size: 24576 bytes (6000H, - 192 records)


    Every customized "PMATE.COM" you clone using this new
    "CONPM.COM" then has all changes readily applied.


    After showing the "TERMINAL MENU:" it waits for a keypress.
    Pressing 'd' works well with todays "xterms".

    Now wait until the screen is cleared and PMATE is running.

    The best thing to do now, is cloning it (aka saving itself)
    under a new name, I use "PM.COM".

    You see the command line to do this below.
    Every ESC is echoed as $, so I really typed:

    xdpm<ESC>xh<ESC><ESC>

    Then you will by back at the command prompt.


    Happy Christmas and a Merry New Year to all...
    Martin



    Here is how it will look...

    conpm

    PMATE rev 3.21 Configuration Program
    Copyright (C) 1982 by Phoenix Software Associates, Ltd.


    TERMINAL MENU:

    A Lear Siegler ADM-3A
    B Hazeltine 1500
    C Televideo 950
    D DEC VT-100 (ANSI standard)
    E Heath H-19 / Zenith Z-19 / DEC VT-52
    F Soroc 120
    G Superbrain
    H Adds Regent
    I Ibm 3101
    J Televideo 912/920
    K Beehive
    L Hewlett Packard 125
    M Lear Siegler ADM-31


    --- Getting terminal data ---

    --- Processing terminal data ---

    --- Processing MISCELLANEOUS section ---

    --- Processing keyboard assignments ---

    B: BUF=T ARG=0 LIN=0 COL=0 xdpm$xh$$_ --------------------------------------------------------------------------------

    [...]

    MCP/M V2.47 DS



    Here it is the ASM patch, hope it is explaining itself...

    ==== 8< =====
    ; PMATE 3.21 FIXES
    ; FOR CONPMATE.COM


    ; ========
    ; BUG: If the FD auxin file status is active, XI without
    ; BUG: filename tries to read from an invalid auxin file

    ORG 0403H

    CALL FIX1


    ; ========
    ; BUG: Don't allow to set the auto-indent level to 255

    ORG 1474H

    STA 392EH ; auto-indent level
    JNZ 1489H ; zero if overflow
    JMP 1480H ; set with overflow check


    ; ========
    ; BUG: Command XC performs no I/O FILE CHECK
    ; BUG: If issued without input-output file, it overwrites
    ; BUG: page zero through the undefined sector buffer pointer

    ORG 2854H