Тёмный

ZX81 BASIC vs assembler 

ByteForever
Подписаться 598
Просмотров 6 тыс.
50% 1

Опубликовано:

 

27 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 22   
@becconvideo
@becconvideo 2 года назад
The ZX81 was my first computer in 1985 (not counting scienticic calculators but the weren't fun hacking with). As the BASIC is slow I soon got into "machine language" which meant a series of poke statements and a print usr ... somewhere. The slightest error caused the screen to flicker and the data was lost - so save it to Compact Cassette first :-) The main advantage of the ZX81 back then was its Z80 CPU which was made as U880 in East Germany (of which I was an "inmate"). Almost all computers within my reach at the university run on that chip - so learning how to program it was considered "valuable skills for the future" - impressive how fast it got obsolete. But a nice chance to learn how computers work under the hood. I wrote a calculator for integers - multiplication and division which the Z80 cannot perform by itself, number conversion etc. As we did not have much access to books - the ROM was always a black box I tried to reverse engineer... Nice memories. I still have my ZX81 and some cassettes with my stuff. I'll have to power it on somedays and look what I programmed back then... I'
@redcoat4ever323
@redcoat4ever323 Год назад
Hut ab! ZX81 war auch meine erste Kiste. Hab nur in Basic programmiert.
@Inaflap
@Inaflap 2 года назад
Just add a couple of lines to your BASIC, to make it 4x as fast. 5 FAST 10 LET A=3 20 FOR B=1 TO 18 30 PRINT A*B 40 NEXT B 50 SLOW In SLOW mode the Z80 has the job of updating the screen. You effectively have a 0.8MHz rather than a 3.25MHz Z80. When you issue a FAST, the display is no longer updated whilst the Z80 is busy. When SLOW executes, the updated screen with all the PRINTed numbers will be shown.
@Theineluctable_SOME_CANT
@Theineluctable_SOME_CANT 2 года назад
Yes. Now come inside and eat your breakfast...
@AMikeOnLine
@AMikeOnLine Год назад
The Sinclair ZX81 was my First Computer. I loved it. Programming an playing very Basic games like 'Pong'. I got a book called 'What can you do with a 1K ZX81'?... I soon found out 'Not a lot.'.. I got frustrated and purchased a 16K Ram pack. Reading from magazines i programmed all sorts of things like adventure games and racing games. The keyboard was horrible to use and ONE touch near the ram pack and the whole set up would crash.! Then came the Spectrum with a whopping 16/48K of ram...WOW my whole world had opened up...I bought My first Spectrum 48K in 1983 and it was second hand but still cost me £75.00. About £400 in todays money.! I'll never forget playing Manic Miner.. Awesome game and kept me entertained for hours at a time. Move on to 1987 (ish).. Came the Commodore Amiga..! 512K of pure power...AND a fricking keyboard and a disk drive !! I bought one brand new and it was £499.00 ( About £1500 in todays money.) It was absolutely amazing.. 512K memory !.. The games were great and in full colour. Every week i would buy magazines all about it. The Demos you could get were amazing..( Doc Demo etc.) A vintage time in computing from one fellow computer to another. Great times.
@byteforever7829
@byteforever7829 2 года назад
Does anyone know why I'm seeing adverts on this video when a) it's not monetized b) it's my video?! Is everyone else seeing ads?
@vomeronasal
@vomeronasal 2 года назад
Yep.
@Retriku
@Retriku 2 года назад
Late reply, but it's RU-vid and their stupid policy. They monetize off your videos until you meet the requirements for ad revenue, and to become part of their Partner Program. You pretty much get ads running on your videos, even if you have less than 1,000 subscribers will they still run ads.
@thfrussia6717
@thfrussia6717 5 месяцев назад
@@Retriku russian utube doesnt show ads its cool
@Theineluctable_SOME_CANT
@Theineluctable_SOME_CANT 2 года назад
That whole thing (BASIC INT and the m/c language version, ARE SLOWED DOWN MASSIVELY INDEED by the PRINT routine. Machine language is about 100 times as fast as BASIC INTERPRETER code running the BASIC program.
@TechWorldServices
@TechWorldServices Год назад
Totally agree. The Assembly version should have wrote directly to the display, rather than calling the RST rom routine which is way slower.
@antonnym214
@antonnym214 2 года назад
Nice premise. I like your presentation. I used to code in Z-80 and 8080 Assembly back in 1980-ish. I think if you want to be absolutely fair, you'll display your results in decimal on the assembly version. It may be that there is a ROM routine on the ZX81 which contains a Hex-Dec converter. It might be interesting to add a call to that and then compare speeds. I think Assembly will still win, but it will be closer.
@byteforever7829
@byteforever7829 2 года назад
Yes I agree, will try to change the assembly version to output as decimal. The daa instruction would be a quick win to use binary coded decimal and world be interesting to see the difference. I'll have a look for some other ways like you suggested. Thanks for your comment
@Inaflap
@Inaflap 2 года назад
The Z80 @ 3.25MHz may be quicker than the 6510@1MHz, but that BASIC program still runs in under a second on the C64. I think it looks faster than your m/c! Try this in VICE... N.B. There was no CLS command in C64 BASIC, but line 10 does the same. ? is shorthand for PRINT on the Commodore. A peculiarity of Sinclair BASIC was it did an implicit CLS when you entered RUN. 10 ? CHR$(147) 20 A=3 30 FOR B=1 TO 18 40 ? A*B 50 NEXT
@andrewnorris5415
@andrewnorris5415 2 года назад
The 81 had the processor do the graphics. It looked up the character from the ROM in real time per scan line. It had little power left over. Its "FAST MODE" turned the screen off and it processed fast then! Some chess games gave that as an option. Some people also found a loophole to hack into the display code and run their own for pseudo high res graphics from the ROM. And from the RAM on the 1K version and special 16K ram packs.
@Theineluctable_SOME_CANT
@Theineluctable_SOME_CANT 2 года назад
For some of us, 1 MHz is actually very well known and well "worked". To most, it is a funny number...
@andrewnorris5415
@andrewnorris5415 2 года назад
It's funny how computers then booted up instantly. Today even fairly recent phones and Desktops lag when click on something and make people feel they need a faster PC!
@Theineluctable_SOME_CANT
@Theineluctable_SOME_CANT 2 года назад
@@andrewnorris5415 the difference is an operating system versus direct execution of smaller program in ROM. 16 kB program versus a one GB program set....
@StarsManny
@StarsManny 2 года назад
Lol how can a computer be THAT SLOW?
@Theineluctable_SOME_CANT
@Theineluctable_SOME_CANT 2 года назад
Lol.... "PRINT"....
@martindejong3974
@martindejong3974 2 года назад
because in SLOW mode (the default mode) the Z80 is busy creating the video signal 80% of the time, only 20% of the time it is actually running BASIC.
@TechWorldServices
@TechWorldServices Год назад
It spends most of its CPU time generating the TV picture itself... That said it can still be very very fast indeed with the proper programming...way faster than is shown here . The BASCI is very slow due to s supporting a collapsed display file and other reasons, doesn't mean the machine itself is that slow it just appears to be the case...
Далее
ZX81 wordprocessing again
24:33
Просмотров 7 тыс.
无意间发现了老公的小金库 #一键入戏
00:20
I Made The Ultimate Cheating Device
9:39
Просмотров 1,3 млн
Games That Push the Limits of the ZX81
17:58
Просмотров 120 тыс.
ZX81 still awesome after 40 years!
19:10
Просмотров 12 тыс.
What was Coding like 40 years ago?
29:05
Просмотров 1,7 млн
5 Games on the Sinclair ZX81 that I Loved
22:35
Sinclair ZX81 composite video modification
22:47
Просмотров 8 тыс.
ZX Spectrum 128K "Toastrack" Inside and Out
19:31
Просмотров 14 тыс.