APPLICATIONSDIVERS ★ DAVE INSTONE BREWER gives us a scanning utility for Basic programming ★

RSX Search (Computing With the Amstrad)Applications Divers
★ Ce texte vous est présenté dans sa version originale ★ 
 ★ This text is presented to you in its original version ★ 
 ★ Este texto se presenta en su versión original ★ 
 ★ Dieser Text wird in seiner Originalfassung präsentiert ★ 

SEARCH is a utility which scans a Basic program for any specified commands or words and prints out the line numbers where they occur. It is an invaluable debugging tool for Basic programming.

You could for example find all the lines which contain a GOTO command or a variable such as v$ or i% or even words which occur within a REM or within the quotation marks of a PRINT" " statement.

Being written in machine code the program is very fast - but you don't have to know any machine code to use it because the utility can be called from Basic by the new command |SEARCH.

Type in and save Program I. When you run it the checksum will spot any typing mistakes in the DATA lines and tell you which line to correct. If you have made no other mistakes the machine code will be automatically saved as SEARCH.BIN.

Now type in Program II which is the Basic loader for the search utility. This loads SEARCH.BIN so if you are saving to tape you should save a copy of it immediately after Program II by running Program I again.

If you are using discs make sure that Program II and SEARCH.BIN are on the same disc. Program II initialises the new RSX command |SEARCH by CALLing &8000.

The next step is to load the program you wish to search, but to experiment with your new utility you can start by searching Program II itself. If for instance you wanted to find every line which has a REM in it you simply add a new line:

1 REM

then enter the new command |SEARCH in direct mode and the line numbers will be printed out.

The program works by comparing the first line with every other line in turn. Whenever a match is found the line number is printed.

There are two rules to follow when using this utility. Firstly it is generally a good idea to use capitals and lower case letters in exact copy of the line you are searching for. If you are looking for the lines containing the variable letter$ then a search for the variable LETTER$ will be fruitless.

Secondly, when you are searching for words which are in quotation marks (such as in a PRINT or INPUT statement) or words which occur after a REM or DATA statement, these must be preceded by a single quotation mark in line 1.

To understand why these rules are needed and how the program works, it helps to understand something about the way a Basic program is stored.

Program III will allow you to see

[INCOMPLETE]

★ PUBLISHER: Computing with the Amstrad
★ YEAR: 1986
★ CONFIG: 64K + AMSDOS
★ LANGUAGE:
★ LiCENCE: LISTING
★ COLLECTION: COMPUTING WITH THE AMSTRAD 1986
★ AUTHOR: DAVE INSTONE-BREWER
 

★ AMSTRAD CPC ★ DOWNLOAD ★

Type-in/Listing:
» RSX-Search    (Computing  with  the  Amstrad)    ENGLISHDATE: 2020-07-25
DL: 175
TYPE: ZIP
SiZE: 4Ko
NOTE: 40 Cyls
.HFE: Χ

★ AMSTRAD CPC ★ A voir aussi sur CPCrulez , les sujets suivants pourront vous intéresser...

Lien(s):
» Applications » Colourdump 3
» Applications » Screen Dump (Compute Mit)
» Applications » Dump Bank 0 (Schneider Magazin)
» Applications » Colour Screen Dump (Amstrad Action)
» Applications » Sideways Dump (Your Computer)
» Applications » Mode 2 Dump (Popular Computing Weekly)
Je participe au site:
» Vous avez des infos personnel, des fichiers que nous ne possédons pas concernent ce programme ?
» Vous avez remarqué une erreur dans ce texte ?
» Aidez-nous à améliorer cette page : en nous contactant via le forum ou par email.

CPCrulez[Content Management System] v8.7-desktop/c
Page créée en 299 millisecondes et consultée 790 fois

L'Amstrad CPC est une machine 8 bits à base d'un Z80 à 4MHz. Le premier de la gamme fut le CPC 464 en 1984, équipé d'un lecteur de cassettes intégré il se plaçait en concurrent  du Commodore C64 beaucoup plus compliqué à utiliser et plus cher. Ce fut un réel succès et sorti cette même années le CPC 664 équipé d'un lecteur de disquettes trois pouces intégré. Sa vie fut de courte durée puisqu'en 1985 il fut remplacé par le CPC 6128 qui était plus compact, plus soigné et surtout qui avait 128Ko de RAM au lieu de 64Ko.