Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

WS4HTM Version 3

22 views
Skip to first unread message

Mr Emmanuel Roche, France

unread,
Dec 24, 2009, 10:26:50 AM12/24/09
to
WS4HTM3.WS4
-----------

- "WS4-to-HTM File Converter -- Version 3"
Mr. Emmanuel ROCHE
15 December 2009


The Monday 25 August 2003, I published "WS4HTM.BAS", a WS4-to-
HTM File Converter, on the comp.os.cpm Newsgroup. 5 years later,
after a few improvements, I had the surprise to see that its
mention generated some requests for it, while it had been free
and silent for 5 years! However, I had not worked on it (read:
"improved it") for years, so there was no reason to release my
"in house" version, even if it improved a little bit on the
published one.

Just a few days ago, don't ask me why (probably because I was
surprised by the time it took it to process the longest WS4 file
it has ever processed), I had the idea to add a "time spent"
display, after each filespec. (Before that, I wanted to display
the files processed, 5 filespecs per line, a la CP/M Plus.)

It just happened that I remembered one TIME program provided by
Locomotive Software in its Mallard BASIC manual for MS-DOS. So,
I just copied it from my manual, and inserted it inside WS4HTM.
After understanding how to improve it to work several times in
the same program, it ran fine.

A few days later, again don't ask me why, I had the idea to add
a "byte count" to each file processed. Since the program reads
bytes from the input files, this was easy to do. I started to be
pleased with the program. I even mentioned it, in a private
message. My correspondent then asked for this new version and,
since it already had the previous version, I agreed to send it.

The next day, I had the surprise to receive the message: "The
program does not work!" After a few inquiries, I found that my
correspondent was using Mallard BASIC Version 1.29, the one
provided with the Amstrad PCW8256, under a CP/M emulator. Me, I
am using Mallard BASIC Version 1.50 under DR-DOS Version 7.03.

I then searched for an 8-bits TIME program. I remembered that
John Elliott had mentioned that the "Spectrum +3 CP/M Plus
manual" was online, and contained a DATE program. So, I checked,
and found that it contained a TIME program, too. Good.

Now, how to test it?

I still have an Amstrad PCW8256, but drive B no longer works. Of
course, all my programs were on B floppies... I asked my
correspondent which CP/M emulators he was using: 22NICE and
CPMEMU. I asked him if he knew how to know which "BDOS Version
Number" they were emulating. Upon receiving a negative answer, I
sent him a file describing the process, step-by-step. It turns
out that 22NICE emulates CP/M 2.2, curiously, given its name,
and CPMEMU emulates CP/M Plus.

Haha! End of problem? I delved into my old programs and
microcomputer magazines. When the Amstrad PCW ruled, I had
published various Mallard BASIC programs displaying, among other
things, the "Page Zero", the "Resident BDOS", the "SCB" (System
Control Block), and the "Resident BIOS" of a CP/M Plus system,
like the Amstrad PCW. So, after managing to refind those old
programs, I ran a copy of Mallard BASIC Version 1.29 under
CPMEMU. PAGEZERO.BAS worked fine, except that there was a
problem with the "Resident BDOS": according to it, it was
only... 256 bytes long!

However, when I ran RESBDOS, SCB, and RESBIOS, all of them
displayed garbage on screen. It turned out that CPMEMU did not
care to copy an 8-bit "Resident BDOS" and "SCB" in the top of
memory, but was only emulating the "system calls". So, my
programs could not find any "Resident thing" in memory, since
only a 16-bits Resident BIOS was present in memory. Problem.

It is then that I remembered that I had noticed one
"cpm3emulator", one day, on the Gaby.De Web site. I downloaded
it, and spent several hours trying to understand what the very,
very little information provided was trying to say. It turns out
that the official name of this CP/M Plus emulator is "z80em86",
by one Stewart Kay, apparently a British subject.

Since I did not like the name, and my correspondent was already
using one CPMEMU, I renamed it CPM3EMU. Not wanting to tamper
with an unknown program, I simply added a CPM3EMU.BAT file,
containing only the line "z80em86". Now, when I typed CPM3EMU,
the program starts, and displays what you usually see when a
CP/M Plus system boots.

One "feature" of this emulator is that it resets the characters
to "double column" characters. I have no idea why it is obliged
to do that. Me, on almost all my computers, I redefine the VGA
characters, so I can better see them, using the QXFONT program,
which was published years ago. (Since then, my eyesight did not
improve.) So, if this emulator would not change the characters,
I think that it would be better, especially for Old Timers.

So, would this CP/M Plus emulator allows my old CP/M Plus
programs to run? Alas, not. Since this is not the place to
publish all the fields of the SCB, I only provide the lines of
interest:

C>basic

Mallard-80 BASIC with Jetsam Version 1.29
(c) Copyright 1984 Locomotive Software Ltd
All rights reserved

29037 free bytes

Ok
run"scb

SCB: Do you want a hardcopy (Y/N) : ? n

System Control Block
--------------------

(...)
0F9F4H: 2D98H RW Date in days since 1 Jan 78. (@DATE)
0F9F6H: 01H RW Hours in BCD. (@HOUR)
0F9F7H: 02H RW Minutes in BCD. (@MIN)
0F9F8H: 03H RW Seconds in BCD. (@SEC)
(...)

Ok

The problem was that, each time I re-ran SCB, I got the same
hours, minutes, and seconds... Those fields in the SCB are not
updated by the CP/M Plus emulator. Since those fields are
precisely present in memory so that an 8-bits program can access
them (no need to do a system call, or to "POKE" into another
bank), this is clearly a bug.

I then ran the TIME subroutine in Z-80 assembly language
provided by Locomotive Software for their Mallard BASIC-80
interpreter: it ran, and displayed something that looked
reasonable.

Finally, I ran the CP/M Plus' DATE utility: the date and time
were displayed, and refreshed constantly on screen.

So, a system call works, but you cannot get those data from the
SCB, under this precise emulator.

Ok. Time to do some experiments:

run"version

Z-80 version of Mallard BASIC
Full BASIC interpreter
Single User BASIC
CP/M type BASIC
OS-dependent information: 49

Ok

VERSION.BAS simply displays, in clear, what the manual says
about the VERSION command of Mallard BASIC.

run"ws4htm

WS4-to-HTM> Enter WS4 File Name: ? k*

File not found.

Ok
run

WS4-to-HTM> Enter WS4 File Name: ? e*

EBASICM .WS4 Time spent: 00:00:21 Size: 61,782 bytes

Ok
run

WS4-to-HTM> Enter WS4 File Name: ? b*

BASIC98 .WS4 Time spent: 00:00:05 Size: 14,175 bytes
BASICLUV.WS4 Time spent: 00:00:01 Size: 3,433 bytes

Total time spent: 00:00:06

Ok
run"ws4htm

WS4-to-HTM> Enter WS4 File Name: ? *

PLMXUG .WS4 Time spent: 00:01:04 Size: 62,801 bytes
Z80APL .WS4 Time spent: File too big for Mallard BASIC-80.
EBASICM .WS4 Time spent: 00:01:04 Size: 61,781 bytes
MISBEHAV.WS4 Time spent: File too big for Mallard BASIC-80.
CREATIVE.WS4 Time spent: 00:00:59 Size: 58,406 bytes

Total time spent: 00:05:18

Ok

Next, I must explain that I could not believe my eyes, when I
finally found a difference between 8-bits and 16-bits Mallard
BASIC, after more than 20 years of use. I had found it on the
Amstrad PCW. I moved it to my Epson QX-10 running under CP/M
Plus, and kept using it, totally alone, during 15 years. "The
rest is history..."

The problem happens with files close to 64K. So, I transferred
some WS4 files around that size under CPM3EMU, and you can see
the result, in the last display.

According to the manual, there is a LOF function (Length Of
File), but I got "128" each time I used it. Not very
informative. So, I decided to run the program and, if there was
an error, warn the user that the WS4 file was too big for
Mallard BASIC-80 (since I could not check the size of the file
before running the program).

So, as you can see, the 8-bits version of WS4HTM runs fine,
displaying the name of the WS4 file processed, the time spent,
and the exact number of bytes it contains. When there are
several WS4 files processed, it also tells you how long it took.

Ok. Enough theory. Let us now have a look to the program.

10 REM WS4HTM.BAS Version 3 by Emmanuel ROCHE
20 :

As far as I know, this is the first time, in 30 years of
programming, that I put a "Version" number in one of my
programs... Am I getting old?

30 PRINT
40 INPUT "WS4-to-HTM> Enter WS4 File Name: " ; file$
50 PRINT
60 :

Always the same, Good Old fashioned command line way of doing.

70 OPTION BASE 0
80 DIM hexa$ (255), ncr1$ (255), ncr2$ (255), ncr3$ (255)
90 RESTORE 3270
100 FOR i = 127 TO 255
110 READ hexa$ (i)
120 READ ncr1$ (i)
130 READ ncr2$ (i)
140 READ ncr3$ (i)
150 NEXT i
160 :

Notice that I don't care to declare L$, a 256-byte string used
to output lines, since it is, precisely, a string, so BASIC
deals with it dynamically. Fortunately, our lines of text only
contain, at most, 80 characters, and WordStar Version 4 uses 3
bytes per "Extended ASCII characters", that is to say: the
longest possible line is 80 * 3 = 240 bytes, so this fits inside
standard BASIC strings.

170 IF VERSION (0) = 16 THEN GOSUB 1200 ELSE GOSUB 1380 ' Time
180 beg.hour% = hour%
190 beg.min% = min%
200 beg.sec% = sec%
210 :

Initialization of the 00:00:00 fields, using either a Z-80
subroutine for CP/M Plus, or a 8086 subroutine for MS-DOS. This
one will be used, if any, for multi-file processing.

220 WHILE FIND$ ("*.WS4") <> ""
230 ordinal = ordinal + 1
240 found$ = FIND$ (file$ + ".WS4", ordinal)
250 IF found$ = "" AND ordinal > 1 THEN GOTO 370
260 IF found$ = "" THEN GOTO 320
270 file1$ = found$
280 file2$ = LEFT$ (file1$, 8) + ".HTM"
290 GOSUB 560
300 WEND
310 :

The famous FIND$ of Mallard BASIC. Those 9 lines are all that is
required, to turn a single-file program, to multi-file
processing. I am a fan!

320 PRINT CHR$ (7) "File not found."
330 PRINT
340 CLOSE
350 END
360 :

Should I explain?

370 IF ordinal = 2 THEN 510
380 CALL get.time (hour%, min%, sec%)
390 end.hour% = hour% - beg.hour%
400 IF end.hour% < 0 THEN end.hour% = end.hour% + 24
410 end.min% = min% - beg.min%
420 IF end.min% < 0 THEN end.hour% = end.hour% - 1 : end.min% = end.min
% + 60
430 end.sec% = sec% - beg.sec%
440 IF end.sec% < 0 THEN end.min% = end.min% - 1 : end.sec% = end.sec%
+ 60
450 PRINT
460 ' PRINT USING "& ##:##:##" ; "Total time spent:" ;
end.hour%, end.min%, end.sec%
470 PRINT CHR$ (7) "Total time spent: " ;
480 PRINT RIGHT$ ("0" + MID$ (STR$ (end.hour%), 2), 2) ":" ;
490 PRINT RIGHT$ ("0" + MID$ (STR$ (end.min%), 2), 2) ":" ;
500 PRINT RIGHT$ ("0" + MID$ (STR$ (end.sec%), 2), 2)
510 PRINT
520 IF VERSION (0) = 16 THEN MEMORY HIMEM + 29 ELSE MEMORY HIMEM + 42
530 CLOSE
540 END
550 :

"IF ordinal = 2" then only one file was processed, so no need to
print the "Total time spent" line (there is already a "Time
spent" displayed after each file name). CALL calls the assembly
language subroutine, and get the hours, mins, and secs, from the
Operating System. I found the IF lines necessary. Fortunately,
they were simple to find. Finally, the original Locomotive
Software TIME was displaying "Time is: 1: 2: 3" that is to say:
it was not displaying 01:02:03. So, I played a little bit
interactively with Mallard BASIC, until I found the above PRINT
RIGHT$ statements, that solve this problem. IF VERSION removes
the assembly language subroutine from memory. The rest should be
obvious.

560 CALL get.time (hour%, min%, sec%)
570 old.hour% = hour%
580 old.min% = min%
590 old.sec% = sec%
600 :

Get the 00:00:00 for the file to be processed.

610 PRINT found$ TAB (17) "Time spent: " ;
620 bc = 0 ' Byte Count
630 OPEN "R", #1, file1$, 1
640 FIELD #1, 1 AS byte$
650 OPEN "O", #2, file2$
660 :

Now includes a "byte count". Notice that we get the input byte-
by-byte from a random file, and output line-by-line to a
sequential file.

670 PRINT #2, "<!DOCTYPE html PUBLIC " CHR$ (34) ;
680 PRINT #2, "-//W3C//DTD HTML 4.01//EN" CHR$ (34) ">"
690 PRINT #2, "<html>"
700 PRINT #2, "<head>"
710 PRINT #2, "<meta http-equiv=" CHR$ (34) ;
720 PRINT #2, "Content-Type" CHR$ (34) ;
730 PRINT #2, " content=" CHR$ (34) ;
740 PRINT #2, "text/html; charset=UTF-8" CHR$ (34) ">"
750 PRINT #2, "<meta name=" CHR$ (34) ;
760 PRINT #2, "Generator" CHR$ (34) ;
770 PRINT #2, " content=" CHR$ (34) ;
780 PRINT #2, "WS4HTM.BAS by Emmanuel ROCHE" CHR$ (34) ">"
790 PRINT #2, "<title>Converted from file " CHR$ (34) ;
800 space = INSTR (file1$, " ")
810 IF space THEN file3$ = LEFT$ (file1$, space-1)
ELSE file3$ = LEFT$ (file1$, 8)
820 typ$ = RIGHT$ (file1$, 4)
830 file3$ = file3$ + typ$
840 PRINT #2, UPPER$ (file3$) CHR$ (34) "</title>"
850 PRINT #2, "</head>"
860 PRINT #2, "<basefont size=3>"
870 PRINT #2, "<body>"
880 PRINT #2, "<pre>"
890 :

Standard HTML header.

900 PRINT #2, CHR$ (&HEF) ; ' Byte
910 PRINT #2, CHR$ (&HBB) ; ' Order
920 PRINT #2, CHR$ (&HBF) ; ' Mark ("BOM")
930 :

Must be present for correct display of UNICODE characters.

940 GET #1
950 ON ERROR GOTO 1010
960 GOSUB 1580
970 IF byte$ = CHR$ (&H1A) THEN 1050
980 bc = bc + 1 ' Byte Count
990 GOTO 940
1000 :

The main loop. Now contains a test for files generating an error
(bigger than 64K under CP/M Plus) and a byte count.

1010 PRINT CHR$ (7) "File too big for Mallard BASIC-80."
1020 CLOSE
1030 RESUME 220
1040 :

The error message for CP/M Plus.

1050 CALL get.time (hour%, min%, sec%)
1060 new.hour% = hour% - old.hour%
1070 IF new.hour% < 0 THEN new.hour% = new.hour% + 24
1080 new.min% = min% - old.min%
1090 IF new.min% < 0 THEN new.hour% = new.hour% - 1 : new.min% =
new.min% + 60
1100 new.sec% = sec% - old.sec%
1110 IF new.sec% < 0 THEN new.min% = new.min% - 1 : new.sec% = new.sec
% + 60
1120 ' PRINT USING "& ##:##:##"; "" ; new.hour%, new.min%, new.sec%
1130 PRINT RIGHT$ ("0" + MID$ (STR$ (new.hour%), 2), 2) ":" ;
1140 PRINT RIGHT$ ("0" + MID$ (STR$ (new.min%), 2), 2) ":" ;
1150 PRINT RIGHT$ ("0" + MID$ (STR$ (new.sec%), 2), 2) ;
1160 PRINT " Size:" ; USING " ###,###" ; bc ;
1170 PRINT " bytes"
1180 RETURN
1190 :

After finishing processing one WS4 file, displays how long it
took, and how many bytes it contains.

1200 REM TIME.BAS "Mallard BASIC: Introduction", p.121
1210 :
1220 MEMORY HIMEM - 29
1230 :
1240 jsum = 0
1250 RESTORE 1290
1260 FOR i = 1 TO 29 : READ j : jsum = jsum + j : POKE HIMEM + i, j :
NEXT i
1270 IF jsum <> 3343 THEN PRINT "Error in DATA statements." : STOP
1280 get.time = HIMEM + 1
1290 DATA &hB4, &h2C, &hCD, &h21, &h8B, &hEC, &h8B, &h5E
1300 DATA &h08, &h8A, &hC5, &h98, &h89, &h07, &h8B, &h5E
1310 DATA &h06, &h8A, &hC1, &h89, &h07, &h8B, &h5E, &h04
1320 DATA &h8A, &hC6, &h89, &h07, &hCB
1330 :
1340 CALL get.time (hour%, min%, sec%)
1350 ' PRINT USING "& ##:##:##" ; "Time is now" ; hour%, min%, sec%
1360 RETURN
1370 :

The 8086 subroutine, from the official MS-DOS manual.

1380 REM TIME8.BAS "Spectrum +3 CP/M Plus manual, Chapter 8"
1390 :
1400 MEMORY HIMEM - 42
1410 :
1420 jsum = 0
1430 RESTORE 1470
1440 FOR i = 1 TO 42 : READ j : jsum = jsum + j : POKE HIMEM + i, j :
NEXT i
1450 IF jsum <> 5177 THEN PRINT "Error in DATA statements." : STOP
1460 get.time = HIMEM + 1
1470 DATA &HE5, &HD5, &HC5, &H21, &H00, &H00, &HE5, &HE5
1480 DATA &H39, &HEB, &H0E, &H69, &HCD, &H05, &H00, &HD1
1490 DATA &HD1, &H06, &H03, &H6F, &HE6, &HF0, &H67, &HAD
1500 DATA &HCB, &H3C, &H84, &HCB, &H3C, &HCB, &H3C, &H84
1510 DATA &HE1, &H77, &H23, &H36, &H00, &H7A, &H53, &H10
1520 DATA &HEA, &HC9
1530 :
1540 CALL get.time (hour%, min%, sec%)
1550 ' PRINT USING "& ##:##:##" ; "Time is now" ; hour%, min%, sec%
1560 RETURN
1570 :

The Z-80 subroutine, from the official CP/M Plus manual.

1580 notshown$ = CHR$(130)+CHR$(132)+CHR$(138)+CHR$(147)
+CHR$(148)+CHR$(150)+CHR$(153)+CHR$(154)+CHR$(155)
1590 notshown = INSTR (notshown$, byte$)
1600 ' Bytes: 82 84 8A 93 94 96 99 9A
9B
1610 ON notshown GOTO 1900, 1990, 2240, 2610, 2660, 2750, 2890, 1790,
3010
1620 :

New code. There were random problems with the first published
version of WS4HTM. After several studies with SID of the
erroneous bytes, it turned out to be a problem with characters
with their Most Significant Bit set by WordStar internally, to
do its word-processing. After much head-scratching, I found this
amazingly simple solution. I was happy.

1630 ' WS4 text
1640 IF byte$ > CHR$ (&H1F) THEN L$ = L$ + STRIP$ (byte$) : RETURN
1650 :

We are processing characters inside a line of WordStar text.
Make sure that all of them are valid ASCII characters, and add
them to the L$ string used to print output lines.

1660 ' WS4 commands
1670 byte = ASC (byte$)
1680 ' Byte: 00 01 02 03 04 05 06 07
1690 ON byte+1 GOSUB 1820, 1860, 1900, 1950, 1990, 2040, 2080, 2120
1700 IF byte > 7 THEN byte = byte - 7 ELSE RETURN
1710 ' Byte: 08 09 0A 0B 0C 0D 0E 0F
1720 ON byte GOSUB 2160, 2200, 2240, 2290, 2330, 2370, 2410, 2450
1730 IF byte > 8 THEN byte = byte - 8 ELSE RETURN
1740 ' Byte: 10 11 12 13 14 15 16 17
1750 ON byte GOSUB 2490, 2530, 2570, 2610, 2660, 2710, 2750, 2800
1760 IF byte > 8 THEN byte = byte - 8 ELSE RETURN
1770 ' Byte: 18 19 1A 1B 1C 1D 1E 1F
1780 ON byte GOSUB 2840, 2890, 2940, 3020, 3120, 3160, 3200, 3240
1790 RETURN
1800 '

The processing of control codes. (You can use a single-line ON-
GOSUB, if you prefer.) WordStar uses them with a different
meaning than standard ASCII. That's why, in addition to "00h", I
added their meanings for WordStar. See below. I have put a
display of not-used control codes, to see what happens. So, if
you process an ASM file, you will see all the TABs contained in
the file. (I published an "ASM-to-WS4 File Converter", as you
remember.) So far, no problem with the other control codes.
Notice that 0Ah is the only way to output a line. No Line Feed,
no line output.

1810 ' 00h: Fix the print position.
1820 PRINT "[00]" ;
1830 RETURN
1840 '
1850 ' 01h: Alternate character width.
1860 L$ = L$ + "<font size=" + CHR$ (34) + "-1" + CHR$ (34) + ">"
1870 RETURN
1880 '
1890 ' 02h: Boldface type ON/OFF toggle.
1900 flag02 = NOT flag02
1910 IF flag02 THEN L$ = L$ + "<b>" ELSE L$ = L$ + "</b>"
1920 RETURN
1930 '
1940 ' 03h: Pause for user response during print.
1950 PRINT "[03]" ;
1960 RETURN
1970 '
1980 ' 04h: Double strike printing ON/OFF toggle.
1990 flag04 = NOT flag04
2000 IF flag04 THEN L$ = L$ + "<strong>" ELSE L$ = L$ + "</strong>"
2010 RETURN
2020 '
2030 ' 05h: Custom print control Ctrl-E.
2040 PRINT "[05]" ;
2050 RETURN
2060 '
2070 ' 06h: Phantom space (default: 20h).
2080 L$ = L$ + CHR$ (32)
2090 RETURN
2100 '
2110 ' 07h: Phantom rubout (default: 7Eh).
2120 L$ = L$ + CHR$ (126)
2130 RETURN
2140 '
2150 ' 08h: Overprint previous character.
2160 PRINT "[08]" ;
2170 RETURN
2180 '
2190 ' 09h: Horizontal Tabulation character.
2200 PRINT "[09]" ;
2210 RETURN
2220 '
2230 ' 0Ah: Line Feed.
2240 IF LEFT$ (L$, 1) <> "." THEN PRINT #2, L$ + CHR$ (10) ;
2250 L$ = ""
2260 RETURN
2270 '
2280 ' 0Bh: Mark index entry.
2290 PRINT "[0B]" ;
2300 RETURN
2310 '
2320 ' 0Ch: Form Feed.
2330 PRINT "[0C]" ;
2340 RETURN
2350 '
2360 ' 0Dh: Carriage Return.
2370 L$ = L$ + CHR$ (13)
2380 RETURN
2390 '
2400 ' 0Eh: Return to the normal character width.
2410 L$ = L$ + "</font>"
2420 RETURN
2430 '
2440 ' 0Fh: Binding space.
2450 L$ = L$ + "&nbsp;"
2460 RETURN
2470 '
2480 ' 10h: Reserved.
2490 PRINT "[10]" ;
2500 RETURN
2510 '
2520 ' 11h: Custom print control Ctrl-Q.
2530 PRINT "[11]" ;
2540 RETURN
2550 '
2560 ' 12h: Custom print control Ctrl-R.
2570 PRINT "[12]" ;
2580 RETURN
2590 '
2600 ' 13h: Underline ON/OFF toggle.
2610 flag13 = NOT flag13
2620 IF flag13 THEN L$ = L$ + "<u>" ELSE L$ = L$ + "</u>"
2630 RETURN
2640 '
2650 ' 14h: Superscript ON/OFF toggle.
2660 flag14 = NOT flag14
2670 IF flag14 THEN L$ = L$ + "<sup>" ELSE L$ = L$ + "</sup>"
2680 RETURN
2690 '
2700 ' 15h: Reserved.
2710 PRINT "[15]" ;
2720 RETURN
2730 '
2740 ' 16h: Subscript ON/OFF toggle.
2750 flag16 = NOT flag16
2760 IF flag16 THEN L$ = L$ + "<sub>" ELSE L$ = L$ + "</sub>"
2770 RETURN
2780 '
2790 ' 17h: Custom print control Ctrl-W.
2800 PRINT "[17]" ;
2810 RETURN
2820 '
2830 ' 18h: Strikeout ON/OFF toggle.
2840 flag18 = NOT flag18
2850 IF flag18 THEN L$ = L$ + "<strike>" ELSE L$ = L$ + "</strike>"
2860 RETURN
2870 '
2880 ' 19h: Italics ON/OFF toggle.
2890 flag19 = NOT flag19
2900 IF flag19 THEN L$ = L$ + "<i>" ELSE L$ = L$ + "</i>"
2910 RETURN
2920 '
2930 ' 1Ah: End Of File character.
2940 PRINT #2, "</pre>"
2950 PRINT #2, "</body>"
2960 PRINT #2, "</html>"
2970 CLOSE
2980 byte$ = CHR$ (&H1A)
2990 RETURN
3000 '
3010 ' 1Bh: Extended character lead-in code.
3020 GET #1
3030 L$ = L$ + CHR$ (VAL ("&H" + (ncr1$ (ASC (byte$)))))
3040 IF ncr2$ (ASC (byte$) ) = "0" THEN GOTO 3080
3050 L$ = L$ + CHR$ (VAL ("&H" + (ncr2$ (ASC (byte$)))))
3060 IF ncr3$ (ASC (byte$) ) = "0" THEN GOTO 3080
3070 L$ = L$ + CHR$ (VAL ("&H" + (ncr3$ (ASC (byte$)))))
3080 GET #1
3090 RETURN
3100 '
3110 ' 1Ch: Extended character trailer code.
3120 PRINT "[1C]" ;
3130 RETURN
3140 '
3150 ' 1Dh: Reserved.
3160 PRINT "[1D]" ;
3170 RETURN
3180 '
3190 ' 1Eh: Inactive soft hyphen.
3200 PRINT "[1E]" ;
3210 RETURN
3220 '
3230 ' 1Fh: Active soft hyphen.
3240 PRINT "[1F]" ;
3250 RETURN
3260 :

In case you have not yet understood, this was the subroutines
taking care of the "control codes" of WordStar.

3270 DATA 7F, E2, 8C, 82
3280 DATA 80, C3, 87, 0
3290 DATA 81, C3, BC, 0
3300 DATA 82, C3, A9, 0
3310 DATA 83, C3, A2, 0
3320 DATA 84, C3, A4, 0
3330 DATA 85, C3, A0, 0
3340 DATA 86, C3, A5, 0
3350 DATA 87, C3, A7, 0
3360 DATA 88, C3, AA, 0
3370 DATA 89, C3, AB, 0
3380 DATA 8A, C3, A8, 0
3390 DATA 8B, C3, AF, 0
3400 DATA 8C, C3, AE, 0
3410 DATA 8D, C3, AC, 0
3420 DATA 8E, C3, 84, 0
3430 DATA 8F, C3, 85, 0
3440 DATA 90, C3, 89, 0
3450 DATA 91, C3, A6, 0
3460 DATA 92, C3, 86, 0
3470 DATA 93, C3, B4, 0
3480 DATA 94, C3, B6, 0
3490 DATA 95, C3, B2, 0
3500 DATA 96, C3, BB, 0
3510 DATA 97, C3, B9, 0
3520 DATA 98, C3, BF, 0
3530 DATA 99, C3, 96, 0
3540 DATA 9A, C3, 9C, 0
3550 DATA 9B, C2, A2, 0
3560 DATA 9C, C2, A3, 0
3570 DATA 9D, C2, A5, 0
3580 DATA 9E, E2, 82, A7
3590 DATA 9F, C6, 92, 0
3600 DATA A0, C3, A1, 0
3610 DATA A1, C3, AD, 0
3620 DATA A2, C3, B3, 0
3630 DATA A3, C3, BA, 0
3640 DATA A4, C3, B1, 0
3650 DATA A5, C3, 91, 0
3660 DATA A6, C2, AA, 0
3670 DATA A7, C2, BA, 0
3680 DATA A8, C2, BF, 0
3690 DATA A9, E2, 8C, 90
3700 DATA AA, C2, AC, 0
3710 DATA AB, C2, BD, 0
3720 DATA AC, C2, BC, 0
3730 DATA AD, C2, A1, 0
3740 DATA AE, C2, AB, 0
3750 DATA AF, C2, BB, 0
3760 DATA B0, E2, 96, 91
3770 DATA B1, E2, 96, 92
3780 DATA B2, E2, 96, 93
3790 DATA B3, E2, 94, 82
3800 DATA B4, E2, 94, A4
3810 DATA B5, E2, 95, A1
3820 DATA B6, E2, 95, A2
3830 DATA B7, E2, 95, 96
3840 DATA B8, E2, 95, 95
3850 DATA B9, E2, 95, A3
3860 DATA BA, E2, 95, 91
3870 DATA BB, E2, 95, 97
3880 DATA BC, E2, 95, 9D
3890 DATA BD, E2, 95, 9C
3900 DATA BE, E2, 95, 9B
3910 DATA BF, E2, 94, 90
3920 DATA C0, E2, 94, 94
3930 DATA C1, E2, 94, B4
3940 DATA C2, E2, 94, AC
3950 DATA C3, E2, 94, 9C
3960 DATA C4, E2, 94, 80
3970 DATA C5, E2, 94, BC
3980 DATA C6, E2, 95, 9E
3990 DATA C7, E2, 95, 9F
4000 DATA C8, E2, 95, 9A
4010 DATA C9, E2, 95, 94
4020 DATA CA, E2, 95, A9
4030 DATA CB, E2, 95, A6
4040 DATA CC, E2, 95, A0
4050 DATA CD, E2, 95, 90
4060 DATA CE, E2, 95, AC
4070 DATA CF, E2, 95, A7
4080 DATA D0, E2, 95, A8
4090 DATA D1, E2, 95, A4
4100 DATA D2, E2, 95, A5
4110 DATA D3, E2, 95, 99
4120 DATA D4, E2, 95, 98
4130 DATA D5, E2, 95, 92
4140 DATA D6, E2, 95, 93
4150 DATA D7, E2, 95, AB
4160 DATA D8, E2, 95, AA
4170 DATA D9, E2, 94, 98
4180 DATA DA, E2, 94, 8C
4190 DATA DB, E2, 96, 88
4200 DATA DC, E2, 96, 84
4210 DATA DD, E2, 96, 8C
4220 DATA DE, E2, 96, 90
4230 DATA DF, E2, 96, 80
4240 DATA E0, CE, B1, 0
4250 DATA E1, CE, B2, 0
4260 DATA E2, CE, 93, 0
4270 DATA E3, CF, 80, 0
4280 DATA E4, CE, A3, 0
4290 DATA E5, CF, 83, 0
4300 DATA E6, C2, B5, 0
4310 DATA E7, CF, 84, 0
4320 DATA E8, CE, A6, 0
4330 DATA E9, CE, 98, 0
4340 DATA EA, CE, A9, 0
4350 DATA EB, CE, B4, 0
4360 DATA EC, E2, 88, 9E
4370 DATA ED, CF, 86, 0
4380 DATA EE, CE, B5, 0
4390 DATA EF, E2, 88, A9
4400 DATA F0, E2, 89, A1
4410 DATA F1, C2, B1, 0
4420 DATA F2, E2, 89, A5
4430 DATA F3, E2, 89, A4
4440 DATA F4, E2, 8C, A0
4450 DATA F5, E2, 8C, A1
4460 DATA F6, C3, B7, 0
4470 DATA F7, E2, 89, 88
4480 DATA F8, C2, B0, 0
4490 DATA F9, E2, 88, 99
4500 DATA FA, C2, B7, 0
4510 DATA FB, E2, 88, 9A
4520 DATA FC, E2, 81, BF
4530 DATA FD, C2, B2, 0
4540 DATA FE, E2, 96, A0
4550 DATA FF, C2, A0, 0

The above DATA lines correspond to the "Extended ASCII
characters": from 7Fh to 0FFh. The first number happens to be,
precisely, this number. The ending 2/3 numbers are the values of
the UNICODE characters used, in UTF-8 format, as explained at
length in the original WS4HTM article.

Whew! Enough explanations. Since we have already used this
program under CP/M Plus, let us now try it under MS-DOS:

run"version

8088/8086 version of Mallard BASIC
Full BASIC interpreter
Single User BASIC
MS-DOS type BASIC
OS-dependent information: 2567

Ok
run"ws4htm

WS4-to-HTM> Enter WS4 File Name: ? *

STRUPROG.WS4 Time spent: 00:00:05 Size: 14,701 bytes
MACROTIP.WS4 Time spent: 00:00:02 Size: 6,808 bytes
STRUCTMS.WS4 Time spent: 00:00:10 Size: 37,239 bytes
LEVISON .WS4 Time spent: 00:00:11 Size: 41,348 bytes
PERLETTE.WS4 Time spent: 00:00:04 Size: 17,563 bytes
LEVISON2.WS4 Time spent: 00:00:02 Size: 3,945 bytes
ROCHE .WS4 Time spent: 00:01:33 Size: 348,351 bytes
LARIGODI.WS4 Time spent: 00:00:01 Size: 516 bytes
GKTMA .WS4 Time spent: 00:00:32 Size: 125,986 bytes
LEPRIEUR.WS4 Time spent: 00:00:09 Size: 35,710 bytes
LEPRIEU2.WS4 Time spent: 00:00:09 Size: 35,087 bytes
SL5 .WS4 Time spent: 00:00:47 Size: 174,075 bytes
FERCOT .WS4 Time spent: 00:00:05 Size: 21,653 bytes
PLMXUG .WS4 Time spent: 00:00:17 Size: 62,801 bytes
PLMXADV .WS4 Time spent: 00:00:00 Size: 1,321 bytes
CPNETTDA.WS4 Time spent: 00:00:05 Size: 18,918 bytes
PLMXADV2.WS4 Time spent: 00:00:01 Size: 2,599 bytes
SOFTMARK.WS4 Time spent: 00:00:03 Size: 10,038 bytes
COMDYNA .WS4 Time spent: 00:00:19 Size: 73,007 bytes
OPTICILL.WS4 Time spent: 00:00:04 Size: 11,369 bytes
SAKINA .WS4 Time spent: 00:00:00 Size: 1,040 bytes
PRINTTST.WS4 Time spent: [08]00:00:02 Size: 7,332 bytes
NEWICK .WS4 Time spent: 00:00:13 Size: 45,019 bytes
MATH .WS4 Time spent: 00:00:00 Size: 561 bytes
POWERPAK.WS4 Time spent: 00:00:47 Size: 173,914 bytes
DRLNL1 .WS4 Time spent: 00:00:12 Size: 47,380 bytes
TOOLS .WS4 Time spent: 00:00:04 Size: 14,321 bytes
WIZCASTL.WS4 Time spent: 00:00:05 Size: 16,296 bytes
TABLE .WS4 Time spent: 00:00:01 Size: 2,081 bytes
DRLHIST .WS4 Time spent: 00:00:02 Size: 7,412 bytes
DRLHIST2.WS4 Time spent: 00:00:01 Size: 3,503 bytes
AZE .WS4 Time spent: 00:00:01 Size: 3,450 bytes
AFOCUS .WS4 Time spent: 00:00:04 Size: 14,418 bytes
COMPSEX .WS4 Time spent: 00:00:00 Size: 2,608 bytes
ANHOMAGE.WS4 Time spent: 00:00:01 Size: 3,191 bytes
TDOS1 .WS4 Time spent: 00:00:04 Size: 13,931 bytes
CPCMS .WS4 Time spent: 00:00:02 Size: 5,765 bytes
VERITAB1.WS4 Time spent: 00:00:06 Size: 24,790 bytes
TDOS2 .WS4 Time spent: 00:00:07 Size: 25,871 bytes
CPNETDC .WS4 Time spent: 00:00:09 Size: 33,316 bytes
DEADBIRD.WS4 Time spent: 00:00:01 Size: 2,324 bytes
XMODEM00.WS4 Time spent: 00:00:08 Size: 30,154 bytes
PCWRP3F .WS4 Time spent: 00:00:05 Size: 19,659 bytes
Z80APL .WS4 Time spent: 00:00:18 Size: 63,898 bytes
ULCNETPC.WS4 Time spent: 00:00:09 Size: 33,421 bytes
RS232RS .WS4 Time spent: 00:00:09 Size: 29,653 bytes
INTGUIDE.WS4 Time spent: 00:00:03 Size: 11,645 bytes
APLFONT .WS4 Time spent: 00:00:01 Size: 423 bytes
CPMPAMST.WS4 Time spent: 00:00:32 Size: 118,392 bytes
CPS8256 .WS4 Time spent: 00:00:14 Size: 51,324 bytes
MOXHAM .WS4 Time spent: 00:00:02 Size: 6,858 bytes
16BITMAP.WS4 Time spent: 00:00:01 Size: 4,786 bytes
SEND .WS4 Time spent: 00:00:02 Size: 7,316 bytes
ASMWS4 .WS4 Time spent: 00:00:01 Size: 4,357 bytes
AUXIO .WS4 Time spent: 00:00:01 Size: 2,499 bytes
EBASICM .WS4 Time spent: 00:00:17 Size: 61,781 bytes
JCINDIA .WS4 Time spent: 00:00:02 Size: 5,614 bytes
IOWAIT .WS4 Time spent: 00:00:02 Size: 10,046 bytes
SOFTVAL .WS4 Time spent: 00:00:01 Size: 3,410 bytes
OHGUSHI1.WS4 Time spent: 00:00:04 Size: 13,875 bytes
OHGUSHI2.WS4 Time spent: 00:00:03 Size: 13,138 bytes
PATENTUS.WS4 Time spent: 00:00:03 Size: 8,864 bytes
PATENTUK.WS4 Time spent: 00:00:02 Size: 10,595 bytes
PATENTFR.WS4 Time spent: 00:00:02 Size: 9,808 bytes
PATENTLP.WS4 Time spent: 00:00:03 Size: 9,206 bytes
PATENTOK.WS4 Time spent: 00:00:03 Size: 11,015 bytes
DRLINIT .WS4 Time spent: 00:00:27 Size: 102,203 bytes
WS4ECHAR.WS4 Time spent: 00:00:01 Size: 4,160 bytes
LIFEISSA.WS4 Time spent: 00:00:14 Size: 50,799 bytes
BASIC98 .WS4 Time spent: 00:00:04 Size: 14,174 bytes
GKIW .WS4 Time spent: 00:00:05 Size: 17,227 bytes
ZX80IW .WS4 Time spent: 00:00:01 Size: 4,347 bytes
IW6-24 .WS4 Time spent: 00:00:03 Size: 12,247 bytes
MISBEHAV.WS4 Time spent: 00:00:18 Size: 67,669 bytes
IW5-39 .WS4 Time spent: 00:00:02 Size: 8,681 bytes
IW2-14 .WS4 Time spent: 00:00:04 Size: 12,736 bytes
IW2-17 .WS4 Time spent: 00:00:00 Size: 0 bytes
SMAL80IW.WS4 Time spent: 00:00:04 Size: 15,397 bytes
UFOPETIT.WS4 Time spent: 00:00:11 Size: 40,660 bytes
PAINLEVE.WS4 Time spent: 00:00:03 Size: 13,483 bytes
GKIW2 .WS4 Time spent: 00:00:02 Size: 5,644 bytes
AM80IW .WS4 Time spent: 00:00:03 Size: 13,094 bytes
DM80IW .WS4 Time spent: 00:00:04 Size: 13,055 bytes
MPM86IW .WS4 Time spent: 00:00:07 Size: 28,344 bytes
DRLOGOIW.WS4 Time spent: 00:00:05 Size: 18,533 bytes
BASICLUV.WS4 Time spent: 00:00:01 Size: 3,432 bytes
ABACUS .WS4 Time spent: 00:00:03 Size: 9,414 bytes
CPMDOC .WS4 Time spent: 00:00:13 Size: 43,951 bytes
COMPART .WS4 Time spent: 00:00:02 Size: 8,797 bytes
HOWTOPRO.WS4 Time spent: 00:00:04 Size: 13,475 bytes
GERBAULT.WS4 Time spent: 00:00:04 Size: 15,980 bytes
CB80V14 .WS4 Time spent: 00:00:02 Size: 8,681 bytes
IWCOMAL .WS4 Time spent: 00:00:01 Size: 2,103 bytes
PCWBBC .WS4 Time spent: 00:00:01 Size: 4,108 bytes
CHAIN .WS4 Time spent: 00:00:03 Size: 10,988 bytes
FLIPBOAT.WS4 Time spent: 00:00:01 Size: 2,818 bytes
PCWSBAS .WS4 Time spent: 00:01:24 Size: 322,611 bytes
STRUCBAS.WS4 Time spent: 00:00:27 Size: 100,535 bytes
CREATIVE.WS4 Time spent: 00:00:15 Size: 58,406 bytes
DEBRIEF .WS4 Time spent: 00:00:01 Size: 1,417 bytes

Total time spent: 00:13:50

Ok
system

C:\Toto>That's All, Folks!


Yours Sincerely,
Mr. Emmanuel Roche, France


EOF


z80em86

unread,
Dec 25, 2009, 10:09:27 AM12/25/09
to
Hi Emmanuel,

I'm the author of z80em86. I just wanted to clear up some points you made in your post.

When I wrote this emulator it was originally called 'z80' then when I decided to release it I used the name z80em86. As 'z80em' was already in use so I appended '86' as the program is coded in 8086 assembly language.

z80em86 is NOT a CP/M emulator. It simply emulates a Z80 CPU (documented instructions only) and also has some support to emulate various bits of hardware that would be required by an operating system.

As far as documentation is concerned I don't see a problem. The README file describes z80em86.

There is a CP/M 3 operating system I wrote that can be booted by z80em86 but the emulator can run any operating system if one wants to code it up and the documentation has the necessary details for doing so. The CP/M 3 system has a README file that describes the operations of the system.

The CP/M 3 system for running under z80em86 was offered to the Gaby web site for circulation but to my knowledge was never made available. I would suggest that you found it here:

http://www.z80em86.co.cc/

I'm not sure I follow your problem you are claiming to have with "double column" characters:

> One "feature" of this emulator is that it resets the characters
> to "double column" characters.

z80em86 has two methods to output characters to the console. (I'm working from memory here) The default method uses an ADM3a/Televideo Terminal emulation built into z80em86. If you're using Wordstar then it must be configured to use that Terminal, if not then I would expect you will find strange output behaviour.

The second method (again going by memory) uses the DOS Interrupt services to output characters, by using this method one could probably provide their own console terminal emulation at the DOS level. You can change the console device destination from CP/M 3 using the 'device' command. In fact you can have console output going to both at the same time which will make the characters repeat and would not be desirable.

Stewart


---
frmsrcurl: http://compgroups.net/comp.os.cpm/WS4HTM-Version-3

Gekkor

unread,
Dec 25, 2009, 6:16:36 PM12/25/09
to
On 2009-12-25 01:26:50 +1000, "Mr Emmanuel Roche, France"
<roch...@laposte.net> said:

> WS4HTM3.WS4
> -----------
>
> - "WS4-to-HTM File Converter -- Version 3"
> Mr. Emmanuel ROCHE
> 15 December 2009
>

> C:\Toto>That's All, Folks!
>
>
> Yours Sincerely,
> Mr. Emmanuel Roche, France


Thank you for providing this. It provides an excellent historical
demonstration of the unsuitability of BASIC for for developing
software.

Bill Buckels

unread,
Jan 7, 2010, 6:20:47 AM1/7/10
to
On Dec 25 2009, 5:16 pm, Gekkor <gek...@nomail.com> wrote:
> Thank you for providing this. It provides an excellent historical
> demonstration of the unsuitability of BASIC for for developing
> software.

I have been quietly reading this ng of late but couldn't pass-up your
post... Despite your gratitude I think you missed several points.

If you are not joking, you appear to be punching far above your weight
but I will give you the benefit of the doubt and see where this thread
goes.

You can of course comment as you wish, and I see the humour in your
remark, but I just wanted to point-out that you are wrong for the same
reason that I am often wrong in selecting C for a development language
when BASIC will do.

To begin with, BASIC is fine for developing software. It is also fine
"for for" developing software, and even fine for for for developing
software. Perhaps not for (;;) but FOR NEXT. (XLATE - "Perhaps not
forever but for revising existing software.")

I have recently (over the last 5 years or so) developed some really
complicated "kickass" eCommerce websites that provide a large number
of the population of the Canadian Arctic Communities with food, fuel
and clothing via ships, trucks, and planes using VB.NET (BASIC) and
ASP.NET and also several Windows CE/Mobile handheld applications for
retail store use in the same time period with VB.NET (as well as in C
for legacy handhelds just so you know that I am not pushing in any
single direction in "real life"). Despite the fact that I also work in
C++ and Java, I have even successfully deployed VB.NET applications
under Linux using Mono, so I can't really agree with you at all based
on even my recent experience. My past which goes fairly far back holds
many BASIC successes as well as C and C++ successes and even Assembly
Language successes on the solution side and lets keep in mind that
software is first and foremost a business solution from a developer's
perspective and not a stone statue or a prescription in latin that
must withstand the winds of time and subsequent erosion.

I am relatively certain that most here will agree that, to a software
developer, a computer language is analoguous to a tool in a toolbox.
In a toolbox, one may have several tools, such as a hammer, a
screwdriver, and a pair of pliars, etc. A software developer may be
fluent in several languages... ABC etc (Assembler, BASIC, C, ...) One
would not use a screwdriver handle to hammer a nail nor would one use
a hammer to drive a screw although both could work... using pliars to
drive a nail would likely be more unsuitable than a screwdriver handle
when driving a nail. Building a house when a toolshed is all that is
required would seem to be unsuitable as well. Since you do not
indicate what would have been more suitable considering the target
platform etc. I must only assume that you are joking.

I think M. Roche's selection of BASIC for his chosen task is entirely
appropriate and by your comment you might be at risk of being accused
by some of being an obnoxious troll and as such your opinion will be
considered as worthless as a pair of pliars driving a nail or using a
MacIntosh when a Windows or Linux computer is more suitable. Not that
you probably care about that anymore than I do:) Some would of course
also note that since you hide behind an alias that you really are an
obnoxious troll.

I for one move quite comfortably between different computers and
computer languages, and although I have a preference for the C
language for my vintage computing work, I really must insist that, on
the majority of old computers including the Apple II, Commodore 64,
and IBM-PC under MS-DOS, the BASIC programming language may be the
best choice of all, and that by using the C language to do what is
easiest and efficient in BASIC I am personally guilty of using a
screwdriver handle for a hammer.

In the particular case of converting Wordstar Documents to html, my
main points in asking M. Roche to make this file available and to
revisit his work were of conceptual interest... to see how he does
it... but also to read how he thinks... and to learn from him. The
fact that he has provided me with a vintage utility is a bonus that I
shall treasure. But we must learn from our peers and elders while we
have them.

Translating a Wordstar file to a modern markup language is a wonderful
historical exercise. In the 1980's many of us used Wordstar and some
of us still have some old docs kicking-around. Today many of us have
websites. This purpose seems "suitable" and even noble for a program
written in BASIC, despite portability issues.

I also find his work inspiring... I am presently considering taking
what he has done and using his easy to read and straight-forward
algorithms and approach and creating a website generator that
documents an entire compiler distro with library routines and samples
automatically... like this...

http://www.appleoldies.ca/azgraphics33/index.htm

See link above for what I needed to do by hand recently... this
obviates the need for automation that M. Roche's approach provides.
This purpose seems "suitable" and even noble for a program written in
BASIC, despite portability issues.

Another raison d'etre for M.Roche's exercise in releasing this code is
to demonstrate a detailed documenting style that folks like me can
learn from... I find reading his stuff delightful and informative from
an author's perspective. This purpose seems "suitable" and even noble
for a program written in BASIC, despite portability issues.

Oh well, each to their own I guess, but thanks Emmanuel for his work
and thoughts and the news of the weather in France... and to you for
your humourous slant on his work. I also apologize in in advance to
anyone who is annoyed by this post.

Happy New Year and Have Fun!

Bill Buckels

http://en.wikipedia.org/wiki/User:Bill_Buckels

http://www.aztecmuseum.ca/

http://www.appleoldies.ca/
http://www.c64classics.ca/
http://www.cpm8680.com/

http://www.clipshop.ca/c86/
http://www.clipshop.ca/
http://www.teacherschoice.ca/

http://www.grindstoneharbour.com/


Tarkin

unread,
Jan 7, 2010, 9:40:04 AM1/7/10
to

Bill, you've hit many nails on many heads ;^)

I am supposing that the keyword in Mr. Gekkors post is
"unsuitability".
What constitutes "suitability"? And for who?

I think it's a broad, sweeping generalization, to say that BASIC is
unsuitable for developing software. It's like saying that a Kaypro
and modem are unsuitable for collaborative document editing.

The generalization Mr. Gekkor has made isn't even wrong.

TTFN,
Tarkin

dott.Piergiorgio

unread,
Jan 7, 2010, 11:28:39 AM1/7/10
to
Bill Buckels ha scritto:

> You can of course comment as you wish, and I see the humour in your
> remark, but I just wanted to point-out that you are wrong for the same
> reason that I am often wrong in selecting C for a development language
> when BASIC will do.
>
> To begin with, BASIC is fine for developing software. It is also fine
> "for for" developing software, and even fine for for for developing
> software. Perhaps not for (;;) but FOR NEXT. (XLATE - "Perhaps not
> forever but for revising existing software.")

If for these for, for for, etc. mean rapid & Q&D testing/prototyping of
small routines & ideas, I concur.

1980s Basic have roughly all was needed for developing many types of
software (that is, excluded heavy number crunching, state-of-art
videogames, system software, and some types of vertical apps)

What caused the low estimate of Basic today, is that is "considered
harmful" to the formation of actual programmers/coders (with emphasis on
coders) but was missed the point that the types of software above are a
relatively small percentuage of the running software.

With a good metaphor, sorry if here I put the best/worst of Italian
mindset, for every piece of art, there are thousand of items, furniture
etc. whose need "artisan" capabilities that "artistic" capabilities, and
Basic is like a woodworker's chisel, and C, ASM, etc. are like a
sculptor's chisel.
(side note, is a real pity that there are really few Italians in the
demoscene...)

Best regards from Italy,
Dott. Piergiorgio.

Mr Emmanuel Roche, France

unread,
Jan 7, 2010, 5:45:48 PM1/7/10
to
Hello, Bill!

Ho, my... A 7-Kb message! However, I decided to write to settle a few
things.

So, "Gekkor" wrote:

> > Thank you for providing this. It provides an excellent historical
> > demonstration of the unsuitability of BASIC for for developing
> > software.

2 weeks ago, I could not believe my eyes when I read the above. So,
wondering who was this unknown "Gekkor", I made a search and found
only 5 messages from him, all dated December 2009. He seems to be an
Australian, using a Mac. However, what decided me to ignore his
message was the following:

> You forgot to mention how Allah cleverly designed the camel vagina so
> that it can be used by Imams as well as camels. (11 December 2009)

I also note that, each time, he publish those kind of small
"messages", then disappear without taking care of the answers.

In short, he is what Herb Johnson call a "Troll".

So, you do what you want, but, me, I decided to ignore him. (He does
not seem to know that there are wild camels in Australia...)

Ok. As a programmer, I cannot prevent myself to add some comments to
your defense of BASIC.

Personally, I am not suffering from the "duckling syndrome": BASIC was
not my first Programming Language. Me, I was a COBOL programmer on IBM
Mainframes in Paris. As I explained several times, since I could not
buy the IBM Mainframes I was programming (during a few months, I
programmed on one of the biggest IBM Mainframes of France at the time
(less than 5 were known to be as big), which had the incredible memory
size of... 16 MegaBytes! but was hooked to more than 100 bank
terminals), I investigated microcomputers and, at the time, CP/M
ruled. "The rest is history..."

My hobby is collecting small PLs for CP/M. The last time I published
the "WS4 Files of French Luser", it contained a list of more than 20
PLs, some quite uncommons.

I have also noticed that there are some "standards" under a given
computer/OS. For example, under CP/M, CBASIC is clearly the
"standard": it was developed by 3 students of Gary Kildall at the
Naval Postgraduate School of Monterey, California, then one of the 3,
Gordon Eubanks, who had a more commercial mind, set up a company
selling it, after Gary Kildall ported it under CP/M.

After Digital Research decided to have a "Language" department, they
bought it, then started adding lots of interesting stuff (Graphics
System eXtension, Access Manager, Display Manager) that 99% of the
American fixated on CP/M 2.2 have never heard about. Yet, the result
of all those softwares is a very, very powerful commercial PL.

So, logically, in view of the power and "standardiness" of CBASIC
Compiler, it should be my own "standard" PL. But, probably because of
some "duckling syndrome", I prefer interpreted BASIC, and found a much
better one (a superset of MBASIC) under the name "Mallard BASIC".
WS4HTM shows what it is capable of doing. (For MBASIC and CBASIC fans
out there, you just need to code one "FIND$" subroutine to do the same
with them.)

(If I were using a compiler, I would use PL/I, rather than CBASIC,
again probably because of my IBM Mainframe background. I tried to find
the version of CBASIC for Unix, but failed to find it.)

So, I have used at least 20 PLs over the years but, for some unknown
reason (probably "procedural programming" -- I tried "functional
programming" with LISP and Logo, but they don't come automatically
under my fingers), I simply program faster with BASIC. And, over the
years, I have built up a collection of useful programs. In addition,
its interactivity makes debugging faster. I am a programmer, so
debugging is very important for me.

Ok. This will be all for today. Many thanks to Tarkin and Piergiorgio
Betti.

Just one last remark: you wrote "despite portability issues" 3 times.
I forgot to mention that this is the comp.os.cpm Newsgroup, and that I
am a fan of CP/M. I am only interested in PLs running the same under
CP/M, CP/M-86, and MS-DOS. I could not care less about the other
systems. They probably have some "standard" PLs. So, I chose BASIC
precisely for its portability. Find me a microcomputer without MBASIC.
("Jupiter Ace": yes, I know!)

And, after 30 years of programming, I also noticed that there is a
kind of "fashion" for PLs: I clearly remember the "Is Pascal the next
BASIC" article. This shows my age. I have seen many PLs appear and
disappear, over the years. I think that they have an average lifespan
of 5 years.

COBOL lasted until Y2K. (Some S/360s ran 15 years, 24 hours a day, 7
days (well, almost) per week. I am quite sure that no future computer
will last 15 years. The hardware of the IBM Clown change every 18
months.) One of my friend was a FORTRAN programmer, and we had
incredibly long arguments on their relative worth. He could not
believe his eyes how fast FORTRAN disappeared, after FORTRAN-90 was a
flop.

You will notice that, to this day, some Windows programmers are still
programming in Assembly Language. This must be progress.

Bill Buckels

unread,
Jan 7, 2010, 6:27:56 PM1/7/10
to
On Jan 7, 4:45 pm, "Mr Emmanuel Roche, France" <roche...@laposte.net>
wrote:

> wondering who was this unknown "Gekkor", I made a search and found
> only 5 messages from him, all dated December 2009. He seems to be an
> Australian, using a Mac.

I noticed all that too...

> In short, he is what Herb Johnson call a "Troll".

Exactly...

> Ok. This will be all for today. Many thanks to Tarkin and Piergiorgio
> Betti.

Thank you again also.

> Just one last remark: you wrote "despite portability issues" 3 times.

Perhaps I went too far but the repetitive quality had a good sound to
it... better than a rap song:) In truth nothing is portable except for
Latin.

> You will notice that, to this day, some Windows programmers are still
> programming in Assembly Language. This must be progress.

This also might be fun:)

Bill

Gekkor

unread,
Jan 7, 2010, 10:54:58 PM1/7/10
to

The definition of a troll is a tricky one. I don't see myself as such.

VB.NET is widely divergent from the BASIC which that French software
archaeologist was espousing. The .NET framework is a very fine
programming architecture indeed, in my opinion it is probably the
finest class library to ever be shipped from Microsoft. However,
VB.NET is simply syntactical sugar which compiles to MISL as do all of
the other languages which are supported under .NET. It is not really
BASIC.

We must all thank Miguel de Icaza for his Mono, which as you say is
useful for running .NET assemblies on disparate platforms.

As for punching above my weight, I doubt it. I too am an old timer,
but still active in the game and probably have forgotten as many
languages as anyone. I still commercially work in C++, C#, Java,
Objective-C to name a few.

I will again reiterate my thanks to Mr Roche for his excellent
historical demonstration.

PS: Sorry about the "for for" business. :)

Mr Emmanuel Roche, France

unread,
Jan 8, 2010, 3:16:33 AM1/8/10
to
Hello, Bill!

> In truth, nothing is portable, except for Latin.

Hahaha! I don't know if you know, but the "DO" in a DO-loop, is, in
fact, a Latin word...

In France, we are the last country on Earth still using the Latin
"and" ("et"). Example: "Guerre et Paix" in French, "Panem et
Circenses" in Latin.

Noticing those Lating roots in Programming Languages, I had the idea,
one day, of making a PL using "Indo-European" roots.

(As a result of studying English, I investigated the origin of
languages, and found that linguists, from a comparison of all the
oldest known written languages, managed to recreate the unwritten
mother language of Europe: the Indo-European language. It is quite
well documented, with dictionaries, vocabularies, grammars, etc.)

So, if you prefer "C", you could use a pre-processor, and program in
Indo-European, the mother language of all European languages. (About
half the Earth population is speaking an Indo-European derived
language.) This one is guarantee not to change or disappear in 5
years, since it is dated in Millenaries... (In general: 20,000 years.)

http://en.wikipedia.org/wiki/Indo-European_languages

Bill Buckels

unread,
Jan 8, 2010, 6:25:53 PM1/8/10
to
On Jan 7, 9:54 pm, Gekkor <gek...@nomail.com> wrote:

> VB.NET is simply syntactical sugar which compiles to MISL as do all of
> the other languages which are supported under .NET.  It is not really
> BASIC.

Yes it is despite the fact that it uses the same CLR as C#! You
actually have that backwards. It is the syntax that makes the language
and not what the compiler does with it afterwards. Your assertion is
either preposterous or silly, as you prefer. But BASIC is not like
Latin.

Do you remember (as I do) living through and using DR CBASIC and QB
2.0 and TurboBASIC compilers and marvelling that there were no line
numbers, and then a little later in the 80's we got to do mixed-
language programming with C and Assembler and BASIC using the Pascal
Calling Convention and the Fortran Keyword??? Then MS-Access and the
various VB's came-out and they were still BASIC. So is VB.NET which is
why it is called "Visual BASIC dotNET"... and I would argue further
that anything with such a huge runtime hung around its waste must
surely be BASIC or a stud.

So how is arguing that BASIC is not BASIC any different from being a
troll???

We should put this energy into talking about CP/M and make this NG a
better place, so I am done defending BASIC anyways, and I will always
prefer C++ and C, although since C# is simply syntactical sugar for
BASIC masquerading as java it is not really a language at all:)

I am still not convinced that you are a real person. Aliases are for
CB'ers, BBS'ers and RPG'ers. You are too much a contrarian to be real.

Regards,

Bill

Axel Berger

unread,
Jan 9, 2010, 3:33:00 AM1/9/10
to
*Mr Emmanuel Roche, France* wrote on Fri, 10-01-08 09:16:

>Hahaha! I don't know if you know, but the "DO" in a DO-loop, is, in
>fact, a Latin word...

You're thinking of "do", give, as in "do ut des", give so you may be
given, but that is entirely different.

English "do" is related to German "tun", from Westgermanic "*d^o" and
Indoeuropean "*dh^e". In French it's "faire" (and possibly sometimes
"mettre"), in Latin "facere".

Axel Berger

unread,
Jan 8, 2010, 3:47:00 AM1/8/10
to
*Bill Buckels* wrote on Thu, 10-01-07 12:20:
>using VB.NET

As far as I can make out, and I may well be wrong here, aren't that the
kind of programmes, that, when double-clicked, show a splash screen
saying in effect:
"Using this program you're going to need coffee, so we're now providing
time for you to go an make some. Take your time and when you're back we
might just have finished loading and initializing this."

I long for the good old monochrome text screen menues. Apart from being
lighning fast they did not think that light grey letters on a minimally
lighter grey background are the hight of legibility and useability.

That said, many script or macro languages are based on either BASIC or
C and I find BASIC much more readable and much less error prone. In
most cases speed is irrelevant and as those macros tend to get
interpreted anyway, there won't be an advantage for the C-type in the
first place. For all sectors, where you tend to send more time
tinkering with code than actually running it, a BASIC like simplicity
comes out trumps.

I often do one offs, where running them takes seconds, writing them
about ten minutes or a bit over, and doing the same thing manually
would take hours. (And I do see professionals, i.e. people charging for
their time, doing it the long and manual way. One recent example was
transferring the content from an old website to a new one where it was
structured differently.)

Bill Buckels

unread,
Jan 9, 2010, 7:36:02 AM1/9/10
to
On Jan 8, 2:47 am, Axel_Ber...@b.maus.de (Axel Berger) wrote:
> I long for the good old monochrome text screen menues.

Yes times were simpler then, and although the passing of time
sanitizes and sanctifies, those times still seemed in a way to be more
fun. But to me things are still fun... to others maybe not.

I can write quickly in C and prefer to do so, but for someone who is
good with BASIC, nothing is better than BASIC. For production code if
BASIC will get the job done faster, or a batch file even, I will use
the simplest and best way. In unix-like-systems I will generally use
perl or a bash script, but again, I have my C to save me in unix-like-
systems.

And I will close by saying that one should never put a young mouse-
master programmer on a job that requires only a simple batch file or
BASIC program... or you could end-up with a GUI that does nothing
after only a week or so, despite the fact that the job could have been
done manually in a day and in 10 minutes with a simple program.

C'est la vie aujourd'hui.

Bill

Gekkor

unread,
Jan 10, 2010, 3:29:59 AM1/10/10
to

Oh I am a real person, and I am not a troll. Some folks use aliases
because we like to separate professional life from personal life in
order to preserve privacy.

It is quite disingenuous to suggest that VB.NET is BASIC.

Perhaps you do really believe what you are saying. Nevertheless,
VB.NET is an object oriented language with a syntax loosely based on
BASIC keywords. You probably remember the screams from VB users when
they first saw VB.NET.

Please tell me of another BASIC that has class and interface
inheritance, class and instance variables and methods, mutators,
boxing, etc and which uses the methods of a class library even for such
'simple' tasks as string manipulations.

You cannot avoid using the .NET framework if you write a VB.NET
program, you cannot avoid creating classes and calling class methods.
You are in effect using a BASIC like syntax to use an object oriented
framework.

Anyway, I don't wish to offend you. To be honest, I really only dislike
the attitude of the French tool. His pontificating tutorial on his
utility was too good an opportunity to pass up :)


0 new messages