home *** CD-ROM | disk | FTP | other *** search
- ╔═════════════════════════════════════════════════════════════════════╗
- ║ BASIC Magazine vol. 1 number 1 ║
- ║ April, 1994 ║
- ║ Copyright 1994, Ken Witherow. All Rights Reserved. ║
- ║ All code below is public domain ║
- ║ unless specifially marked. ║
- ║ ║
- ║ See subscrip.doc for information on subscribing ║
- ╚═════════════════════════════════════════════════════════════════════╝
-
- Contents
- 1. Intro to BMag
- 2. Legal stuff
- 3. Authors wanted
- 4. Interfacing assembly language with BASIC
- 5. Review of PowerBASIC
- 6. Ending notes
-
-
- 1. BMag - What is it?
-
- BMag, or BASIC Magazine, is a magazine totally dedicated to the BASICs.
- Within it, you can find code for all the various compilers EXCEPT Visual
- BASIC unless demand is great enough to warrant it. Assembly language
- code will also be included on occasion to provide routines with a faster
- way to execute. Assembly .OBJ files will be included in the regular
- version, but all assembly source will be included in the registered
- version. Included in this archive will be an archive with all of the
- decent source code posted in the FidoNet QUIK_BAS, BASIC7, and POWER_BAS
- echoes. A new magazine should come out every month.
-
-
- 2. The legal stuff
-
- BMag is the property of Ken Witherow and may not be modified without
- permission from him and only him. Any source code may be used freely
- unless otherwise stated. Ken Witherow and any other contributing authors
- take no responsibility of any problems that may arise from the use of
- anything distributed in this package. Ken Witherow will not pay for the
- use of any programmer's material that they wish to contribute.
-
- Windows, Visual BASIC, Quick BASIC, QBasic, PDS, and MASM are registered
- trademarks of MicroSoft, Inc.
-
- PowerBASIC is the registered trademark of PowerBASIC, Inc.
-
- TASM is the registered trademark of Borland International, Inc.
-
- Sound Blaster is the registered trademark of Creative Labs, Inc.
-
- 3. Authors wanted
-
- BMag is currently looking for programmers that would like to
- contribute to the magazine. It doesn't matter if it's source code, the
- review of a product, how to do different programs in the BASICs, or
- anything else. If your program is selected, you will be creditted in
- the magazine.
-
- Snail Mail:
- Ken Witherow
- 6769 Cadyville Rd.
- Livonia, NY 14487
-
- Netmail:
- Ken Witherow @ 1:2613/280
-
- InterNet:
- Ken.Witherow@f280.n2613.z1.fidonet.org
-
-
- 4. Featured Topic - Assembly language for BASIC
- -by Ken Witherow
-
- This month, we will focus on the idea of combining assembly language
- programs with BASIC programs for speed and/or size.
-
- Many people have complained about BASIC programs being large,
- slow, and inefficient. By combining assembly language with your BASIC
- programs, you can defeat all three of these problems. The hardest part
- of creating assembly language procedures for BASIC is just learning
- assembly. After that, it's pretty easy.
- The first thing that you'll want to do is make the model
- MEDIUM, BASIC. Next, add the PUBLIC FunctionName command into the .ASM
- file. After that, when you start getting into the nitty gritty of
- programming the code, you have to define your procedure with the proper
- call length. In most cases, you can define your PROC as FAR but in some
- special cases, you'll need or want to use NEAR calls. To pass
- parameters, you'll need to first push BP onto the stack and then move
- the value of SP into BP. When you're ready to retrieve the variable,
- move the address BP+6 into the SI register. Then simply move the byte at
- SS:SI into the register you wish to work with. When you're done with the
- procedure, be sure to get BP back off the stack and after your RET
- statement, include the number of bytes you want to pop off the stack
- (ie, the number of bytes your variables use). Another thing I recommend
- is to give the routine it's own segment using the SEGMENT and ASSUME
- commands. In the file CURSCRN.ASM, you'll find a fully commented
- routine showing how to do this (since the featured topic is assembly
- language, all source will be included in this issue). Then simply
- assembly the program and link it in with your BASIC program.
- If all this is confusing, the source code includeded is well
- commented so you will know what you're doing.
- *** Inside of your BASIC file, you will define your procedures
- by using the DECLARE statement.
- *** Note for PowerBASIC users. PowerBASIC has built in inline
- assembly allowing you to directly code your routines there. Another
- feature allows you to directly link the .OBJ files to your program
- ($LINK).
-
-
- 5. Review of PowerBASIC
- -by Ken Witherow
-
- This month's program review consists of PowerBASIC, Inc.'s,
- formerly Spectra Publishing, PowerBASIC compiler. Currently at version
- 3.0c, I find PowerBASIC to be the best in BASIC compilers out there.
- It's powerful features include thing such as inline assembly, use of
- unions, more data types, 8086-80386 coding, a full debugger, and a slew
- of others. The editor, which I sometimes find very annoying, is fully
- configurable and gives a good amount of detail about your programs and
- includes a great help system. With the recent death of the MicroSoft DOS
- compilers, I find it a great addition to my programming tools. Many
- libraries have been put together for it ranging from Sound Blaster
- programming to hi-res graphics programming to just about anything else
- you can imagine. I recommend it to any serious programmer who would like
- to program optimized code or anything huge. PowerBASIC allows programs
- to get as big as you want them to be so we never have to live up to the
- limitations of those 'other compilers'. While I still like the QB
- series, PowerBASIC takes the cake and then some in my opinion. BTW-look
- for PB/WIN which has just been released and there are rumors of PB/2.
-
- You can purchase PowerBASIC from the address below for $159.
-
- PowerBASIC, Inc.
- 235 Oak St. Ste 21
- Brentwood, CA 94513
- Order Desk: 800-780-7707
- Voice: 510-516-7700
- Fax: 510-634-0439
-
-
- 6. Ending notes
-
- With this I wrap up this month's copy of BMag. Next issue, expect a
- plethora of BASIC source code as well as more reviews and programming
- topics. I know, this issue was pretty ruff, but it was all done in one
- night's work. As I sit here at 12:39am, I wonder how well this will fare
- out there in modem land... Last minute news, Wayne Venables will be
- doing some stuff on VB/DOS next issue.
-
-