Streamlined Machine Language In Atari Basic

  Рет қаралды 1,425

8-bit and more

8-bit and more

Күн бұрын

Пікірлер: 25
@akakakakakak3084
@akakakakakak3084 5 жыл бұрын
Analog was the best magazine that solely focused on Atari. I had subscribed till 1990. The contents were much more interesting than today's computer magazines.
@8bitandmore
@8bitandmore 5 жыл бұрын
akam akam I agree. Do you still have them?
@danzarz
@danzarz 5 жыл бұрын
Simply it had high educational values... unlike today's ones where the most important contents are ads.
@acht_bits
@acht_bits 3 жыл бұрын
Back in the days I bought several of the Analog and Antic magazines, not all, they were very expensive here in Germany and I wasn't making any money when my interest in the Atari got sparked. Stupid me, I sold all of them on ebay when I thought I wouldn't "need" them anymore. Fast forward 25 years, now I'd love to read them again.
@miselzivanovic2181
@miselzivanovic2181 Ай бұрын
It's already 5 years, but here we are... I started with learning Atari BASIC and Assembly just a few days ago. Thanks to your videos I am progressing like a champ I was struggling with how to start assembly code from BASIC {I am a Commodore guy and there it is, e.g. SYS 4864} Did not work with ATARI, but now i see it here, USR is to be used X=USR(4864) I am emulating ATARI-800XL, but it seem that most memory locations are the same as on 130XE
@CurtCox
@CurtCox 4 жыл бұрын
That default left margin always drove me crazy. POKE 82,0 is your friend.
@marklsimonson
@marklsimonson 4 жыл бұрын
The full text of lot of Atari magazines can be found here: www.atarimagazines.com . Unfortunately, it only includes ten issues of A.N.A.L.O.G. from 1988 and 1989, and not January 1989. But it does have complete issues of some other good ones, like Antic magazine, which I'm sure covered a lot of the same kinds of techniques. Anyway, FYI. Also, what do you do if the ML program includes the atascii code for the double quote mark? Wouldn't that end the string? I suppose you'd have to include some kind of exception for that.
@8bitandmore
@8bitandmore 4 жыл бұрын
Thanks for the ANALOG tip, for the double quote I assume you could do a CHR$(asciicodeforquote) and append to the end of the ML String...
@SteveMorrow8859
@SteveMorrow8859 5 жыл бұрын
You should get a website and get this information online! This is good stuff, coming from an old school Atari home computer fan (since 1986). :)
@8bitandmore
@8bitandmore 5 жыл бұрын
The website is www.8bitandmore.com, thanks for watching!
@theannoyedmrfloyd3998
@theannoyedmrfloyd3998 4 жыл бұрын
I would DIM a string, read the data, and then ML$(x,x)=chr$(data) since strings in Atari BASIC are linear arrays, it just depends on how you manipulate it. Then there's a poke to make E: not execute ATASCII commands, then print ML$ to the screen. After that, it's simple to make your BASIC line around it. Slightly trickier for longer chunks of code. This works only if your machine code is relocatable in memory.
@battlecoder
@battlecoder 5 жыл бұрын
That's a really neat trick!
@8bitandmore
@8bitandmore 5 жыл бұрын
Thanks!
@jacobturner774
@jacobturner774 7 ай бұрын
Did you have to write what that string does in assembly first in order to make it do what it does? Or is the string the equivalent of making the background boarder colors different? Also how did you make that machine language string specifically do what it does? Thank you in advance i am a novice in atari basic but im trying to learn new things!
@miselzivanovic2181
@miselzivanovic2181 Ай бұрын
I started with 'learning' Atari few days ago {normally i am a Commodore C128 guy}. According to that what he wrote in previous episodes, the string symbols are representing the numbers which are coming from the byte code {of the assembly program. You can get them in Debugger. Normally those numbers are hexadecimal. Ergo, they had to be converted first to decimal to use them in BASIC... The effect you see is coming from the raster lines which are horizontally running all the time {and showing what's going on on the screen}. Basically, he is, so to speak, feeding the raster with color values and because it's all so fast, you can see it as a motionless picture. He didn't use any timings and that is why the picture isn't so perfect {right side, probably because of the last key check routine }, but it's a good effect nevertheless. In fact, to achieve this effect, you would need only 12 bytes of code {he's using 26 because of the click on any key to exit}. {between a number and label {LOOP} 1 SPACE and between a number and mnemonics {STA} 2 SPACES are a must in AssemblyEditor program for ATARI. 10 *= $4000 20 LOOP LDA $D40B 30 STA $D40A 40 STA $D01A 50 JMP LOOP If you add 45 STA $d018 then you'll get the color raster lines for the screen also {not just the border} To start the above code, go to Debugger {BUG command} and type G 4000 To stop the process, hit the F5 key {On Emulator Altirra 4.21} You can try also this here 0100 *= $4000 0105 JSR $F420 ;CLEAR SCREEN 0110 LOOP LDX #$00 0120 GO LDA $D40B;VERTICAL LINE COUNT 0130 CLC 0140 ADC VAL,X ;READ/ADD VALUES 0150 INX 0160 STA $D40A ;WAIT HORIZ. SYNC 0170 STA $D018 ;SCREEN COLOR 0180 STA $D01A ;BACKGROUND COLOR 0190 CPX #$05 0200 BNE GO 0210 JMP LOOP 0220 VAL .BYTE 2,4,6,8,10 To start the above code, go to Debugger {BUG command} and type G 4000 To stop the process, hit the F5 key {On Emulator Altirra 4.21} And the next one is the same as above, just with PRESS ANY KEY to end it. {That, already known routine, is positioned at the end {2nd loop} not to disturb the main, inner loop and colors} 10 *= $4000 13 LDX #$FF 16 STX $2FC 19 JSR $F420 ;CLEAR SCREEN 22 LOOP LDX #$00 25 GO LDA $D40B;VERTICAL LINE COUNT 28 CLC 31 ADC VAL,X ;READ/ADD VALUES 34 INX 37 STA $D40A ;WAIT HORIZ. SYNC 40 STA $D018 ;SCREEN COLOR 43 STA $D01A ;BACKGROUND COLOR 46 CPX #$05 49 BNE GO 52 LDX $2FC 55 CPX #$FF 58 BNE QUIT 61 JMP LOOP 64 QUIT 67 ; 70 RTS ;THIS WILL CAUSE AN ERROR 73 ;AND HIT THE DEBUGGER MODE 76 ;JUST PRESS X TO GO TO EDIT 79 ;CALLED FROM BASIC WOULD 82 ;BRING YOU TO BASIC! 85 ; 88 VAL .BYTE 2,4,6,8,10 EDIT BUG DEBUG G 4000 Hope this will do as explanation. As said, I am new to Atari too and emulating ATARI-800XL {even though ATARI 130XE would be a better choice. It's more C128 alike in terms of specs }. Maybe I'll do that at some later point. First thing you need to work with Atari assembly or with Atari in general, is Mapping The Atari book. In addition also COMPUTE! 's Third Book of Atari and then a good assembly Editor. This one {AssemblyEditor}, used here, is actually very good to start with and do the first steps. Not complicated. fast enough and as you can see it's doing its job well!
@petrok1rp254
@petrok1rp254 4 жыл бұрын
1:40 it does not work on 800XL
@8bitandmore
@8bitandmore 4 жыл бұрын
I will test and see what happens.
@timmyt1232
@timmyt1232 3 жыл бұрын
It works on my 800XL. Try double checking the data numbers.
@eugenetswong
@eugenetswong 5 жыл бұрын
*** ### VIDEO NOTES ### *** 1) This video is a follow up to this video: kzbin.info/www/bejne/bGXGaJl5pMynpJo, and contains the fix to the stack error.
@xyz2112zyx
@xyz2112zyx 3 жыл бұрын
I hated that form of string for coding machine language programs. Atari Basic lacks a BLOAD (binary load) instruction for loading a binary file from disk or cassette to a block of memory. Obviously, you can achieve that with disk commands, but it would be better at that time with a simple command...
@xyz2112zyx
@xyz2112zyx 3 жыл бұрын
Nevertheless, Atari was always an interesting machine for learning to program...
@j4watt6er
@j4watt6er 5 жыл бұрын
I posted your "Listing to create ML string in basic from data" as a gist on github, too. I cited you and this video :): gist.github.com/jjwatt/aec120cde0a5867123dd987ef372c5ca Hey, now I wonder: Was there any kind of macro, templating or pre-processor-like tool/language for Atari 8-bit/BASIC? hehe. I guess it might take away from the fun if I wrote a tool to generate these from a modern computer in emacs or shell, eh ;). I admire your purity here, so maybe there are some Atari 8-bit native tools for things like that, or I suppose one could write a basic program that takes raw ASM/bytes and generates the lines for another BASIC program...
@mmm43kir
@mmm43kir Жыл бұрын
where is 110 line ?
She made herself an ear of corn from his marmalade candies🌽🌽🌽
00:38
Valja & Maxim Family
Рет қаралды 18 МЛН
It works #beatbox #tiktok
00:34
BeatboxJCOP
Рет қаралды 41 МЛН
Chain Game Strong ⛓️
00:21
Anwar Jibawi
Рет қаралды 41 МЛН
When you have a very capricious child 😂😘👍
00:16
Like Asiya
Рет қаралды 18 МЛН
She made herself an ear of corn from his marmalade candies🌽🌽🌽
00:38
Valja & Maxim Family
Рет қаралды 18 МЛН