GW-BASIC Direct Mode & Indirect Mode – GW-BASIC Tutorial

GW-BASIC direct and indirect mode

-Modes of Operation in GW-BASIC:

GW-BASIC can operate in two modes, Direct Mode and Indirect Mode. These modes will be discussed below:

1) GW-BASIC Direct Mode:

“Direct mode of GW BASIC executes the commands as they are typed.”

Arithmetic and Logical operations results can be calculated at the spot, but after the calculation/execution, the commands are lost. Below you will find an example of GW-BASIC Direct Mode:

DirectModeofGWBASIC

Direct Mode screenshot of GW-BASIC at GW BASIC emulator by RajasTutorials.com

As you can see at the above GW-BASIC screenshot, the commands are executed as they are typed, without any sequential instructions. Other than this, once they are executed, they are lost. They cannot be used/executed again until we type them. So in conclusion, this mode is useful for quick computations and for debugging purposes.

 

2) GW-BASIC Indirect Mode:

“Indirect mode of GW Basic is used to type programs.”

Program statements are always followed by line numbers, and they are stored in the memory. When they are loaded in memory, we can run the program by using the “RUN” command. Check the following example screenshot of Indirect mode for more clarification:

Average & sum of three numbers

Indirect Mode screenshot of GW-BASIC at GW BASIC emulator by RajsTutorials.com

At the above screenshot, the program is temporarily loaded in the memory and is executed, which is Indirect mode of the GW-BASIC.


“My posts/articles/images are not allowed to be stolen/copied anywhere at Cyber space. Doing so will allow me to take a legal action against the copier.”

Related Posts

M.Bakhtiar Zuberi
Hello, I'm M.Bakhtiar Zuberi, the only article poster & owner of this website. Your comments/suggestions are welcomed the most! RajasTutorials.com is a part of 3DPixelz.com network.

3 Comments

  1. Azmul Haq says:

    I am using AUTO command in GW BASIC. After type a program I want to run it. END command not returning me to the Command Level to execute the RUN command. I also tried CTRL-BREAK and CTRL-C. GW BASIC version is 3.23

    • M.Raja
      M.Raja says:

      CTRL + C should work with all the GW-BASIC versions. Are you sure that you are only pressing these 2 keys and not any other key with them?

      Regards,

      Raja

Leave a Comment

Kindly solve the following puzzle to prove that you\'re not a bot: