Micro-PROLOG
Programming: General · ZX-Spectrum 48K · 1 players · English
Sinclair Research Ltd · 1983 · Pound sterling 24.95
Discussion
Nobody has started a thread about this yet.
Remarks
A separate {Micro-PROLOG Reference Manual|Sinclair Research Ltd|2000800} was published.
Play
- Micro-PROLOG.tap.zipTape image English19 KB
- Micro-PROLOG.tzx.zipTape image English19 KB
Documents
- Micro-PROLOG_Book.pdfComplete book English7,666 KB
- Micro-PROLOG.txtInstructions English23 KB
- Micro-PROLOG(EN).pdfInstructions English665 KB
Files and rights
Distribution permission is on record, granted to another archive rather than to this one. Screens and pictures are copied here; everything else links to the archive that holds it.
- AllowedSinclair Research Ltd → WorldOfSpectrum
Credits
- Logic Programming Associates Ltdcredited
Sign in to credit somebody, or say what these people did.
Scores
In the magazines
- Sinclair User #231984 · Gilbert Factor8/10
- Personal Computer News #551984 · Overall Value3/5
Elsewhere on the web
- WorldOfSpectrum 3 votes9.00
In the magazines 22
Big K #9Dec 1984 · p.69
Fin Fahey
THE EXTENDED SPECTRUM Fin Fahey checks out a smattering of utility programs for Old Rubber Keys. System Software, as we old computer industry hacks call programming tools, is hardly destined to set the world alight. It smacks of hard work and late night sessions over a hot keyboard and seems light years away from the glamour and fun of, say, a new Melbourne House adventure release. But for people interested in stretching their minds, and their machines, some of these trusty workhorses may well turn out to have hearts of gold. But why go beyond the facilities offered by Sinclair BASIC? (One may well ask.) Quite simply, no machine, and particularly no BASIC interpreter, fills all the needs of the budding programmer, and for a lot of requirements like arcade games, just hasn't got the speed. There area fair number of - packages which just add a few useful commands to BASIC extensions r programmer's toolkits, these generally give you the sort of goodies you've always needed to develop your BASIC programs. There's no line Renumber command on the Spectrum, and for this you'll have to buy a toolkit. The same goes for many other 'system' commands. Trace, to give you a continuous listing of program lines being executed, Map, to tell you which variables have been specified, and Block Delete, so you can get rid of more than one line at a time, to name but a few. Super Toolkit, from Nectarine, has all of these plus such things as a Crunch command, to get all those useless spaces and REMs out of your program before running. It clocks up a total of 12 commands, as does Toolkit from IMS Software, which includes an Auto line-numbering routine. Slightly fewer facilities on CP Software's Spectrum Extended BASIC, only 10 commands in this case, and the only one unique to this package is Find, which will look fora specific string text in your program. CP, however also do Supercode, a machine code toolkit, incorporating a hundred off-the-shelf machine code routines. These include an impressive range of scrolling effects, high-resolution diagonal scroll, low-resolution shutter and ripple scrolls and many others. There are four sound effects generators too, but the truly impressive thing is that you can include CP's code in your own BASIC and machine code programs, an amazing bit of altruism. Each routine has full in-program documentation and a demo mode shows you what they can do. It's got to be good value. From off-the-shell machine code to creating your own. If you've decided that BASIC's too slow for your program design, then you'll probably want to write machine code. Some people seem quite happy programming this byte by byte as BASIC POKEs, but for really effective development you'll need an assembler. Assemblers allow you to put Z80 code in assembly language, a much more understandable form, even though it's a lot more obscure looking than BASIC. A good assembler will allow you to specify addresses and constants as meaningful labels which makes the code a lot easier to follow. In such a symbolic assembler, the JP instruction (equivalent of BASIC GOTO) could be rendered JP LOOP instead of giving an actual address, say JP $4000. But before actually using one of these things, you may need to learn what it's all about. To help you, there are a number of tutorial programs, and some of these actually allow you to set up and test code. Sinclair's Beyond BASIC offers a tutorial on the internal structure of the Z80 plus lessons on each assembler instruction. These are illustrated with simple moving graphics. There is an experimenter section where you can watch the effects of your own code on memory and registers. Sadly, this one doesn't cover the entire instruction set. More complete is New Generation's Machine Code Tutor. This comes on two cassettes and covers everything. Once again, you can write your own code and 'run' it on a diagrammatic simulator. Although this is rather harder work than Sinclair's, I think it gives a closer feeling to using an actual assembler. Dream Software also have a simulator. This has much nicer printed documentation than the other two, but unfortunately it describes an imaginary chip which resembles the Z80 in many respects. I think that this may be unnecessarily confusing, but as long as its borne in mind, the transition to the real chip shouldn't be too hard. So now you can get down to some real coding... Sinclair themselves market the Zeus Assembler, which allows full symbolic instructions. Lines of code are entered much as in BASIC, and editing is similar, so this should be an easy one for beginners to move to. Picturesque's Editor/Assembler, on the other hand, has a rather better editor than the Spectrum, but the key response seemed a bit slow to me. This latter program is very tolerant about the format in which you enter code. Very different from these two is Oasis Software's Spectre Macro-assembler, and I certainly wouldn't recommend this one for beginners. It's a very professional product, but using it is more like learning a new computer language than anything else. It doesn't use Z80 instructions directly; they have to be set up as procedure definitions much as in high-level languages like Forth or Pascal. This makes it very powerful, since it's just like building your own interpreter. But, as I say, not for newcomers. An indispensable tool when developing machine code is some sort of Monitor. A Monitor provides easy ways of getting at memory, moving it, changing it, searching it for particular values, that sort of thing. You can also usually get dumps of Z80 register values and step through a machine code program. The Zeus assembler has a reasonable monitor with it, but Sinclair do a more extensive version as a separate product. This also allows you to Disassemble code, which means to translate machine code back to assembly format. Useful for looking at the ROM, but maybe you'd be better off buying one of the 'Spectrum ROM disassembled' type books which also give explanatory notes. Picturesque's Editor/Assembler has no attached monitor and you have to buy theirs separately, although both programs can be loaded at the same time. Agai, there's a disassembler. Assembly language isn't the only way of getting fast code. Scope II, from ISP, is a simple language aimed at producing fast machine-code animation. The makers call it a medium-level language, as it's mid-way between BASIC and assembler. I feel it's rather closer to machine code, but it's certainly a lot easier to use. Once you've written code in SCOPE II, it is boiled down by the program to machine code routines, which can be run without Scope being present, so you develop commercial products, or give copies of your games to your friends without fear of committing piracy. This process of boiling down machine code is known as compilation, and it's possible to do it to BASIC. The only BASIC compiler we had available to look at was Softek's. This is certainly fast. From running a few simple loops, it looks roughly about 150-200 times faster than interpreted BASIC. It does have some serious drawbacks, though. For one, there a quite a few BASIC functions it can't translate, floating-point arithmetic and arrays among them. More seriously, compiled programs will not run without Softek's run-time routines being present. Unfortunately, the company is being quite prickly about this, and are claiming that if you develop your program and compile it with their program. then they've suddenly acquired a share in it, Whatever the legal position, this seems a little dubious to me, and it's certainly a discouragement to using Softek's product for commercial development. The final approach to fast code is to use Forth. This high-level language is closer to machine code than BASIC, and for most purposes runs up to ten times faster. Not spectacular maybe, but it can make a difference. The speed saving is nice, but it's not really the central point about Forth. The language takes a fundamentally different approach to BASIC, and one which provides a much sounder design discipline. It would certainly be easier to write good machine code after a grounding in it. Forth is known as a 'procedure-oriented' language. That means there's no more complaining about there not being a command in BASIC to do something. If it's not there in Forth, then you just write your own command, which is compiled into the language vocabulary. Although you can theoretically do this in BASIC by using subroutines, compiled procedures are much faster and easier to use. Forth is easier to structure too. There are at least four versions of Forth available on the Spectrum. It's hard to decide between them, but Melbourne House's Abersoft Forth is the only one recognised by the independent Forth interest Group. Sinclair also do a Forth which to my relatively untutored mind seemed much the same, both in terms of speed and usability. Both versions have minimal printed documentation, since they rely on the user going out and acquiring a Forth manual. The sad thing about Forth is that. unless you're a fan of the ill-fated Jupiter Ace, you can't market any of your programs since they won't run without someone else's product. While on the subject of languages, Logo has been stirring up interest as a teaching language, particularly for younger children. Unfortunately, the version I looked at, Snail Logo by CP Software, really merited its name. Logo is high-resolution graphics oriented, and the user commands a 'turtle', or in this case a snail, to draw shapes on the screen. The CP interpreter turned out to be written in BASIC, so every command is interpreted twice. Slow? I can't imagine anyone, adult, or child, having the patience to work through the manual, let alone use it. Something of a weirdie, but one I find particularly fascinating, is Micro -Prolog, from Sinclair. Prolog represents yet another direction in new languages, and is particularly suited for Artificial Intelligence and linguistic purposes. Its very odd to use after command oriented type languages like BASIC, or even Forth, because a program in Prolog (it stands for PROgramming in LOGic) is mostly a way of organising data, not of setting up a fl ow of commands. Now I've got the point, I want to know more about this one. Sinclair Micro-Prolog's documentation isn't bad either. Dr Ming back to the problem of generating programs, if you're an adventure game writer, you haven't really got one, The Quill, from Gilsoft, and Dream's Dungeon Builder can both be used to generate adventures of any complexity. We've reviewed them before, and they're both good value. Dungeon Builder has the edge in user-friendliness, and can be used to add graphics to adventures, while Quill has a more mechanistic approach. Both Gilsoft and Dream are perfectly happy for people to market games produced with their packages. Right on! On which cheery note I'll roll the credits and fade to black, but not before noting that this is far from being a complete survey, so if you've discovered an utterly wonderful, or unspeakably awful bit of useful/useless software in this field let us know. BASIC EXTENSIONS: SUPER TOOLKIT from NECTARINE TOOLKIT from IMS Software SPECTRUM EXTENDED BASIC from CP Software Price: £9.95 SUPERCODE from CP Software Price: £9.95 MACHINE CODE TUTORIALS: BEYOND BASIC from Sinclair Price: £9.95 THE COMPLETE MACHINE. CODE TUTOR from New Generation Software Price: £7.95 MACHINE-CODE FOR BEGINNERS from Dream Software Price. £0.00 ASSEMBLERS: ZEUS ASSEMBLER from Sinclair Price: £12.95 EDITOR/ASSEMBLER from Picturesque Price: £8.50 SPECTRE MAC-MON from Oasis Software Price: £14.95 MONITORS: MONITOR/DISASSEMBLER from Sinclair Price: £12.95 SPECTRUM MONITOR from Picturesque Price: £7.50 COMPILER from Softek Price: £9.95 LANGUAGES: SCOPE II from ISP Price: £11.95 FORTH from Sinclair Price: £14.95 ABERSOFT FORTH from Melbourne House Price. £14.95 SNAIL LOGO from CP Software Price: £9.95 MICRO-PROLOG from Sinclair Price: £24.95 ADVENTURE GENERATORS: THE QUILL from Gilsoft Price: £11.95 DUNGEON BUILDER from Dream Software Price: £9.95
ZX Computing #13Jun 1984 · p.137
PARLEZ-VOUS MICRO-PROLOG? Our reviewer has taken a look at an up and coming language from Sinclair. Although I enjoy learning and exploring new computer languages, when I saw the Sinclair Micro-PROLOG package I was a little worried to say the least at the size of the manual and its complexity. Still thinking that I had let myself in for a pretty stiff little number, I dived into the introductory manual which is much thinner and aimed toward your average Speccy user. After three pages of how to switch your computer on and how to load a program, I finally found out about the SIMPLE language. SIMPLE is a program which changes the way you use Micro-PROLOG so that it is not too confusing at first. I was quite impressed, I managed to follow what the manual was telling me without becoming hopelessly lost. PROLOG itself is a logically-structured language; that is, it is no where near as messy as BASIC, but then it is not as easy to grasp as BASIC. Consider the Micro-PROLOG line: which (x : x larger London) Taking this line step by step, first we have the command 'which'. This is asking Micro-PROLOG a question. The question is contained within the brackets and is in the form 'output format:argument'. In the example above I am dealing with cities and am looking for all the cities 'larger' than London. The word 'larger' in itself doesn't mean anything to Micro-PROLOG, what it is doing is just looking through its database and finding any places where a city has been specified as larger than London. The large green manual which accompanied the cassette was far beyond me. I found I could use the program quite well enough just by following the small booklet. The main use of MicroPROLOG is obviously 'do-it-yourself' database. Tailoring the filing system to your own requirements is very simple. Once you have a knowledge of Micro-PROLOG, you can create a database far better than any commercially available because you know exactly what you want from the system. Table 1 shows the commands available and their syntax. The loading and saving operations are similar to that of the BBC in that they load in blocks and it is very slow. It is quite reliable though, and the programs you write are not likely to be too large anyway. Micro-PROLOG was written by Logic Programming Associates Ltd, and is available from most high street stores under the Sinclair label priced at £24.95.
Table 1. Commands and Syntax add (argument) list description is (argument) This will produce a YES or NO response which (output format: argument) This will produce all objects, etc, which fit the argument. delete description This takes out single arguments kill description This takes out whole blocks save program name load program name
Personal Computer News #55Mar 1984 · p.503/54/51/54/53/53/5
Features 3/5
Performance 4/5
Documentation 1/5
Reliability 4/5
Overall Value 3/5
David Janda 3/5
PROGRAM PROLOGUE Is Micro-Prolog the logical choice for learning Spectrum programming, asks David Janda. NAME: Micro-Prolog SYSTEM: ZX Spectrum MANUFACTURER: Logic Programming Associates SUPPLIER: Sinclair Research and dealers. Sinclair may be onto a winner by putting Micro-Prolog on the Spectrum for under £25. This powerful and sophisticated language, which is already available for several systems, has many attractions for educationalists and enthusiasts. FEATURES Micro-Prolog (prolog stands for PROgramming in LOGic) is based on predicate logic, a language developed by logicians as a formal language of description. Prolog was chosen by the Japanese for their fifth generation computer project as the core language for designing expert systems. Micro-Prolog has been hailed as an ideal subset of Prolog for teaching programming in logic, rather than imperative languages like Basic. Thus, Prolog tells the computer what to achieve, not how to do it, it is well suited to query language applications, such as expert systems or databases. That the package is designed to be a tutorial on Micro-Prolog is reflected in the example programs and primer. This package offers quite a lot for your money. There's a cassette with MicroProlog. Simple (a front end program), several examples, an introductory booklet and the Micro-Prolog primer, all 301 pages of it. The user is left with a fair 25K to spare in which to, say, build an expert system. Unfortunately, the tape version is not compatible with Microdrives and all saving and loading must be done to and from tape. It should be noted that there is a different cassette format with Micro-Prolog where data is loaded/saved in blocks with error checking all the way, thus making the cassette handling quite secure. Not so secure is the lack of documentation for the example programs: you are referred to the Micro-Prolog reference manual which was not available at the time of review. Simple is a front-end program which is loaded on top of Micro-Prolog and acts as a 'friendly' buffer between the novice and Prolog proper. Much use is made of the Simple front-end and I have my doubts as to the usefulness of this type of buffer. DOCUMENTATION The introductory booklet on Micro-Prolog for the Spectrum is a know-nothing guide; maybe too simple at times, it does, however, gently guide you through the stages of loading Micro-Prolog and Simple. If you can't follow it, start gardening. Unfortunately, the Micro-Prolog primer is not so much simple as boring. The style is yawn inducing from the start and I congratulate the teacher who could preach-the-Prolog-gospel using this hefty tome. The exercises are not too hot either, being of the 'how many tennis balls will fit into a swimming pool...' type which makes a bad primer worse. IN USE Loading Micro-Prolog takes a couple of minutes, whereupon it's best to follow the leader and load the Simple front end and follow the examples. Doing your own thing might well result in confusion. A particularly annoying aspect was the lack of the Spectrum's key-click which is not used. I soon found myself doing the ZX81 twitch, which involves pressing a key and looking up to see if it was right. An editing facility is provided by allowing you to list a sentence, kill a sentence, or kill all, and there's plus intra-line editing using cursor keys five, eight and zero. Applications can be saved to tape by entering sAvr; name. No quotes are needed, and unlike Spectrum Basic all input is letter by letter. While loading, the name of the program is displayed together with the block number being read in. Altogether MicroProlog is safe to use and I never once crashed out to Basic. When entering large sentences, which will no doubt have a large number of parentheses, a full stop and a number are displayed which shows you how many brackets you have to close. This happens only when you have open parentheses and spill onto another line. I was fairly impressed with the error checking, which made sense most of the time. Evaluation errors give a number which is not listed in any appendix. Syntax errors are catered for, to a degree. VERDICT Before all you educationalists out there get excited about another language for the Spectrum, think again. Prolog may have been around for quite a while, and it may also be the 'fifth generation' language used by artificial intelligence experts round the world, but is it a programming language that you would want to use to teach your students programming? One school of thought reckons Prolog is not so good because it encourages you not to think procedurally. To get a better idea, it might be advisable to read 'Beginning Micro-Prolog' by Richard Ennals.
A SAMPLE PROLOG PROGRAM & RESULT Define the sentences... &.ADD (square above triangle) &.ADD (hexagon above rectangle) &.ADD (hexagon right-of square) &.ADD (rectangle right-of triangle) &.LIST right of hexagon right-of square rectangle right-of triangle &.is (square above triangle) (Result) YES
Sinclair User #23Feb 1984 · p.1098/108/10
Gilbert Factor 8/10
John Gilbert 8/10
SPECTRUM LANGUAGE JOINS THE FAMILY John Gilbert assesses a new package. The Micro-Prolog language package from Sinclair Research has arrived at the appropriate time to give a new direction to the software market. The term Micro-Prolog is short for microcomputer programming in logic and the language is one of a new generation which could be termed, under certain circumstances, artificially intelligent. That means that the computer will appear to give intelligent answers to questions which it is asked. From that description of intelligence you should be able to see that MicroProlog is nothing like Basic. In Basic you would write a series of commands which you would then expect the computer to execute in a sequence. MicroProlog, however, expects a series of rules, rather like those built into a database. The rules can relate to each other or be entirely separate. The language will provide answers to any questions you might pose to the computer which relate to the rules you have entered into the language database. Even though it is capable of artificial intelligence, the language will not be able to answer your questions if it has no rule to deal with them. Neither can it make assumptions or draw conclusions without those rules. To aid the construction of your programs there are several utilities in the package. One is called Simple and it will convert the base language into a language which a beginner can use. It does so by adding command words to the database which will make the task of programming easier for the user. Prolog programs are loaded in a different way from those written in Basic on the Spectrum. The computer will load software in blocks and the block numbers will be displayed for each, along with the message 'BLOCK OK' or a read error which will break the loading process. Once Simple has been entered you will be ready to write some rules. You could, for instance, build some rules about a family and the relationships in it. The family could include Clive, Mary, Robert and Rebecca. If the computer is to answer questions about those people it must first have a set of rules to which it can refer. They would include Robert is the brother of Mary, Clive and Rebecca; and Mary is the sister of Clive, Robert and Rebecca. Those rules would be entered for each of the family members. The rules have to be converted to a form of understanding of the language. Robert is the brother of Clive would be translated into add (Robert brother-of Clive). The middle name is the relationship between Robert and Clive and must consist of one word, hence the hyphen. It is also possible to qualify a data name such as that of a member of a family with several tags which would identify it further when the database is interrogated. To do so we can use a statement which consists of one data name and one relation name. You may want the language to know that Robert is male or that Rebecca is female. To do that you would type add (Robert male) and add (Rebecca female). To query the database you can use several commands, including 'is' and 'which'. The 'is' command is used to test if a statement is true or false. We could ask the question 'Is Mary the sister of Rebecca?' The computer could then give a YES or NO answer. It will give a NO answer in two cases - if the statement is false or if the statement rule does not exist in the database. The other query command is 'which' and that is more flexible. It will allow you to find the relationship between one item in the database and another. With the 'which' command you need to know only one of the items. For instance, if you want to know who is Rebecca's sister you would use the form which (x:x sister-of Rebecca). The x specifies the unknown quantity, as in algebra, and in this case it refers to a sister Rebecca might have. When that command is entered you should have the name of Rebecca's sister, followed by the statement 'no more answers'. That means that, using the rules it has obtained from you, the computer has found the corresponding relations in the 'sister-of' category. Data structures such as those can be built with any kind of relationships. To fit Micro-Prolog into the definition of a language you have to stretch that definition slightly to include databases and programs which store lists of data which can be accessed depending on the user's needs. The difference is that MacroProlog is more adaptable to the needs of the user than a normal database written in Basic or machine code. Although the language seems to be specialized it has several uses, two of which are the creation of databases which can be used by almost anybody and also the creation of educational teaching tools. In the utilities line the Prolog language has been used to build a model of the London Underground system. The various stations in the network were fed into the computer and the best, and quickest, possible routes between stations were found. Micro-Prolog can also be useful in the classroom. The database can be programmed with information about a subject and the student can interrogate the database and not have to think about is happening in the computer. The final test of software is whether it improves or advances the use of a computer and this package certainly does so. The only criticism is its price, £24.95, which will deter some people buying what is an example of good software. Despite the price, Micro-Prolog will prove that the Spectrum can be used for serious purposes and that the computer has a good future in schools and other institutions. Sinclair Research. [redacted].
Feature5
- Popular Computing Weekly #27Jul 1986 · p.22
- Your Computer #6Jun 1986 · p.50
- Sinclair User1985 · p.83
- Big K #9Dec 1984 · p.69
- Popular Computing Weekly #51Dec 1983 · p.13
News/Note4
- Your Spectrum #3May 1984 · p.6
- ZX Computing #11Feb 1984 · p.83
- Popular Computing Weekly #46Nov 1983 · p.5
- Home Computing Weekly #38Nov 1983 · p.6
Review3
- Sinclair Answers #1Sep 1984 · p.86
- Popular Computing Weekly #15Apr 1984 · p.17
- Home Computing Weekly #55Mar 1984 · p.39
Letters2
- Popular Computing Weekly #42Oct 1986 · p.12
- Popular Computing Weekly #36Sep 1984 · p.7
Full-page ad2
- Your Computer #9Sep 1984 · p.111
- Sinclair User #29Aug 1984 · p.51
Offer1
- Popular Computing Weekly #27Jul 1986 · p.22
Interview1
- Popular Computing Weekly #51Dec 1983 · p.13
Related
- Tags
- g225
- Same entry at
- Spectrum ComputingZXInfo
Reviews from people here
Sign in to write about this, or make an account. It takes a minute and lets you correct the catalogue too.
Everything ZXDB can hold about this is here.
Sign in to correct or add to this.
Hold the rights to this and want it taken down?

