-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathlogforth.txt
16342 lines (14424 loc) · 602 KB
/
logforth.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
2000 jan 17
10:30 Finaly started. directory structure created and readme's.
goals for today
- directory tree and its readme's
- Getting a preliminary backup in order with floppy's
- internet connection running
- fetching fig forth for MSDOS
2000 jan 19 (wed)
managed to get connection to the internet again
2000 jan 21 (fri)
Fetched nasm from the internet
And the classical fig86 forth. To be called classic.asm.
This one runs under MSDOS after assembling with MASM/TLINK
Th
2000 jan 26 (wed)
Nasm installed under unix.
Massaged clasic.asm such that is is assembled by nasm.
2000 jan 29 (fri)
classic.asm edited such that it is yieds the same
.com file if assembler by nasm as previously by MASM.
The last bits had to be done in this way:
generate both files and disassemble them.
compare the disassemblies. if the binaries are different
and the assembly code is the same, then approve.
This results from the bizarre circumstance that Intel
has lot of duplicate ways to encode instructions even
not counting different instruction lengths.
Last non trivial difference was found this way:
in DW X,<expression containing $>
Nasm interprets the program counter like it was at the
start of the line. MASM uses it as if it was at the last
comma (at least with DW).
The resulting executable was tested and runs sueccessfully.
2000 jan 30
1h think
1h doc
5h contributing back (nasm version of fig86)
11:00 The source has been badly mould through my escapades.
I want a version that is very close to the original, then
sent it back to the archives where I got it from.
I have created strt/archive/fetched with a copy of the archives I used.
13:00
13:30
Created a neat version of Fig86.asm that compiles under NASM.
Placed in archive forth/classic/RCS/classic.asm,v
17:30
21:30
Nadenken over de manier waarop we verder moeten.
22:30
2000 jan 31
4h5 System management (make)
4h5 contributing back
8:30
The first action is to make a version that generates via m4 a
MASM as wel as an ASM version.
Made a framework: makefile and empty version of *.m4 files.
13:00
13:30
fig86.gnr now generates a MASM and a NASM version.
16:30
To be done output of the masm version compare with the original.
23:00
Still some errors : BYTE, WRD PTR, an extra nop.
Now it really compares okay.
00:40
2000 feb 1 (thues)
2h5 System management (mail/news)
2h5 sm (m4)
4h Headers.
8:00
Panick: it looked like news feed and mail did no longer work
on sparc. Rebooting and checking. Removed GATEWAY from rc.*
scripts.
10:30
Version 0.5 of fig86.gnr generates the classic fig forth
for MSDOS for bot assemblers. This has really be tested okay.
This has given the SANSHEADER label because no labels have
been generated automatically.
Wrestling with m4 for the headers
13:00
......
13:20
putting HEADER in.
17:30
More and finished.!
18:30
......
20:00
Getting the BRANCH stuff into a macro. Done!
So most OFFSET removed from fig86.gnr.
21:30
Studying the FCB. It is perfectly unclear how an MSDOS
program gets a filename from the command line.
23:00
And also the OFFSET removed from fig86.gnr related to XLOOP.
23:30
2000 feb 2 (wed)
7h5 hesitation.
8:45
Think about how to change the I/O
11:45
.....
13:00
Compared the old forth.ps and the new fig86.gnr.
It is clear that we can get rid of the printer stuff.
Further I want all I/O as either BDOS or BIOS functions.
Nobody is working with two floppy drives nowadays.
We can firmly establish a block as a 512 byte sector.
It is even dubious whether it is worth while to
make a distinction between sectors and blocks.
15:00
...
17:00
Made up my mind about what the next step is.
Removed some things from the generic version.
18:30
...
20.00
Some more thinking. A few of those headers contained
a colon address with a comma. Oh well.
22.00
2000 feb 3 (thu)
9h5 thinking
10:15
Night: it becomes clear that
1. a msdos version should use files. It then has no
longer problems with blocks lengths: you can read at one time
whatever you want.
2. a bios version must use sectors, of course.
Throughout MSDOS sectors are 512 bytes. Strange because
sectors are imposed by the medium. Well.
3. an msdos version should use the EXPECT/TYPE system as
basic. So
: KEY BUFFER 1 EXPECT BUFFER c@ ;
: EMIT BUFFER c! BUFFER 1 TYPE ;
4. A bios version should contain a full load of files
occupying one track.
JEE! lost an edit session, where I reconfigured
fig86.gnr
But the steps become clearer now:
1 make an MSDOS version with the dependant stuff screened off
by conditional compilation.
2. Test this version, more or less.
Or still better, put in equivalent definitions, test those
and then get rid of the old ones.
3. Check whether the remainder is the same as some part of
the old forth.ps
4. redefine the screened off definition for BIOS
12:00
13:00
MSDOS version checked in, i.e. a version functionally equivalent
to the classical but with the system dependant stuff together
and made dependant from _____USEDOS__
and some m4 stuff done.
I have compare the new version with the working BIOS version
but that was not very enlightening.
Now putting the working BIOS stuff back into this.
So we have an assembling version.
18:30
...
20:00
Testing : there is somethong wrong (no carriage return).
Also after several pages of output the systems crash (alone and msdos)
The masm version did not assembler
Studying different layout of disks.
22:00
2000 feb 4 (fri)
20:30
Testing and bugs. A default configuration is made where msdos/bios
specialise on
23:00
2000 feb 4 (sat)
9:20
More thoughts, the 32 bits symbols.
Checked in and labeled. 4 configs. To be added another orthogonal
switch alone/hosted (using a bootsector on a floppy, and not).
And the I/O system could be enhanced with a MODERN version were
there is character i/o at line level and EMIT derived from TYPE,
KEY from ACCEPT / EXPECT.
The orthogonal definitions have been added and some cosmetics is
done to improve the generated files, manipulation of the
link field of the FORTH vocabulary etc.
MSDOSBIOS label attached to this version that is truely generating
2 times 2 version, that work.
15:00
17:00
Incorparated the booting but this doesn't work yet.
19:00
20:00
Surprising: there is no assembler instruction in Intel to multiply by
a constant. I didn't realise that so I didn't believe the message nasm
was giving.
21:00
2000 feb 6 (sun)
Rest!
2000 feb 7
10:00
Made a backup to wards the sparc machine.
Now going to compare the boot floppy generated with the one we already had.
and getting it going.
Yes, de stuff boots. Lots of cosmetics done, in preparation of eliminating lots of
magic constants such as related to data with a fixed distance to the origin.
Discovered the dirty word +ORIGIN. Should not be used.
But first a check whether it is also a proper MASM version.
15:30
...
16:15
It turns out that the new version doesnot assemble cleanly under
MASM/TASM. Some fixed have to be done such a
RESB -> NEWORIGIN also the SAR AH,5 turns out to be in fact an
assembler feature of TASM. It should give the message. Constant 5
out of range (must be 1, or CL). The JMP to ORIG is also problematic.
Because the result is a PROC.
Managed to get the ASM effect running again.
18:30
Een feestje bij Coos. Een paar vrienden va hem waren redelijk
geinteresseerd.
2000 feb 8
11:00
De following tasks can be addressed immediately
- working on outline
- experience with TEX
- version that boots from floppy simple without strange boot layout
* version that boots from floppy that is still recognized by MSDOS
- version that uses only modern features of MSDOS
- bootable version that goes 32 bits
- getting webside back
- building the STNT, buying and assembling
- version that boots from floppy that handles hard disk.
- decompiling to get a still smaller kernel
- getting posting of news running
- getting the portable available for experiments
- hanging the digital on the local network
- getting KDE
A lot of fiddling around with those problematic booting procedures of DOS.
At least the bios version gives a cr with each lf again.
18:00
......
20:00
Bootable version generation
23:00
2000 feb 9
3:00
The bootable version is tested and works.
Labeled BOOTABLE.
Backupped
6:30
2000 feb 9
14:00
I tend to go working on this aspect now:
- version that uses only modern features of MSDOS
This is a nice mile stone to have published on the net.
Starting first with rewrinting the character I/O
19:00
...
22:00
While testing the MODERN version I discover
The _USEDOS_1_ somehow doesnot work anymore.
I get confused when testing
0:30
2000 feb 10
9:30
Forget about the modern version. First debug what there is
now.
Done, and there are no problems.
13:00
..
13:30
Buying a hard disk (20Gbyte) floppy drive TEAC
(not as nice solid as I expected, NEC CD player,
PCI video card. 56 k modem.
ready with stuying the new stuff.
18:00
2000 feb 11
9:30
* getting the portable available for experiments
Trying to at least get at the point where the duplicate versions
of the character I/O can be shown to work.
It works. The MODERN Disk i/o can be programmed
Fixed the batteries on the portable.
It turns out that the there is some disturbance
resulting from the change from the filosofy
a block is a sector to a block is a screen.
I think it is programmed correctly such that the
values can be changed.
17:30
...
20:15
Programmed disk I/O
20:30
21:00
Checked and test MODERN disk I/O.
It can now list blocks from a file.
But changing it is difficult.
The listings looked terrible, because the CR LF
pair was not sent. Now they look terrific.
There is a weird error, as if the data is not written to disk properly.
23:00
2000 feb 12
8:40
What can I get going before the HCC meeting today.
9:30
2000 feb 13
12:30
USEDOS and MODERN versin of disk io debugged.
USEBIOS had the problem that it read only one sector.
This has now been fixed and is ready for testing.
16:45
2000 feb 14
9:30
Testing the bios version
The following bytes me:
mformat -k restores the sectors/fat to 1.
This means that if I copy a file to a: it will not
always start at a block boundary. Which is inconvenient.
I filed a bug report for that.
At last all three I/O systems for disk work.
12:30
...
13:00
16:15
2000 feb 15
11:30
Strugling yo het my home page on the internet again.
I need Diane's help to reactivate my account.
After a lot of work I decide that it is impossible to
to get the account without somebody with a working internet
explorer. Diane doesn't have one, but the neighbours
(Seepers) have one.
17:15
Evening : managed to get my secret code for the HCC
thanks to Seepers.
2000 feb 16
9:20
Internet account ppp working on hccnet also.
12:30
...
13:30
Serving on the internet is possible.
Also using the mail, I have ordered the infamous THINKING forth
by MPE.
Internet account ppp working on hccnet also.
Got 168 messages from kadernet.
It is possible to switch the internet servers by the scripts
kadernet and hccnet.
It is necessory to change the pop server switching from
kadernet to hccnet as follows :
kadernet 0000405 mail.hobby.nl
hccnet a.w.m.van.der.horst pop.hccnet.nl
19:30
....
20:00
2000 feb 17
11:00
Internet page updated, in order to recieve the new stuff.
At last found everything together that we want there.
17:50
....
20:00
So at last my home page is up and running again.
* getting webside back
23:00
2000 feb 18
10:00
I now can put my first result on the net.
I think I should combine this with the 68K assembler listings.
First what should be in there :
readme with
ad for nasm
explanation of three version I/O, two version layout, two version
booting
Out of the 12 version 4 the booted versions that require MSDOS
are not useful.
motivation
A hosted modern version, and a booted bios version
The generic source and all the .m4 files.
(Preferably the FIG glossary.)
readme.txt has been finished.
13:00
13:30
Using zip to generate a release.
Testing reveals that lacking the block file, weird things happen.
genboot.bat was no good and also has ; as a RCS comment.
MASM cannot handle unix text files.
RESB is not accepted by MASM/TASM.
16:00
...
17:00
sat worked hard to get my floppies from cp/m read.
sun "
mon 21
tues "
wed built system, floppy doesn't work
thurs Bought 500 MHz Pentium IIIe system
fri floppy still doesn't work
* hanging the digital on the local network
sat careful recheck. Two floppy driver were broke, the new one
could not stand jumpering to DS0. (0 ohm SMD R).
sun filosofing about a Pentium assembler.
mon more " " "
can write to UDMA66 drive.
29 feb 2000 tues
11:00
* building the STNT, buying and assembling
Have worked iregularly these last weeks.
Cleaned the 360 K drive for Artemis and got it working.
But, it is better to have a block file on a 1m44 floppy,
copied from 360K drive. Inspecting 360 drives per se not very
useful.
19:00
.....
20:00
I now want to do the simple screen editor.
Not so.
1:00
1 mar 2000
9:30
Trying to get the orignal cp/m figforth floppy read.
At last I killed my second 360 kbyte drive. Ths side 1
head reads but no longer writes.
13:30
...
14:00
More experiments and cleaning of the 360 kbyte drive.
It will still work in the Osborne....
16:00
Start with the editor.
The P editor is available.
17:30
18:30
...
19:30
The editor works somewhat, i.e. I can roam around the
screen and type characters.
23:00
1 mar 2000
9:30
Deleting and undeling lines added to the system.
12:30
...
13:30
More things.
18:30
22:30
Splitting and joining. other things improved.
1:00
6 mrt 2000
10:00
* simple screen editor
* adding the mini string package
TOday we must debug the assembler.and use it.
Lets first get the $. stuff.
Done
Adding the deleting of words to the editor.
I would like to have my ultimate debugger handy for this.
Debugging the assembler. Opcode sometimes will not load
with mysterious message. I can now run a code definition
that only does "next" (a macro.).
Quick reference card made.
1:00
2000 march 7 (tue)
9:30
* improving on the quick reference card.
* adding the second age instrucitons
* comparing the qr with the code
* assembler is practically finished.
Quick reference card now also contains the second byte opcode
instructions. And all checked against the book.
A note made for publishing it on the internet.
12:30
* version that boots from floppy that handles hard disk.
Another sweep through the notes.
Backupped. Carefully checked.
Now the hard disk. Function 4100 bx=55aa .. int 13H works and tells
that the disk supports all the clever things. EDD-3.0
42 --4e functions of hardware interrupt 13h
Continuing harddisk
18:30
19:30
Can boot from hard disk! (With the help of C. Haak.)
Helped with debugging assembler.
BOOTHD boots from hd but still uses the blocks from floppy.
version 2.24
1:00
2000 march 8 (wed)
10:00
* make a system that uses hard disk I/O
* make something on floppy to copy (an other)
floppy to hard disk.
Idea make backup systems using offset. = xK
Have boot sector refer to x.
Make r/w restricted to offset + 1k blocks
Split the system over 32 backups rotating. Each 256K.
From that 50K for the system.
Normally writing a system will not write the bootsector.
So the old system still boots. Than in the old system you may
either copy the newly written system and the current screen to
a new mark and than update the boot sector. Or you may write
the current system and current screen to a new mark and update
the boot sector. later on we could add a way to boot from any of the
available systems.
Have made a system that uses hard disk io after booting.
Going to test.
12:30
..
13:00
Much messing around. It is no use to manipulte half blocks.
(The first file on a 1.44 floppy disk starts at an odd sector
boundary.)
19:00
...
20:00
Boots pleasantly from hard disk. Use restricted to 255 blocks.
22:42
2000 march 9 (thur)
11:00
Made a backup system for the screens
And used it to have a reasonable backup.
12:00
The guys of the Forth gg are here for a meeting
. The assembler got Willem interested.
At the end of the meeting there I show how the system boots and the editor
. There must be a mailing list with Willem Coos and Ben.
22:00
made READ-BLOCK double precision.
Copied a piece of NUNI going to protected mode and back.
3:00
2000 march 10 (frid)
11:00
Wasted my time with 64 bits musings.
12:0
..
13:00
Seen the light. Just suround BIOS with DISI en ENI. And a same pair in next.
Then you can do protected mode with impunity.
17:00
...
22:00
First of all. Lets introduce a 16/32 configuration thingy.
Much done like introducing DC, CELL and CELLP.
23:45
2000 march 10 (satd)
9:30
- putting 16 bits Forth in protected mode
- doing more 16-32 portabilty issues
Alterntatives
- testing 32 bits Forth directly, with protected mode.
- testing 32 bits Forth under Linux without protected mode measures
- testing 32 bits Forth directly not in protected mode by playing assembler tricks
in nasm
The problem is, I want to go 32 bits, bu really I got to test protected mode first.
Over last week , see also notes.txt in the FIG86 directory.
14:30
...
15:30
De conclusie is onomkoombaar Setting van protected mode via MOV CR0,DX
werkt gewoon niet.
17:30
2000 march 11 (sun)
15:00
19:00
...
21:00
Some vague experimenting resulting in the printing on the screen of an 'N'
by incrementing a memory location. The second time it fails, it looks like
the return somehow resulted in a change of the data segment. Apparently the
code segment sticks. Which is queer.
23:00
2000 marc 12 (mon)
9:00
Trying what happens if I just do not fill in the data segment, like
I didnot fill in the code segment. This just works!
I can run in protected mode! The delete key doesn't work in editing a line.
And of course the editor itself doesnot work.
12:30
..
13:00
Some experiments. It looks like the gdt is not filled in at all
18:30
2000 marc 13 (thu)
10:00
I can store the gdt back in memory and it looks all right.
I realize the system is now working in a strange mode.
The control content of CS and DS agrees with a real mode content of
7C0 (two times). However the content of these register in protected
mode is also 7c0, but there is no descriptor at 7C0 to be found.
This means that CS and DS cannot be loaded, or the switching between
real mode and protected mode breaks down. There is however a chance to use
ES as long at is restricted to one mode. The bizar consequence is that
while accessing video memory we are switching back to real mode.
12:00
13:00
If I can manage to put in a switch at L@ too, I am prepared to have
the protected mode stuff into the official version.
But none of the protected mode programs I saved run any more.
So I start with cleaning up the mess around +ORIGIN.
+ORIGIN can now be used to fetch statrup values for the user variable.s
Everything is put into the user variables, such that they are increased
to 100H (keeping in mind that they are going to be increased to 32 bits.)
It turns out that the buffer for READ-BLOCK cannot start at an odd addres.
(probably a DMA thing.)
The reason I thought the saved versions didnot work was that ?TERMINAL
always returned true, such that vlist reported an empty dictionary.
Test done with CHFORTH. Byte benchmark 5 ms on ARTEMIS-0 .
FIGFORTH takes 11 ms.
The kernel code of Linux has been studied. It reveals that for a decent
system the interrupts at low numbers must be moved, such that all the
system traps become available. There is however nice code for that.
An attempt is made to run 32 bit protected mode code, but it was
even unsure whether it really was 32 bit.
23:59
2000 mar 16
9:00
At last a strategy develops :
1. first make a gdt such that loading the descriptor from 0x7c0 into
the code segment results in a code segment at 0x7c0, i.e. switching
between real and protected mode can be done, and, while in protected
mode, a jump to some other segment can be done, and back, as long as it is
done before switching to real mode again.
2. add a stack segment, such that in real mode the stack is at a free place
( not overwriting anything.
The above can be tested from a working Forth system.
The memory layout becomes
00
.. whatever
7c00
.. Forth
17c00
17c00
.... BIOS stack while Forthing
18000
.... GDT
20000
[ if the forth is started from MSDOS, 7c00 is replaced by the load address. ]
3.
Change the code segment to a 32 bit segment and debug the forth.
In this way the constant reloading of the code segment is circumvented, which is
much too time consuming.
Testing in Forthis succesful. Screen 41 .. 44 show how to create a
16 bits and 32 bits code segment. Experiments show that you can only
switch from a 16 bits code segmen to real mode. But it is possible
to jump to a 32 bits segment then to 16 bits and then switch to real
mode.
In screen 1 there is now a nice dump for general segments.
The normal dump was improved too.
There were problems with listing block 255. It turns out that masking
the block number to restirct it to 255 must not be used in BUFFER
which is using absolute block numbers. (Only in BLOCK itself.).
Thank you, Coos.
23:00
2000 mar 17
9:30
Succeeded in temporarily changing the data segment.
Two improtant errors found in the assembler :
C|, used ! instead of C! to store the ored result back.
If W| is not the first fixup this leads to distastrous results.
Furthermore the groups containing CLI/STI were advertised as two
byte opcodes.
Added a group of Pentium opcodes (TO-REAL,) and the facility to
have three bytes opcodes.
TO-PROT now switches to a 32 bit code segment. Then loads
a 32 bit data segment, uses that to put an 'a' on the screen,
then switches back. The switching involves disabling interrupts,
setting the protected mode bit and saving the data segment (and
back).
17:00
20:00
Introduced LEA ..,[..+CELL] instead of INC ..
This is of course compatible with the 32 bits, and need
then no more change. However. It turns out that LOAD-GDT
starts crashing once you do this. Everything else works
okay. Through version 2.29..2.31
23:00
2000 mar 18 (fri)
11:00
More experimenting, especially surrounding the load-gdt with nop's and
running it with interupts disabled and surrounded with nop's such that
chances of overwrioting code diminish.
It crashes after the load-gdt finishes.
12:00
..
13:30
Experiments reveal that if the load-gdt is replaced by nop's it crashes in the
same way. This means that the problem has started with version 2.31.
Solved! Because next has changed, it must change in the assembler too.
17:00 ..
22:00
Timing of the switching and of the innner interpreter.
Switching takes 0.7 uS. Including jumping to the 16 bit code segment and
jumping back. Eliminating that makes hardly a difference. TO-prot, as found
in screen 44 with some more hoolabaloo (writing to screen, loading data
segment some nops), takes a full uS. The inner interpreter test (nested
DOCOLS take 10 us for a 2^10 nested call, ultimately executng the empty ": A0
;" a thousand times.
he stack segment must get a 64 kbyte space clear from the real stack.
The handling of the stack segments in the source is okay provided that
you go with the interpretation in protected mode that segments are pointers
into the GDT (or LDT for that matter.).
25:00
2000 mar 19 (sat)
sat 8:00
Decided to do the switching first in the Forth itself. Made nice and clean
screens to do the switch. At last installed the version with the improved next
and intepreter handler on the hard disk.
12:00..
15:30
Disapointment : the switch doesnot work.
19:00
some thinking
21:00
2000 mar 19 (sun)
13:00
I really must be more disciplined. Like getting up at 7 a.m. and do some
exercice. Doing aikido every wednesday. Trying to get even with the paper
work every monday. Use thuesday (unless SP activities) to improve the
houshold. in a technical sense. Start the day with some clean up, like the
most urgen thingies. If things go bad, read the Forth news, or Nature. Keep
the still to read things near my bed such that I can get rid of things that
can be thrown away. Make a box withincoming stuff and clean that out at
least every monday.
It becomes clear what goes wrong. I really cannot do without at least
initialising the codesegment and data segment properly, because (FIND)
intialises the extra segment from the data segment. However zooming in
on this problem reveals little. I have very carefully checked the switching
and it keeps on crashing. So I guess I start with the save versions that
allowed to switch to protected mode. Than built gradually everything in.
19:30
..
20:30
The simple version works. After getting rid of superfluous asignments
to segment registers. 2.35
23:00
2000 mar 20 (mon)
9:40
Made a mess out of it. Di not realize I had to use STOSW instead of
LODSW. That it uses DI instead of SI, and that it goes to ES:
instead of DS. So..
12:30
...
13:00
But at last I can check that GDT is filled in more or less
at its proper place. --> 2.36
19:00
21:00
23:00
2000 mar 21 (mar)
10:30
Debugging the 32 bit version. Made an auxiliary to shwo the
SI. Works except for the mass storage.
19:00
20:30
It is clear what was wrong. The code segment must be
set for you can hope to get blocks from disk.
With the help of Coos sorted out which numbers in the
structured programmig words were magic.
25:00
2000 mar 22 (wed)
8:30
Much cleanups for the 16 bit version.
The segments better defined.
It turns out to be possible to do conditional code with the
_yes _no mechanism.
13:30
14:00
Debugging. It is a bit frustrating but the 32 bit version wil not
run. It looks very solid. There seems no reason it should have more
problems than the 16 bit version. But after the cleanups the 32 bit version
works no more.
19:00
20:00
version 2.42 can now handle hard disk io. It is a candidate for putting
it 16 bit protected mode version on disk.
I have copied the screens 90 97 and 91 to the hard disk.
21:40
2000 mar 23 (thur)
9:00
2.42 must now be put correctly on the backups.
First compile HD version. called 2.43
Now I have the buffers handled correctly for protected mode.
13:00
Working
Found back a working 32 bit version and labeled it PROT32
19:00
21:00
BAsed on PROT32 a whole chain of versions approaching PROT16
is written, in order to find out were the difficulty lies.
22:00
(stukje geschreven voor robotica blad.
23:00
It turns out that setting the datasegment before calling the bios
makes the system crash. It is correctly restored afterwards in protected
mode, but that doesnot help.
But YOU MUST REALIZE THAT IT IS 16 BIT CODE. Just putting code there results
in an extra 0000H interpreted as an instruction, and a total mismatch of
everything. And indeed it now works. gehackte baddespray. What a success!
I become not good! Version 2.40.1.5
26:00
2000 mar 24 (fri)
* bootable version that goes 32 bits
10:00
First thing : backing it up.
Second thing sending a message.
Now I wasted some time composing a message about CASE.
Putting the knowledge about what was wrong in the latest version
leads to something that can load screens. The editor however doesnot
work and the assembler crashes presumably because it patches at a wrong
location. I think I just must put the words CELL+ in the
basic Forth. and CELLS in the 100 screen.
Problems areas :
L@ L!
VLIST ID. (?)
BEGIN WHILE REPEAT constructs
The L@ L! is the most urging because it applies to the editor.
The version 2.46 has the L@ L! problems fixed, by completely recoding the
words such that they are in protected mode equivalent ro the real mode, i.e.
the editor works again vlist (and probably ID. as it is used by VLIST
work.) The assembler doesnot work. Executing a word generated by the compiling
word VOCABULARY leads to an immediate crash.
For the moment the loading of screen 96 (assembler) is suppressed.
CELL+ is added to the system and CELLS CELL is added to screen 100.
This has been done in the disk version.
This improved version is stored with the label PROTA.
It turns out that the L@ L! definitions need improved. They don't work
with 16 protected mode. (In fact the even did not compiler.
13:30
Fixed L! L@ such that it works for real and both protected modes.
Editing screens now works. Also fixed LFA such that VLIST and ID.
now work. Version 2.47 installed on hard disk. This agrees with total
RCS version PROTB.
18:00
2000 mar 25 (sat)
9:00
Tried to fix the vocabulary's. Phoned with Coos.
Apparently 810A must be interpreted as characters. Done that.
It turns out that making CELLP into TWOP in DOVOC helps.
Now at least the FORTH vocabulary runs.
It still crashes of creating a vocabulary AAP.
inspecting reveals that such a vocabulary point halfway the
cfa of FORTH. This must be wrong.
14:30
Other events :
Went off showing the results to Coos. It turns out that
I made a wrong version (HD instead of FD). BUt I got the
installation manual for scanning, in order to add some documentation
to fig-FORTH.
New floppies made. But only given to Diane yet.
Trying to scan at Diane's. But here OCR program is no good, and
you have no idea what resolution to use.
2000 mar 26 (sun)
10:00
After a lot of experimenting it looks like this is the way:
Do not use the very small print of the A5 fig Installation booklet.
It turns out that scanning the larger (A4)
fotocopy I have (although dirty
and old) gives better results. Still such A4 contains four pages of
type writer text in two columns. The scanning resolution is set at
600 dpi. The scanning intertwined with OCR leads to crashes.
So the procedure is :
Scan all pages (each resulting in a 4Mbyte file 1 bit per pixel!).
Done From Corel Draw Aquire.
Flip them such that they are upside down and mirror image.
Start Up READIRIS.
Configure :
1. page lay out, rectangle defining text (use the floating 3 button
item in the right hand corner for this.)
2. Make sure to set text (fixed font), source (from disk), output file
name( and appending, not creating), maximum safety, interactive and
learning, retain paragraph and line information.
3. save this configuration under some name. (Windows tends to crash.)
Even with the poor quality print the OCR works reasonably well.
(Many a's are closed to the point they resemble 8. m have a large lower
serif's that tend to close. I have yet to see a = where the two line
are separate. A w seldomly has a differentiated middle part. Some char's
have holes. All this means a lot of interactive work.)
At the end of the sunday the installation manual and the glossary
are scanned. As well as the picture.
Making fotocopies with the Artiscan and the desk jet :
Scan at 300 dpi b/w. Then just print at 300 dpi. All possible
from Corel Draw.
2000 mar 27 (mon)
13:00
Do not know what to do now.
Some improvements to the Fig documentation.
19:00
21:00
Coos Haak helps again. Now the vocabulary problem is solved.
It turns out that the word CFA was used to skip backwards over
the dummy namefield of the vocabularies. However this must be
" 2 - " and is then portable to 32 bits.
Ventilated the idea of eles to Coos Haak.
24:30
2000 mar 28 (tue)
8:30
Going on with ispell.
glossary.txt and figdoc.txt are now spelling checked and formated.
For 'JMP NEXT' the macro _NEXT has been introducedd (2.49)
The OFFSET has been placed at user variable 11. U0 has been introduced
as user variable one. RUBOUT is user variable 2. Both at their sure place
now.
13:30
..
14:00
The both jumps in the bootup area take 2 cells each.
The version numbers are supposed to take 2 cells.
So the initialisation of the parameters start at 6 CELLS +ORIGIN.
OFFSET gets the more modest offset of 11.
This is approved and put into version 2.50
In 2.51 now all user variables are in the correct position.
Remains to be done the FIGREL and JMP CLD stuff.
15:00
22:00
Searched the internet for assembly language forths.
Found two at mhx's site.
24:00
2000 mar 29 (wed)
11:00
Looking into a Unix version.
Study reveals that Marcel just does the following
For his EFORTH. Put the code at some address, that is apparently
allocated automatically, then jump to it.
It turns out to be very difficult to arrive at ?TERMINAL
(?KEY in ANSI parlance.) All my attempts to find an example of where
there is a look unto some pipe failed. Fetching the stat structure
of file descriptor 0 or 1 gives always 0 for the size. I may be doing
something wrong. MArcel Hendrix code is incomprehensible as always.
There is no need to save BX BP SI DI as they may not be use by
C routines without saving them first.
(16:00 )
Cleanup before starting the Linux version
19:00
...
20:00
* getting the ORIGIN parameters set up according to the model
All boot parameters (17 cells) precisely according to the fig model.
Testing of 32 bit protected 16 bit protected real bootin and msdos mode.
All works resulting in version 2.51.
M4_CELLWIDTH introduced.
21:00
2000 mar 30 (thu)
11:00
A figforth that at least does KEY and EMIT and TYPE.
Acording to the MHX system, via something that is loaded at a mysterious
address.