China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-01 02:20
中国DOS联盟论坛 » DOS开发编程 & 发展交流 (开发室) » Suggestions and Source Code View 1,008 Replies 1
Original Poster Posted 2003-10-08 00:00 ·  中国 湖北 武汉 联通
高级用户
★★
Credits 677
Posts 194
Joined 2003-09-13 00:00
22-year member
UID 9778
Gender Male
Status Offline
Speaking of interpreted languages, everyone will naturally think of BASIC. Most of us don't use BASIC for programming, but BASIC was very likely the first thing we came into contact with.
On early computers, before there was DOS, BASIC was almost doing the job of an operating system. Bill Gates got his start with BASIC, so he said: "Give me BASIC, and I can do anything." Peter Norton said in his book "Inside the 486" that software like NDD and so on was written in PASCAL, and later converted to C. Personally he preferred the rigor of PASCAL, and he specifically mentioned that when neither of those two languages could solve something, you still had to use assembly.
But the sample programs in his book are all demonstrated in BASIC. I guess that's because BASIC is like a translator, and we can all understand it. I also posted my source code in BASIC, to be precise QUICK BASIC 4.5. This version is the easiest to get. Actually QB is a compiled language, not the QBASIC.exe that comes with DOS. One of the simplest ways to compile is to click RUN in the QB window, then -- MAKE EXE FILE. There are several options in the dialog box at that point. If you choose the one with BRUN45.EXE, the compiled program needs the library to run. If you want to create a standalone EXE file, just choose the Stand... option. But after compiling, the file size is a bit larger!
If you need to use interrupts and so on, you should start QB with the QB/L command.
China does not have its own operating system. What does that mean?????
It doesn't mean our country lacks the technology. There are also factors like the market and applications. Even if it gets made, it won't work if nobody uses it, and it also won't work without application software. In fact, our country is jointly developing an operating system with Japan and Korea. We enthusiasts can do something too! I think more than 70% of computer players play computer games. After computer games were opened up in our country, China Central Television even launched a special column on computer games. There is a severe shortage of game production personnel in the game industry; even a monthly salary of ten thousand yuan makes it hard to recruit talent. I hope everyone can also make some contribution to this, help each other, and exchange ideas.
"Every common man bears responsibility for the fate of his country"
If you want to call an executable file in a program, for example Fdisk and so on, in BASIC you use the SHELL statement; in others maybe the SYSTEM statement, etc. If you want to run Fdisk after the program ends, then you have to write something into the keyboard buffer. Please look at the sample program (please compile it before running it, do not run it in the programming environment)
bat$ = "fdisk" + CHR$(13)
DEF SEG = &H40 'define the starting address
FOR i = 1 TO 6
batAsc = ASC(MID$(bat$, i, 1)) 'convert the character into an ASC code value
POKE &h1d+(i-1)*2, batAsc 'write the value into the keyboard buffer
NEXT i
POKE &H1A, &h1d 'head of the keyboard buffer
POKE &H1C, 11 'tail of the keyboard buffer
DEF SEG

Today's hard disks all have massive capacity, and the data in them is far more important than the hard disk itself. I want to make related tools, and I hope everyone can help!
Floor 2 Posted 2003-10-09 00:00 ·  中国 陕西 西安 电信十所西世纪闪电网吧
高级用户
★★
OS/2女孩
Credits 639
Posts 183
Joined 2003-06-14 00:00
23-year member
UID 5148
Gender Female
Status Offline
Actually, the boundary between compiled and interpreted languages is already very blurred now.

There are three languages that can illustrate this "blur":

JAVA is a compiled language, but in fact it compiles into an intermediate code and runs it with a VM.

VB in BASIC is an even more typical example. In fact, when you press F5, VB compiles part of the content and interprets part of the content.

PERL should count as an interpreted language, but it has all the characteristics of a complete compiled language. Similar to JAVA, it also generates
a kind of intermediate language. But what makes PERL purer is that it does not provide a true binary compiler (although there are several
ways to compile PERL)

Finally there is LISP. EMACS LISP is even more an example of asymmetric generic programming. It further blurs the boundary between compilation and interpretation: it compiles
a lot of classic LISP code, interprets user code, and simply writes the lower-level code in C as something like a dynamic library.

So, strictly distinguishing between compilation and interpretation doesn't really have much meaning now.
REM 喜欢DOS,因为它的简单
REM 喜欢OS/2,因为它不再矫饰
REM 喜欢BASIC,因为它并不幼稚
REM 喜欢GNU,因为它杂乱无章
Forum Jump: