Megalextoria
Retro computing and gaming, sci-fi books, tv and movies and other geeky stuff.

Home » Digital Archaeology » Computer Arcana » Apple » Apple II » WordPerfect GS bug fix for date?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
WordPerfect GS bug fix for date? [message #379903] Sun, 20 January 2019 16:28 Go to next message
Anonymous
Karma:
Originally posted by: Leon Sargent

Has there ever been a fix for the date bug?

Insert date puts the year as 19119

It would appear, breaking it down...

1900 +1000=2000+19 = 2019
19 1 191 19119

Seems GS/OS 6.0.4 may be patched for the 21st century but WP GS does not use that patch.

Leon
Re: WordPerfect GS bug fix for date? [message #379949 is a reply to message #379903] Tue, 22 January 2019 11:03 Go to previous messageGo to next message
Antoine Vignau is currently offline  Antoine Vignau
Messages: 1860
Registered: October 2012
Karma: 0
Senior Member
On Sunday, January 20, 2019 at 10:28:58 PM UTC+1, Leon Sargent wrote:
> Has there ever been a fix for the date bug?
>
> Insert date puts the year as 19119
>
> It would appear, breaking it down...
>
> 1900 +1000=2000+19 = 2019
> 19 1 191 19119
>
> Seems GS/OS 6.0.4 may be patched for the 21st century but WP GS does not use that patch.
>
> Leon

Found it in the code...

L0B0C4E ENT ; 4 - YEAR ALL FOUR DIGITS
LDA #$0013 ; century is 19...
JSR L0B0C8F ; print century
L0B0C54 ENT ; 5 - YEAR LAST TWO DIGITS
LDA L027D19 ; year > 10
CMP #$000A
BCS L0B0C64 ; yes
PHA ; no
LDA #$0000
JSR L0B0C8F ; print 0
PLA
L0B0C64 JMP L0B0C8F ; print last digit

Next step, try to patch the beast...
Antoine
Re: WordPerfect GS bug fix for date? [message #379950 is a reply to message #379949] Tue, 22 January 2019 11:28 Go to previous messageGo to next message
Antoine Vignau is currently offline  Antoine Vignau
Messages: 1860
Registered: October 2012
Karma: 0
Senior Member
A stupid patch (that does not work as memory is not reserved for my patch)

11/FF80: AD 19 7D LDA 7D19 ; L0B0C4E = JSR $FF80
11/FF83: C9 64 00 CMP #0064
11/FF86: B0 04 BCS FF8C {+04}
11/FF88: A9 13 00 LDA #0013
11/FF8B: 60 RTS
11/FF8C: A9 14 00 LDA #0014
11/FF8F: 60 RTS
11/FF90: AD 19 7D LDA 7D19 ; L0B0C54 = JSR $FF90
11/FF93: C9 64 00 CMP #0064
11/FF96: B0 01 BCS FF99 {+01}
11/FF98: 60 RTS
11/FF99: 38 SEC
11/FF9A: E9 64 00 SBC #0064
11/FF9D: 60 RTS
Re: WordPerfect GS bug fix for date? [message #379958 is a reply to message #379950] Tue, 22 January 2019 14:48 Go to previous messageGo to next message
Anonymous
Karma:
Originally posted by: Leon Sargent

On Tuesday, January 22, 2019 at 11:28:22 AM UTC-5, Antoine Vignau wrote:
> A stupid patch (that does not work as memory is not reserved for my patch)
>
> 11/FF80: AD 19 7D LDA 7D19 ; L0B0C4E = JSR $FF80
> 11/FF83: C9 64 00 CMP #0064
> 11/FF86: B0 04 BCS FF8C {+04}
> 11/FF88: A9 13 00 LDA #0013
> 11/FF8B: 60 RTS
> 11/FF8C: A9 14 00 LDA #0014
> 11/FF8F: 60 RTS
> 11/FF90: AD 19 7D LDA 7D19 ; L0B0C54 = JSR $FF90
> 11/FF93: C9 64 00 CMP #0064
> 11/FF96: B0 01 BCS FF99 {+01}
> 11/FF98: 60 RTS
> 11/FF99: 38 SEC
> 11/FF9A: E9 64 00 SBC #0064
> 11/FF9D: 60 RTS


Thank you for having a look and attempting a code fix.

Knowing things are not as simple as they seem and that I have the most basic understand of coding. I wonder this.

LDA #$0013 ; century is 19...

Would it be possible to load the accumulator with #$0014 by patching the above line.

Would the rest of the original code then just adjust the last two digits of the year along with incrementing the month and day?

Leon
Re: WordPerfect GS bug fix for date? [message #379959 is a reply to message #379958] Tue, 22 January 2019 15:35 Go to previous messageGo to next message
Antoine Vignau is currently offline  Antoine Vignau
Messages: 1860
Registered: October 2012
Karma: 0
Senior Member
I'm currently doing something better ;-)
Patching the binary to make it work for the 20th and 21st century.
Call me for the 22nd ;-)
Antoine
Re: WordPerfect GS bug fix for date? [message #379960 is a reply to message #379959] Tue, 22 January 2019 16:13 Go to previous messageGo to next message
Antoine Vignau is currently offline  Antoine Vignau
Messages: 1860
Registered: October 2012
Karma: 0
Senior Member
Ah, that was a fun hack, playing with the OMF dictionary, aahhhhhh!

The 21th century compatible version (let's call it 2.1b) is now available at http://www.brutaldeluxe.fr/public/wordperfect/

Antoine

BEFORE
SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS SSSSSSSSSSSSSSSSSSSS
0B/0C4E: A91300 LDA #$0013 ; Put 19
0B/0C51: 208F0C JSR $0C8F ; Display century
0B/0C54: AD197D LDA $027D19 ; Get year
0B/0C57: C90A00 CMP #$000A
0B/0C5A: B008 BCS $0C64
0B/0C5C: 48 PHA
0B/0C5D: A90000 LDA #$0000
0B/0C60: 208F0C JSR $0C8F
0B/0C63: 68 PLA
0B/0C64: 4C8F0C JMP $0C8F
SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS SSSSSSSSSSSSSSSSSSSS

AFTER
SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS SSSSSSSSSSSSSSSSSSSS
0B/0C4E: 20B90C JSR $0CB9 ; Check year
0B/0C51: 208F0C JSR $0C8F ; Display century
0B/0C54: 20C70C JSR $0CC7 ; Correct year
0B/0C57: C90A00 CMP #$000A
0B/0C5A: B008 BCS $0C64
0B/0C5C: 48 PHA
0B/0C5D: A90000 LDA #$0000
0B/0C60: 208F0C JSR $0C8F
0B/0C63: 68 PLA
0B/0C64: 4C8F0C JMP $0C8F
....
0B/0CB9: A21300 LDX #$0013
0B/0CBC: AD197D LDA $027D19
0B/0CBF: C96400 CMP #$0064
0B/0CC2: 9001 BCC $0CC5
0B/0CC4: E8 INX
0B/0CC5: 8A TXA
0B/0CC6: 60 RTS
0B/0CC7: AD197D LDA $027D19
0B/0CCA: C96400 CMP #$0064
0B/0CCD: B001 BCS $0CD0
0B/0CCF: 60 RTS
0B/0CD0: 38 SEC
0B/0CD1: E96400 SBC #$0064
0B/0CD4: 60 RTS
Re: WordPerfect GS bug fix for date? [message #379961 is a reply to message #379960] Tue, 22 January 2019 16:30 Go to previous messageGo to next message
Anonymous
Karma:
Originally posted by: Leon Sargent

On Tuesday, January 22, 2019 at 4:13:57 PM UTC-5, Antoine Vignau wrote:
> Ah, that was a fun hack, playing with the OMF dictionary, aahhhhhh!
>
> The 21th century compatible version (let's call it 2.1b) is now available at http://www.brutaldeluxe.fr/public/wordperfect/
>
> Antoine
>
> BEFORE
> SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS SSSSSSSSSSSSSSSSSSSS
> 0B/0C4E: A91300 LDA #$0013 ; Put 19
> 0B/0C51: 208F0C JSR $0C8F ; Display century
> 0B/0C54: AD197D LDA $027D19 ; Get year
> 0B/0C57: C90A00 CMP #$000A
> 0B/0C5A: B008 BCS $0C64
> 0B/0C5C: 48 PHA
> 0B/0C5D: A90000 LDA #$0000
> 0B/0C60: 208F0C JSR $0C8F
> 0B/0C63: 68 PLA
> 0B/0C64: 4C8F0C JMP $0C8F
> SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS SSSSSSSSSSSSSSSSSSSS
>
> AFTER
> SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS SSSSSSSSSSSSSSSSSSSS
> 0B/0C4E: 20B90C JSR $0CB9 ; Check year
> 0B/0C51: 208F0C JSR $0C8F ; Display century
> 0B/0C54: 20C70C JSR $0CC7 ; Correct year
> 0B/0C57: C90A00 CMP #$000A
> 0B/0C5A: B008 BCS $0C64
> 0B/0C5C: 48 PHA
> 0B/0C5D: A90000 LDA #$0000
> 0B/0C60: 208F0C JSR $0C8F
> 0B/0C63: 68 PLA
> 0B/0C64: 4C8F0C JMP $0C8F
> ...
> 0B/0CB9: A21300 LDX #$0013
> 0B/0CBC: AD197D LDA $027D19
> 0B/0CBF: C96400 CMP #$0064
> 0B/0CC2: 9001 BCC $0CC5
> 0B/0CC4: E8 INX
> 0B/0CC5: 8A TXA
> 0B/0CC6: 60 RTS
> 0B/0CC7: AD197D LDA $027D19
> 0B/0CCA: C96400 CMP #$0064
> 0B/0CCD: B001 BCS $0CD0
> 0B/0CCF: 60 RTS
> 0B/0CD0: 38 SEC
> 0B/0CD1: E96400 SBC #$0064
> 0B/0CD4: 60 RTS
Re: WordPerfect GS bug fix for date? [message #379966 is a reply to message #379961] Tue, 22 January 2019 17:11 Go to previous messageGo to next message
Antoine Vignau is currently offline  Antoine Vignau
Messages: 1860
Registered: October 2012
Karma: 0
Senior Member
Thank you for the challenge, that was a fun hack!

Antoine
Re: WordPerfect GS bug fix for date? [message #379967 is a reply to message #379961] Tue, 22 January 2019 17:15 Go to previous messageGo to next message
Anonymous
Karma:
Originally posted by: Leon Sargent

On Tuesday, January 22, 2019 at 4:30:31 PM UTC-5, Leon Sargent wrote:
> On Tuesday, January 22, 2019 at 4:13:57 PM UTC-5, Antoine Vignau wrote:
>> Ah, that was a fun hack, playing with the OMF dictionary, aahhhhhh!
>>
>> The 21th century compatible version (let's call it 2.1b) is now available at http://www.brutaldeluxe.fr/public/wordperfect/
>>
>> Antoine
>>

That is just amazing.

Thank you.

I am going to transfer this over to my GSPlus emulator from my Mac and give this a road test.

Seeing I forgot to post this 42 minutes ago...

I can say that every date format available as well as including any format of time, full time, partial etc all work perfectly.

Leon
Re: WordPerfect GS bug fix for date? [message #379968 is a reply to message #379966] Tue, 22 January 2019 18:16 Go to previous message
Polymorph is currently offline  Polymorph
Messages: 206
Registered: October 2012
Karma: 0
Senior Member
On Wednesday, January 23, 2019 at 9:11:46 AM UTC+11, Antoine Vignau wrote:
> Thank you for the challenge, that was a fun hack!
>
> Antoine

Nice work as always Antoine!

And thank you too Leon for noticing the problem and bringing it to the attention of one of the heavy weights! ;-)

Cheers,
Mike
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Monochrome low res demo
Next Topic: Apple IIc memory test
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Tue Apr 23 02:30:43 EDT 2024

Total time taken to generate the page: 0.04265 seconds