The Astrogen program for generating 1456 object code programs that simulate the DVB-MHP system.

William Overington

Copyright 2002 William Overington

Monday 7 January 2002

Astrogen is a program that can be used for generating 1456 object code based simulations of the DVB-MHP system in use, as seen by the viewer. For information on the limitations of these simulations and details of the important information regarding the fact that The Plateau System that is simulated in all but one of the 1456 applet landscapes that are presently available is not, at this time, and may never be, an accepted system, please study the document Some additional 1456 applet landscapes related to simulating the DVB-MHP system. that is available as part of the present series of documents.

Astrogen can be used either on-line on the web or downloaded to local storage for off-line use using a Java enabled web browser. On-line usage enables readers to experiment with using the 1456 object code system on-line on the web without needing to download any files to local storage. A Java enabled browser is needed. If used off-line, the Engine1456.class and the seven 1456 applet landscapes that simulate a DVB-MHP terminal should also be downloaded to the same local storage directory.

This document is designed for use by readers who have studied the document 1456 object code upon the DVB-MHP platform. and who have also studied the document Some additional 1456 applet landscapes related to simulating the DVB-MHP system. and have obtained some understanding of 1456 object code.

The Astrogen program has the big advantage that it can be used on-line on the web from, say, a public library, even if the reader has no local storage facilities at all. A Java enabled browser is needed.

The Astrogen program.


Here is an example of the use of the Astrogen program. The link below goes to a modified version of the astrogen.htm file named ast01601.htm though the only modifications are in

the title,

the building in of the example software in that 47:H is replaced by a sequence of characters starting 47: and ending in H with the characters between representing the software that is explained in this example,

the presetting of the 1456 applet landscape to ast01503.

This example uses 1456 object code to produce the effect that dragging the mouse, that is, moving it around while the button is pressed down, causes cyan coloured stars to be drawn on the screen.

The mouse dragged event is represented by an obeycode having a value of 47 in these 1456 applet landscapes.

So, the software for drawing a star needs to be inserted between the 47: and the H of the 47:H sequence that is already in the Astrogen program at start up.

The software can be moved to another row of the software if desired, but not to a string row.

The software for drawing a star is to program the eutdraw system using 1456 object code commands $Z $P $X $Y $C $N and then cause the eutodraw system to act on its contents by sending it a $E command.

The $N command is not yet documented in the 1456 object code documents that are published on the web, so here is an explanation extracted from documentation that has already been prepared. The explanation is placed in a table. A reader of this document who has not yet learned 1456 object code and is reading this document may conveniently omit the contents of the table at this stage.

The N may be thought of as meaning 'null' so that the use of a $N command is to give a null effect to that particular column of the eutodraw table acting as an independent command. The $N command places the value -2 into the eutoclist array. The $N command does not set the ai1456 register to -2, so $N is not quite the same in effect as the !-2&w$C sequence. However, as the -2 in the ai1456 register is unlikely to be used after the $C has been carried out, the use of $N is likely to be often a suitable substitute. Thus use of $N usually has exactly the same total effect as !-2&w$C in a program.

For this example, let us suppose that the star is to be a seven pointed star and that an imaginary circle that circumscribes the star will fit in a box that is 40 pixels square. Please note that the 1456 object code colour number for cyan is 10.

The star is to be centred on the screen position of the mouse at the time that the mouse event occurs. The coordinates of the mouse event are passed to the 1456 Engine by the 1456 applet landscape behind the scenes, so that, when we need to use them, all we need to do is to pick up the x coordinate from mi1456[5] and to pick up the y coordinate from mi1456[6] and use them as data.

Thus, we now have the data to send to the eutodraw system so that it can draw the star in the right place, in the right colour, with the right size and with the right number of points.

The detailed instructions for drawing a star are in the document Eutoshape commands in 1456 object code. and there it may be found that four columns of the eutodraw table are needed in order to draw a star.

It is found that for a line drawn star the action code is 25, so, bearing in mind that colour 10 is to be used, the control number 2510 needs to be sent to the eutodraw system.

The second method for drawing a star is to be used, with a star selector value of 3. This produces a stylish, regular star. A parameter representing one thousand times the rotation angle is set at 90000 so that one of the points of the star is at the top of the drawing.

So, thus far, the data that needs to be sent to the eutodraw system is as follows. Some is already in numbers, some is just in English at present and needs to be converted to either an integer or to software that produces an integer.

x coordinate of the top left corner of the drawing box width of the drawing box 7 3
y coordinate of the top left corner of the drawing box height of the drawing box 90000 0
2510 -2 -2 -2

The width of the drawing box and the height of the drawing box are both 40 pixels. The x coordinate of the top left corner of the drawing box is found by loading the value in mi1456[5] into the ai1456 register using 5&<&w and then subtracting 20 using 20&- as 20 is half of the width of the drawing box and the mouse event is regarded as having taken place at the centre of the drawing box. The y coordinate of the top left corner of the drawing box is found by loading the value in mi1456[6] into the ai1456 register using 6&<&w and then subtracting 20 using 20&- as 20 is half of the height of the drawing box and the mouse event is regarded as having taken place at the centre of the drawing box.

5&<&w20&- 40 7 3
6&<&w20&- 40 90000 0
2510 -2 -2 -2

The integers now need to be converted into 1456 object code commands in order to produce the software. The -2 items in the third row are converted to $N commands. The &w entries are simply to load an integer literal.

5&<&w20&- 40&w 7&w 3&w
6&<&w20&- 40&w 90000&w 0&w
2510&w $N $N $N

The individual items now need to be encoded as one continuous sequence of software. The process is now quite straightforward.

Start with a $Z command.

Now, for each of the four columns of the table in turn,

add a $P command,

then the contents of the cell in the first row of that column followed by a $X command,

then the contents of the cell in the second row of that column followed by a $Y command,

if the contents of the cell in the third row of that column is not a $N then the contents of the cell in the third row of that column followed by a $C command, else if the contents of the cell in the third row of that column is a $N then just the $N on its own without a $C. This is because the $N has a $C command built into it. The sequence $N$C would act as just $C on its own, as the effect of the $N would be overwritten.

When all of the columns have thus been coded, add a $E command at the end so that the eutodraw system draws the star.

All that remains to be done to produce the software routine is to put 47: at the start and H (for Halt) at the end, and the software is ready for use.

47: $Z $P 5&<&w20&- $X 6&<&w20&- $Y 2510&w $C $P 40&w $X 40&w $Y $N $P 7&w $X 90000&w $Y $N $P 3&w $X 0&w $Y $N $E H

The software is shown above with spaces in between sections of code. In actual use the code is more likely to be used as one continuous sequence of characters without the spaces.

This software is already loaded into the example below. Please click on the link, go about half way down the page that is displayed, and then click on the button that states

Please generate a 1456 object code web based DVB-MHP simulation

and, all being well, a new page should be generated for you.

On that new page, please move the mouse over the black screen area and press the mouse button down. A trail of seven-pointed line drawn cyan stars should be produced.

The Astrogen program, preloaded and preset as an example of use.

Having tried that, please press the "back" button on the browser and get back to "The Astrogen program, preloaded and preset as an example of use." page and modify the software as follows.

In the line Software08 please change the figure 7 to become a figure 5. Also, change the figure 3, that is, the value of star selector, to become a figure 2.

Please go about half way down the page and click on the button that states

Please generate a 1456 object code web based DVB-MHP simulation

and, all being well, a new page should be generated for you.

On that new page, please move the mouse over the black screen area and press the mouse button down. A trail of five-pointed line drawn cyan stars should be produced.

Having tried that, please press the "back" button on the browser and get back to "The Astrogen program, preloaded and preset as an example of use." page and modify the software as follows.

In the line Software07 please change the number 2510 to become 2607 instead. The 26 part means that filled stars are to be drawn and the 07 means colour 7, which is magenta.

Please go about half way down the page and click on the button that states

Please generate a 1456 object code web based DVB-MHP simulation

and, all being well, a new page should be generated for you.

On that page, please move the mouse over the black screen area and press the mouse button down. A trail of five-pointed filled magenta stars should be produced.


Thinking that perhaps some readers might like to experiment on-line with the software in the program The ast01504 web based simulation of 1456 object code upon the DVB-MHP platform, example of use. which is contained in the file ast01524.htm, I have set up the following page. The software is the same as in ast01524.htm though it is split up differently so that it is spread amongst the text boxes in the Astrogen file. The program is somewhat crowded into the text boxes, yet it works well on-line and is thus capable of being used to carry out quite interesting work using just a Java enabled browser and maybe a notepad and a pencil to set out a program.

The Astrogen program, preloaded and preset with the program of ast01524.htm.

This will hopefully be of interest.


If used off-line, the Engine1456.class and the seven 1456 applet landscapes that simulate a DVB-MHP terminal should also be downloaded to the same local storage directory.

The Astrogen program.

Here are links for the various 1456 applet landscape class files and for the Engine1456.class file. Right clicking may well be the best way to download these files to local storage.

ast00901.class

ast01501.class

ast01502.class

ast01503.class

ast01504.class

ast01505.class

ast01506.class

Engine1456.class

 

Astrolabe Channel

Copyright 2002 William Overington

This file is accessible as follows.

http://www.users.globalnet.co.uk/~ngo/ast01600.htm