News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_AMSDOS

Interesting Type-Ins.

Started by AMSDOS, 11:14, 29 November 12

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

copychr$

#25
CAT.BAS, 3K is just that, a souped up CAT.

It will not modify anything in the file system, apart from copying or erasing itself on demand.
Things have been made as smooth as possible and there aren't really any gotchas.

It's both a Standalone and a Module. That use is described in the attached doc.
Best use is to have it on your working disks and copy it when desired on any disks you visit.
With 2 drives you just need one copy on any drive.

Here is the Help File to get an idea:

100 REM *** CATHELPE.BAS
110 MODE 2
120 '
130 PRINT "CAT.BAS offers repeat basic file access to users"
140 PRINT "of all levels of experience.":PRINT
150 PRINT "To get the most out of it please consult the documentation.":PRINT
160 PRINT "Arrow Keys and Joystick let you move the Highlight."
170 PRINT "All features are risk free and just one key press away.":PRINT
180 PRINT "X - Cycles through 4 Cat, Dir & Mode choices. Return selects."
190 PRINT "S - Saves Cat.Bas to current disc."
200 PRINT "E - Erases Cat.Bas from current disc."
210 PRINT "C - CAT and |DIR are repeated. You may swap discs anytime."
220 PRINT "Q - Quits program."
230 PRINT "Return or Fire Button 1 - RUNs Selection."
240 PRINT "L - LOADs Selection and sets f7 to LIST. Hit f7 then Return to view."
:PRINT
250 PRINT "Spacebar or Fire 2 - TOGGLEs Drives.":PRINT
260 PRINT "Control + A or B - RUNs Cat.Bas from Drive A or B"
270 PRINT "allowing you to indifferently work both Drives.":PRINT
280 PRINT "Any Key to continue...";:CALL &BB06:PRINT CHR$(11)
290 PRINT "Please note following changes when in use as a Module:"
300 PRINT "S - Selects the File Name to be returned."
310 PRINT "E - Not available."
320 PRINT "Q - Quits back to main program, no choice is made.":PRINT
330 PRINT "CATCALL.BAS can help you get a handle on Module use.":PRINT
340 PRINT "Pressing Control + A or B Keys will start CAT.BAS"
350 PRINT "Now...":PRINT
360 '
370 KEY 156,"RUN"+CHR$(34)+"A:CAT.BAS"+CHR$(13):KEY DEF 69,1,97,65,156 '^A
380 KEY 157,"RUN"+CHR$(34)+"B:CAT.BAS"+CHR$(13):KEY DEF 54,1,98,66,157 '^B


CAT.BAS
Full Listing in the doc. But this is some of what you get ...

[attachimg=1]

The doc will get you up to speed, but you don't need much more than the help file on the dsk.
Why not use this download link:  ftp://ftp.lip6.fr/pub/amstrad/misc/TYPEINS.ZIP
RUN"CAT and have a go.

On a real CPC:
Using only one drive, you will have to delete a file to get Cat.bas on that full typins.dsk.
Also set flag drive to fdr=1 in the first line to avoid error messages.
Pink (16) on blue (1) happens to be flicker-free and readable for mode 2.
Setting k1%=16 in Line 60040 will do it.

-------------------------------------------------------------------------------------
Please note a modification:
dsk file removed. All code is now in copychrs.dsk at foot of post #28.

Gryzor

This is very appealing in a geeky way, but it needs to replace CAT in the ROM to be of much use...

copychr$

#27
Thank you, Gryzor, and all who make it go, for providing a welcome here.

Also, thank you for the compliment.
That's the nicest thing anybody ever said to me ... geeky.
Makes me think of the girl with the coke bottle in Head First Java; "Wouldn't it be dreamy if ..."

I really don't know a pig from a poke and that's why things turned out this way.
Somehow cozy, like sitting around the fire after rubbing your sticks together.

As for keeping cats in roms, mine are both elderly and lack an eye and get about a lot :-)

I agree it would be slick to type or call CAT, even have a dedicated key and get something along these lines.
That's very tempting, but beyond me.

As a primitive one should be content to rub one's sticks.
Hey, let's make torches and all go mess up the sacred cave! Yeah.

copychr$

#28
DOS.BAS 8K.

[attachimg=4]

DOS? Sure.

Everybody is standing around, going "Who can do sh*t like this?"
And sure enough, BG can do it ... DOS for short.

That pun has caused a lot of confusion until today, as most professional computer journalists only interpret acronyms.
Nothing gets operated whatsoever, but one does a lot of the other.

Here Basic users also get to do some.
With the added comfort of selection by a flying cursor, both in CAT Screen and Menu and not a command line in sight ...

That is a big claim and something will always be wrong or uncomfortable.
No, not bugs, that's another misnomer. BUG stands for big user guide. One can be found in the Doc.

If you still code and get some jollies here, then all options can be rewritten to your taste.
I'd shy away from messing with the zooming about part though.
Information helpful to start coding that is available in the doc from post #24, and one can search for some other examples.

To a remarkable extent, only copychr$ was needed or used to make plain Basic bootstrap itself a working environment.

The process is so productive, because user selection of displayed information implies instant access for the working code.
There is no more need to retrieve from memory or file at that point.

Today, the same routine is exploited in the beta version of Google Glasses.
My memory has long gone, but they have a nice app that manages marital strife.

After staring at a female person for a few seconds, I am informed; "This is NOT your Wife." or "This IS your Wife, her name is Optional."

AMSDOS

I've been typing in and playing around with a few sound programs which included this one called Alto from AA64 which makes use of a Graphics Pen and the more difficult FILL command, however I have been able to come up with a BASIC 1.0 solution so the program appears to be functioning in the same manner.

Running this BASIC 1.0 program now in BASIC 1.1 appears to be just as functional as the original (despite being 2Kb larger), and in BASIC 1.0 everything appears normal, though the sound from the Notes seem to sound a little bit clipped, I'm unsure if it's due to the extra carry from the program or constraints from BASIC 1.0, this program is full of Arrays though and I've included another one for filling in the areas and it could easily be shortened down to each individual key pattern which is presented in the program.

Anyway I thought I'd include it in here along with the original for people to compare.
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

AMSDOS

Quote from: Border_7 on 23:51, 06 May 13
Skycapers! Nice  :D  Looks like it came from one of those multi-platform mags...


I must of grabbed the scan of this particular program off CPC-Power when it was the old site and typed it in and posted it here while the site was down. It appears to have come from Computer & Video Games (or C+VG) from the mid-80s.
According to Wikipedia (which is contradicting itself), Future Publishing produce that magazine which began Nov 1981, though clicking on Future Publishing reveals they didn't start until 1985 with Amstrad Action. I can only assume that C+VG were subjected to Future Publishing at some stage during it's publication.
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

AMSDOS

#31
This program was a little filler in the Type-Ins pages of AA65 which produces some interesting graphic patterns as it moves forwards & backwards on the screen.
Originally made use of "GRAPHICS PEN", it's so easy to convert for a 464, I must of missed the issue with the solution in it.  ;D


I was curious to see how this program would go in Pascal, and was able to produce something similar which runs a little bit faster which I'll post in the Pascal Thread.
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

Gryzor

Nice early gfx demo, just make sure you run it at 500%

AMSDOS

Quote from: Gryzor on 18:42, 06 January 15
Nice early gfx demo, just make sure you run it at 500%


Hmmm. I tried this 500% on my old WinXP computer in WinApe and my computer nearly had a seizure.
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

Gryzor

Ahh poor thing it can't stand the Z80 power...

AMSDOS

I came across this program a while ago, unfortunately I'm breaking my own rules because it's a RSX Library, lots of RSX Library programs come with commands, to allow easier access to the Firmware, but this one allows you to play around with Registers (Singular or Pair) & a RSX command FWCALL followed by Firmware Address. So a BASIC program with a lot of different commands, could be given a boost under this program or could be useful for a Lengthy Program which might have too much stuff in it for a BASIC compiler to deal with.


regiload &copy popular computing weekly (1987)
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

AMSDOS

Well I couldn't resist typing in that program & found something to test it on. I have much to learn!  :o


I've attached some variations of the same program (Hypno-Strobe/Colour Fader), which is using a series of MOVE & DRAWR commands within a loop as well as a INK . Around that I've put a WHILE loop to check if Return has been pressed, program exits when this happens and resets INKs back to normal.


What's surprising is the BASIC result (HYPNO.BAS) is faster than Regiload (STROBE.BAS & STROBE2.BAS). In addition to the DRAWR command, a Graphics Pen is being used to alternate the colour, which initially had me setting the GRA PEN (&BBDE) for it throughout the loop. In STROBE2.BAS I've reduce the use of &BBDE, the result looks a little bit different, but still no faster than the BASIC! (both 1.0 or 1.1), which draws to the centre of the screen in around 8 seconds. STROBE.BAS & STROBE2.BAS do this in around 13-14secs!


In the original program, maths is being used with those MOVE & DRAWR commands. Perhaps that's slowing things down being in the RSX, though it's a big turnout, or maybe it's no better than what the program is currently using. I haven't disassembled the Regiload M/C to see what it's doing, it might be it's design and nature of it, which cannot be improved. I can test this with another program which directly sends RSXs to MOVE & Drawing Commands.
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

Fessor

it has to do with the circumstance that rsx cant be stored tokenized as basic-commands and the basic interpreter has to interpret each byte of the name of the rsx-command and compare it with the nametable of rsx-commands to look if this rsx-command is defined and where its entry-point is. also the parameters of the rsx are adressed and accessed via the index-registers. This makes the Parsing of RSX slower than parsing a Basic-Command which for the most common keywords is simply one byte.




TFM

Positive an MC side is that you search for the address of the RSX once, store the address and then use the address.  :)  Maybe doable in BASIC too?

TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

AMSDOS

Ok, so if RSXs are bad in interpreted BASIC, I guess a BASIC CALL with parameters would help smooth the process if a CALL gets tokenised.


Otherwise I've got some great results using RSXs by incorporating it into a Compiled Program.
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

AMSDOS


After AA discontinued the Type-ins from issue 109 onwards, the next best thing was the Basically basic page and in Issue 112 (January 1995), Angela Cook and Rob Buckley posted this fun little game of dodging the square meteors with your wire frame starship. :)


[attachimg=1]


I actually found a small bug in the program where, after a while all these square meteors appeared out of nowhere and you had no chance of dodging them. This program had typechecker codes in it, but they all seemed to match up, so the bug was present when the program got published.
I can't remember if I sorted this out back then, but I found the bug on Line 120, specifically this code:


bl3(aa)=0


which should read:


bl3(a)=0


Now this starfigher game is much more enjoyable. But it's quite well written, using BASIC functions MAX and MIN instead of IF statements to optimize this program, it also works in BASIC 1.0 with the use of PLOT to set the GRAPHICS PEN & it also sets the Control Code to set the Screen Write Mode to XOR.


When you run out of lives though the program ends and all this Character Garbage displays itself onscreen. BASIC 1.0 doesn't support CLEAR INPUT, so I've added a:


WHILE INKEY$<>"":WEND


which effectively does the same thing.



* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

Powered by SMFPacks Menu Editor Mod