Retro Old Guy
Retro Old Guy
  • Видео 24
  • Просмотров 57 097
Compiling a SuperExpander program on the C64
In this video I compile a Super Expander program on the C64 using the Abacus BASIC-64 compiler.
00:00 Title
00:08 Introduction
00:31 SuperExpander program
00:57 Uncompiled sorts
03:09 Compiling SuperExpander
04:03 Compiled sorts
05:44 Conclusions
06:04 End Title
Просмотров: 1 185

Видео

C64 - Addendum to Hiding ML in REM statements
Просмотров 1,6 тыс.4 месяца назад
A followup to the previous video about hiding machine language code in BASIC REM statements. I demonstrate how to Indirectly load a zero byte, without crashing BASIC and two things you shouldn't do once the ML is in place. 00:11 Title 00:42 Coin-REM source code 01:33 Coin-REM zero-byte 02:34 Adding BASIC lines 03:39 Editing the REM line 04:37 End Title
C64 - Hiding machine language in a REM statement
Просмотров 16 тыс.4 месяца назад
A clever little method to hide short machine language programs in a REM statement on Commodore computers 00:00 Title 00:10 Introduction 00:26 Border flash 03:08 Plot Cursor 04:40 Obfuscation 06:44 10-Print Demo 07:47 Limitations 09:46 End Credits
Compiling a SIMON's BASIC program on the C64
Просмотров 3,6 тыс.6 месяцев назад
In this video I use the Abacus BASIC-64 compiler to compile a BASIC program created with SIMONS BASIC. Then run a side-by-side comparison of the quick sort algorithm with the C128 and Vision BASIC versions. D64 image with code: sites.google.com/view/retroken/downloads Vision BASIC: visionbasic.net 00:00 Title 00:08 Introduction 00:27 Discussion 01:22 QuickSort Program 02:10 Running the sorts 04...
C64 - 1541 Navigator update
Просмотров 3059 месяцев назад
A quick update about my 1541 Navigator App which lets you browse Commodore D64 and D71 file images and view the file contained within. Download a trial version (MacOS or Windows): sites.google.com/view/retroken/downloads 00:00 Title 00:14 Introduction 00:20 Description 00:31 Loading a D64 or D71 image 00:42 Sorting the file list 00:58 The viewer panes 01:19 Text-only (documents) 01:40 Light/Dar...
C64 In-line assembly with Vision BASIC
Просмотров 2,2 тыс.10 месяцев назад
Using Vision BASIC to speed up a standard BASIC program, to include in-line assembly code. Download a D64 image with the program code sites.google.com/view/retroken/downloads Random numbers using SID www.atarimagazines.com/compute/issue72/random_numbers.php SID3 cycles (@8_Bit Show And Tell) ruclips.net/video/-ADjfx79wNg/видео.html Vision Basic visionbasic.net 00:00 Title 00:09 Introduction 00:...
C64 machine language & Vision BASIC quicksort demo (final chapter)
Просмотров 3,9 тыс.Год назад
I demonstrate five different sorting routines written in hand optimized machine language and also show a graphical line sort compiled with Vision BASIC. Link to Vision BASIC web site: visionbasic.net 00:00 Title 00:09 Introduction 00:49 SORTDEMO.ML 02:02 ML sorting demos 03:45 Vision BASIC 04:14 Vision BASIC quick sort program 06:12 Line sort demo 07:07 End credits
C128 BASIC Compiler Speed Test using Quicksort
Просмотров 3,5 тыс.Год назад
Using the Abacus BASIC 128 Basic Compiler in a speed test using a graphical quicksort demo 00:00 Title 00:12 Introduction 00:55 PETSCII Sort 02:36 QSORT Program 04:04 Speed Tests 06:00 Results 06:09 Final Comments
C64 BASIC Compilers Speed Test using the Quicksort algorithm
Просмотров 7 тыс.Год назад
I use the Abacus Basic64 and Compute!s Gazette Sprint compilers in a speed test using a visual quicksort demo Links D64 Image file: drive.google.com/file/d/1QEMdMSRZVUk29lCOvM_RUGdax1CVOeIt/view?usp=share_link Sprint Compiler 1986 Gazette: archive.org/details/1986-01-computegazette/page/n73/mode/2up 1988 Gazette: archive.org/details/1988-01-computegazette/page/n73/mode/2up Lightning Sort 1984 C...
Using Wildcards on the C64 and 1541 floppy drive
Просмотров 378Год назад
Using wildcard characters on Commodore computers on 1541 or compatible floppy disk drives. 00:00 Title 00:42 Wildcards 01:53 BASIC LOAD 03:19 DOS Wedge 05:20 FastLoad 06:04 Super Snapshot 06:34 MACH5 07:34 Others 07:42 C128 08:19 Conclusion
Merging BASIC and machine language (ML) programs on a Commodore 64 (C64)
Просмотров 8 тыс.Год назад
Merging BASIC and machine language programs into a self-contained file that's easy to load and run. No LOAD command or DATA statements required. 00:00 Title 00:08 Introduction 00:20 Load Methods 00:57 Overview 02:07 FlipRoll Demo 02:31 Editing BASIC program 05:24 Edit ML program 06:13 Merging the programs 09:00 Test the program 09:38 Pros and Cons 10:51 Exit
Moving the cursor on Commodore computers using BASIC and ML
Просмотров 1,4 тыс.Год назад
Creating a machine language routine to move the cursor to a designated location that can be used in any BASIC program. The memory and kernel routine descriptions are from the book, "Mapping the Commodore 64" by Sheldon Leemon. 00:00 Title 00:41 BASIC PRINT 01:15 PLOT/LOCATE 02:10 TMP PLOT v1 03:16 TMP PLOT v2 05:12 BASIC Test 05:59 TMP Object File 06:28 Load into BASIC 07:33 BASIC Loader 07:50 ...
Using Commodore BASIC and ML to create a REM enhancer utility for C64, C128 and VIC20 computers
Просмотров 2,1 тыс.Год назад
I create both a BASIC and ML program to enhance REM statements in BASIC listings. Files used in this video can be downloaded at: sites.google.com/view/retroken/downloads?authuser=0 00:00 Title 00:56 Program line format 02:57 BASIC version 06:09 BASIC demo 07:48 ML version 13:59 ML test 14:51 ML full test 15:42 VIC20 & 128 15:55 Bugs 16:54 End
Commodore 1541 Navigator upgrade
Просмотров 3593 года назад
New functionality of the 1541 Navigator. Available on App store at: apps.apple.com/us/app/1541-navigator/id1557037917?mt=12 Check out previous videos ruclips.net/video/dXxFKk7mEeI/видео.html ruclips.net/video/x0JHFDQvMnE/видео.html 00:00 Title 00:20 Introduction 00:35 Recap 01:06 Sorting 02:23 BASIC Expanders 04:34 Auto View 05:49 View modes 06:41 GEOS 07:27 Exit
TRACON 1.20 Air Traffic Control Simulation
Просмотров 6103 года назад
TRACON 1.20 Air Traffic Control Simulation for Windows 3.1
C64 Kennedy Approach - Denver (level 4)
Просмотров 3943 года назад
C64 Kennedy Approach - Denver (level 4)
C64 Kennedy Approach
Просмотров 1,6 тыс.3 года назад
C64 Kennedy Approach
Commodore 1541 Navigator (Part 2)
Просмотров 1574 года назад
Commodore 1541 Navigator (Part 2)
Commodore 1541 Floppy Disk Browser (remake)
Просмотров 4614 года назад
Commodore 1541 Floppy Disk Browser (remake)
The C64 Mini
Просмотров 3455 лет назад
The C64 Mini
Wii Bowling 100 pin
Просмотров 5096 лет назад
Wii Bowling 100 pin
C64 Speed Test (Part 2)
Просмотров 4076 лет назад
C64 Speed Test (Part 2)
C64 Scorpion Solitaire
Просмотров 2276 лет назад
C64 Scorpion Solitaire
C64 Speed Test
Просмотров 3996 лет назад
C64 Speed Test

Комментарии

  • @MMSZoli
    @MMSZoli Месяц назад

    Nice comprison! I am interested, if you could share th code here (as a text)? I would like to make a try with Commodore Plus/4. It has some compilers, but none of them make the gfx command faster, but otherwise the (on average) 1.23MHz CPU is quite capable. It would be interesting ,if the natibve and the Austrospeed complied version how perform compare to these. Many thanks in advance!

    • @retrooldguy9880
      @retrooldguy9880 Месяц назад

      Here you go. This is the SuperExpander version. You'll have to change the graphic commands appropriately. Hope you make a video, would like to see how the Austrospeed compiler works. 10 graphic 2:scnclr:x=rnd(-ti) 20 dim a(160),s(30):n=159 30 for i=0 to n:read a(i) 40 draw ,i*2,n to i*2,n-a(i):next 50 char 1,0,21,"space to start" 60 get a$:if a$<>" " then 60 70 char 1,0,21,"sorting...{6 space}" 80 : 90 ti$="000000" 100 s(1)=0:s(2)=n:p=2 110 l=s(p):p=p-1:f=s(p):p=p-1:i=f 120 j=l:d=a((f+l)/2) 130 if a(i)<d then i=i+1:goto 130 140 if a(j)>d then j=j-1:goto 140 150 if i>j then 210 160 draw 0,i*2,n to i*2,n-a(i) 170 t=a(i):a(i)=a(j):a(j)=t 180 draw ,i*2,n to i*2,n-a(i) 190 draw ,j*2,n to j*2,n-a(j) 200 i=i+1:j=j-1 210 if i<=j then 130 220 if f<j then p=p+1:s(p)=f:p=p+1:s(p)=j 230 f=i:if f<l then 120 240 if p<>0 then 110 250 t=ti:t$="jiffies:"+str$(t)+"{2 space}seconds:"+str$(t/60) 260 char 1,0,21,t$ 270 get a$:if a$<>" " then 270 280 scnclr::graphic 4 290 end 295 : 300 data 51,107,26,3,61,135,99 310 data 36,116,68,82,32,0,65 320 data 72,97,19,148,83,126,89 330 data 141,22,31,120,154,63,40 340 data 114,143,42,157,130,27,112 350 data 129,2,44,149,74,85,123 360 data 70,33,79,12,71,73,75 370 data 5,119,95,55,98,80,156 380 data 23,49,136,84,8,150,100 390 data 113,93,111,105,66,41,110 400 data 94,21,125,24,109,37,58 410 data 128,7,30,4,16,118,153 420 data 159,151,46,64,115,103,145 430 data 29,39,140,56,91,9,45 440 data 60,11,102,138,88,134,52 450 data 25,38,76,106,158,121,5 460 data 62,155,20,139,18,132,92 470 data 90,69,35,81,6,117,87 480 data 142,131,10,53,78,13,127 490 data 34,108,1,77,144,43,14 500 data 15,137,86,146,48,124,28 510 data 122,47,57,17,147,101,67 520 data 104,96,59,133,54,152

  • @saganandroid4175
    @saganandroid4175 Месяц назад

    Do you have any videos or source code regarding your interrupt timing routines?

    • @retrooldguy9880
      @retrooldguy9880 Месяц назад

      It's actually a routine I read about back in '84 from Compute!s Gazette. I tweak it as necessary when I want a real-time clock. Here's the link: archive.org/details/1984-12-computegazette/page/158/mode/2up

  • @Huppat
    @Huppat 2 месяца назад

    nice little trick

  • @TheUtuber999
    @TheUtuber999 2 месяца назад

    Not sure if you saw this already, but there is a program called REM Highlighter in the January 1986 edition of Compute's Gazette Magazine (Issue 31; page 108).

  • @vcv6560
    @vcv6560 3 месяца назад

    I had a Super Expander cartridge my impression at that time was that the Abacus compiler just did the redirect into the ROM for those additional Basic commands but didn't optimize beyond that.

  • @Ansatz66
    @Ansatz66 3 месяца назад

    It would be interesting to know why exactly hitting return corrupts the code, and why this particular corruption.

  • @justinparrtech
    @justinparrtech 3 месяца назад

    My 1st computer was a Timex Sinclair.... my 2nd was a Commodore 64. Please keep up the awesomeness.

  • @jack002tuber
    @jack002tuber 3 месяца назад

    Nice test. I see you didn't try fast mode on the 128, it will not support graphics in fast mode, but runs at about 2mhz.

    • @retrooldguy9880
      @retrooldguy9880 3 месяца назад

      Yeah. I thought it would be better to actually see it happening.

  • @csbruce
    @csbruce 3 месяца назад

    Do 100 pins create so much chaos that it's basically impossible to get fewer than 95 of them?

    • @retrooldguy9880
      @retrooldguy9880 3 месяца назад

      I really am that good 😀. I don't know, you still need to get the ball in the sweet spot otherwise you get the same kind of reaction as with 10 pins.

  • @csbruce
    @csbruce 3 месяца назад

    All of the line-drawing routines are so slow that you can actually see each line being drawn in real time. All the different graphical systems must be using BASIC-ROM floating-point calculations instead of integer methods. The C128 version would run more than twice as fast in FAST mode, though you wouldn't be able to see the progress until it's done.

  • @networkg
    @networkg 3 месяца назад

    How fast would the Qsort run for the modern Vision Basic compiler?

    • @retrooldguy9880
      @retrooldguy9880 3 месяца назад

      A little over 6 seconds. I showed it in a previous video but didn't do a deep dive into it ruclips.net/video/WJiK-EI7ed0/видео.htmlsi=jdwmc7wNKoP7i6Gm&t=369

    • @networkg
      @networkg 3 месяца назад

      @@retrooldguy9880 My bad, I had seen that video too. I am trying to learn Vision Basic so I am always looking for more content. (I hope the new version 1.1 is not so different that I have to unlearn stuff!) Thanks again for these head to head videos.

  • @gklinger
    @gklinger 3 месяца назад

    That was the most interesting 6 minute video I have ever seen. Well done!

  • @johnsmith1953x
    @johnsmith1953x 3 месяца назад

    My guess is that you're really benchmarking how fast each system draws a line. I'll bet most the time is spent in the line-drawing function.

    • @alexandermirdzveli3200
      @alexandermirdzveli3200 3 месяца назад

      Aha! That's why the difference between interpreted and compiled versions was so small.

    • @johnsmith1953x
      @johnsmith1953x 3 месяца назад

      @@alexandermirdzveli3200 It would be interesting to see a benchmark of the various graphic functions (line, circle, box, fills, etc) between the BASICs.

  • @johnsmith1953x
    @johnsmith1953x 3 месяца назад

    Cool. Did not know you can do that! I'm assuming the compiled program still needs the SuperExpander cartidge?

    • @gklinger
      @gklinger 3 месяца назад

      ruclips.net/video/JEc6udy8KnA/видео.htmlsi=ylfNGsM6h8h9a4yc&t=243

    • @retrooldguy9880
      @retrooldguy9880 3 месяца назад

      Sadly yes, All of the BASIC expansion utilities require that the cartridge/utility be present when running, even when compiled. The only one that doesn't is Vision Basic, but that's a modern compiler (2017).

    • @johnsmith1953x
      @johnsmith1953x 3 месяца назад

      @@retrooldguy9880 Didn't EPYX have some sort of BASIC environment with extended BASIC and a very nice sprite and character editors? I think you could have compile the code and it would be a stand alone program!

    • @retrooldguy9880
      @retrooldguy9880 3 месяца назад

      Yes they did. I never used it myself, but have seen it in other videos. You still need to have the expansion cartridge/software loaded for programs created with it to run.

    • @johnsmith1953x
      @johnsmith1953x 3 месяца назад

      @@retrooldguy9880 No, no. I had that system a long time ago. It was on floppy disk. No cartridge. You can distribute the final code and even sell it. Ugh, your going to force me to find this in my basement!! :D

  • @lezbriddon
    @lezbriddon 3 месяца назад

    not trying to be pedantic but isnt it 'machine code' when its down at an executable byte/word instruction level, and anything that needs compilation or interpretation is 'language'? edit: I googled, I'm not keeping up with the times....... Machine code, also known as machine language, is the elemental language of computers.

  • @Richardddoobies
    @Richardddoobies 3 месяца назад

    Commodore manual: "Screen memory is not an appropriate place to store machine language programs." Me: "Hold my beer." SYS 1024

  • @UltimatePerfection
    @UltimatePerfection 4 месяца назад

    Can you do a review of Vision BASIC for C64? Most of the videos about it seems to come from the developer's account which hardly is unbiased. I am considering getting it, just need to see some benchmarks to see if it's really much faster than regular BASIC to make c64 games with.

    • @networkg
      @networkg 4 месяца назад

      @UltimatePerfection I bought a copy of Vision Basic and can tell you that if you enjoy programing for a C64, you will love it. It is very fast. Like 7 to 10 times faster. Even more so if you use machine language mixed in with the basic. The guy who wrote it is getting ready to release a version 1.1 which should offer a few improvements. Although it will be a free upgrade, you might want to wait so you can get the updated manual which I hear will have a much requested feature, an index ! You do need an REU or GeoRam (version 1.1 will support this I think) but for me, I just do all my programming in VICE and then run the compiled code on a standard C64.

  • @jack002tuber
    @jack002tuber 4 месяца назад

    That LDA from the line number was pretty cool. Neat stuff

  • @csbruce
    @csbruce 4 месяца назад

    0:52 You could also LDX #1 : DEX to get a $00. 2:00 Hidden dependencies can be dangerous. Technically, it's not the '0' digit in the "10" but the line number being ≤ 255, and the $00 is in the most-significant byte. 2:11 $800 seems more reliable, since BASIC programs won't actually RUN if location $800 isn't a $00. Though, I guess the low byte of the address is a problem.

    • @retrooldguy9880
      @retrooldguy9880 4 месяца назад

      Yeah you're right, I did make it sound like the line# itself should end in a zero and not the high-byte of the address holding the line number. The video does show the correct byte in the memory dump. So hopefully everyone will know what I meant 🤔

  • @TheUtuber999
    @TheUtuber999 4 месяца назад

    Thanks for the tip on retrieving a zero byte indirectly. 2:08 "As long as the BASIC line number ends in a zero..." I think as long as the line number is less than 256 it should work because address $804 is the high byte of the line number.

  • @CityXen
    @CityXen 4 месяца назад

    Very cool vid, thx for sharing. Cool idea to cover this topic, however unpractical it is. It is still a cool reminder of the practically infinite possibilities capable of the c64.

  • @EelkodeVos
    @EelkodeVos 4 месяца назад

    I've seen program lists back in the 80's like this and always was triggered by the actual very short time where you can see the line is printed, then deleted and other characters are written over the same line. Sneaky, but still visible by the human eye. And of course when you notice it, you get kids like me studying it through my machine language monitor. #PowerCartridgeAllTheWay

  • @NoahSpurrier
    @NoahSpurrier 4 месяца назад

    Brings back old memories.

  • @PlayBASIC-Developer
    @PlayBASIC-Developer 4 месяца назад

    This bring back so many memories !

  • @microdesigns2000
    @microdesigns2000 4 месяца назад

    This feels like the kind of ingredients that viruses are made from.

  • @edgeeffect
    @edgeeffect 4 месяца назад

    This was the defacto way of doing machine code on the ZX81 and Spectrum but i think the clever trick for hiding the gibberish would only work on a Commodore... nice!

  • @bpark10001
    @bpark10001 4 месяца назад

    Isn't there a way to link machine language program with some sort of subroutine call? In the AIM-65, you set up a USR (user function) call to the program.

  • @ChannelReuploads9451
    @ChannelReuploads9451 4 месяца назад

    I know this is C64, but I always wondered how they got Machine code in to Rem Statements in ZX Spectrum Basic, and this pretty much explains it for me, First line, Rem "<random ascii to the length of the Machine Code" Then use some sort of Memory Editor to edit out the Ascii as machine code, then once edited, the Rem Statement contained the Ascii representation of the code. Then in ZX Basic (I do not know about 64 Basic), use a specific Poke in to the OS, that turned the Line 10, in to Line Zero, aka : 0 Rem "<Machine Code>", Poke 23756,0 to turn the first basic line to "0", then also they would use 16514,118 and POKE 16515,118 and the listing would not be visible on screen. ZX Basic would be Blank.

  • @z352kdaf8324
    @z352kdaf8324 4 месяца назад

    @5:10 you didn't need to re-do all that, but I suspect you know that. Just enter the del key string.. Well I never had to hide anything in REM statements, I always had a Super Snapshot V3 to do my assembly in.

  • @alunroberts1439
    @alunroberts1439 4 месяца назад

    Wish I did keep the 64 I did have interesting stuff

  • @AllanFolm
    @AllanFolm 4 месяца назад

    Have you considered placing a shift-L right after the line number 10 REM?

    • @retrooldguy9880
      @retrooldguy9880 4 месяца назад

      Not when making the video. A few other mentioned that, so I tried, It will keep the garbage from appearing because it stops the listing. The program will work fine. To see the rest of the program all you have to do is LIST 11-

  • @philpeko1796
    @philpeko1796 4 месяца назад

    I'm an old guy too, I don't know much of your previous work here, but I have been writing some old Basic too, (and ASM since) your video is ... wicked, you made me laugh for the hiding idea. Peace & Prosper. ❤🖖

  • @JanBruunAndersen
    @JanBruunAndersen 4 месяца назад

    I don't see the point of doing this. Okay, if it is important to hide the machine code from prying eyes, then maybe, but considering that it is limited to 80 bytes per REM statement, and that anyone sufficient interested would know how to enter the debugger and just look, then how much value and secret can those 80 bytes be? On top of that, with all those DELETE characters added in, you are using 160 bytes of memory to hide 80 bytes. As an intellectual exercise, sure. It's neat, and putting the instructions for calling the code into the REM statement, that is nifty too. But at the end of the day, I would just put the hex-codes into DATA statements and have a little FOR/READ loop POKE the bytes into place. It is easy to edit, no limitations on the size of the code, no problems with adding lines to the BASIC program itself, etc.

    • @retrooldguy9880
      @retrooldguy9880 4 месяца назад

      It's just a neat little hack. I wouldn't recommend trying to do an entirely ML program like this. But, you got to admit, the PLOT routine fit in perfectly.

    • @z352kdaf8324
      @z352kdaf8324 4 месяца назад

      It does teach how they can occupy same space in memory ..

  • @melkiorwiseman5234
    @melkiorwiseman5234 4 месяца назад

    I read about another method which was almost the same, except that it was done using a string literal. The advantage of using a string literal is that you can use the VARPTR function to find where the string is stored without having to manually search for it. Once you have POKEd the entire machine language routine into the string, you can then delete the code which loads the machine language routine into the string and save the program without those lines. But of course the same problem of having the machine code display as control characters applies, unless you save the program before the machine code has been POKEd into place and leave those instructions intact. While it's possible to force the string to be copied out of the literal and into string space, that rather goes against much of the reason for putting the machine code into a string literal in the first place. However what it still does is to remove the requirement to create "reserved" memory before entering or loading the program.

  • @markae0
    @markae0 4 месяца назад

    Thanks for the teaching video.

  • @schitlipz
    @schitlipz 4 месяца назад

    You can also do special PETSCII in REM statements so when listing you can spice up the look. Or just a shift+L after a REM will stop the listing. I'm sure somebody already mentioned it.

  • @theantipope4354
    @theantipope4354 4 месяца назад

    Evil, but brilliant!

  • @SEngelsg
    @SEngelsg 4 месяца назад

    At 5:54 - 5:55 which apparently is the new number of the beast the ultimate BLASPHEMY has been completed. The C=64 does has a RETURN key damnit!!! REPENT AND THOU SHALL BE SAVED!!!

  • @StefanTravis
    @StefanTravis 4 месяца назад

    I used to do this on the ZX Spectrum. It was amazingly easy to get just one figure wrong, and crash the computer... or occasionally give a weird cool effect.

  • @jeffreypage1361
    @jeffreypage1361 4 месяца назад

    I recently did something similar! I built a homebrew computer based on the MC68701. I managed to get TinyBASIC for the MC6800 running on it. One program: tic-tac-toe, uses a scratchpad of nine bytes right where my registers are located (or, maybe it was my stack. The takeaway: it was in my way.) Since TinyBASIC has a register that indicates the start of the BASIC program, I used that with an offset to place the scratchpad in a REM statement at the beginning of the program.

  • @innova500
    @innova500 4 месяца назад

    Very cool stuff my friend. i built my first cnc machine with the vic20. it didnt work very well and i ended up moving to the ibm clone. This trick would have solved problems i couldnt figure out at the time... subbed,,,

  • @roberthuff3122
    @roberthuff3122 4 месяца назад

    Stuxnet!

  • @JxH
    @JxH 4 месяца назад

    Many decades ago (back in the day, early 1980s), I was able to hide BASIC in BASIC. I did this on the TRS-80 Color Computer, but the same approach would likely work on any early computer with MS-BASIC. The approach is to pack the program with an obscure character, such as "\". Then run a routine (e.g. up in line 1000) to find (PEEK) and replace (POKE) the character with backspace (08). Then delete the extra routine. The hidden backspaces overwrite what is displayed with LIST, leaving only what you wish to appear in the REM part of the line. End result is (for example): LIST 10 PRINT "NO NO NO" RUN YES YES YES Explanation = 10 PRINT "YES YES YES"; REM \\\\\\\\\\\\\\\\\\\"NO NO NO" One can make LIST appear to RUN and RUN appear to LIST. Anything is possible...

  • @Robert08010
    @Robert08010 4 месяца назад

    "Super Mon... who can change the code of Basic programs... bend pins with his bare hands, and who disguised as a simple assembler for a great american computer company... Compiles the never ending stream of apps, drivers via the programmers way!

    • @retrooldguy9880
      @retrooldguy9880 4 месяца назад

      It was Jim Butterfield of course. But reading your comment, made me think of Mary Tyler Moore for some reason. Maybe it was the cadence.

    • @digitalnomad9985
      @digitalnomad9985 4 месяца назад

      @@retrooldguy9880 You're probably too young to remember the old black and white Superman TV show.

    • @retrooldguy9880
      @retrooldguy9880 4 месяца назад

      @@digitalnomad9985 that was ten years before my time. I did watch it in syndication as a kid in the early 70s though

  • @Adrian.Rengle
    @Adrian.Rengle 4 месяца назад

    Oldies but Goldies !

  •  4 месяца назад

    Would it be possible to hide the binary code *in between* the basic lines? I mean, create a block of normal basic lines (with REM probably) followed by some normal basic program and then cut the first REM line short with zero and pointer to the first actual program line, which would give us space hidden in between the basic lines, which we could fill with anything. Is that possible or is there something, that would prevent it from working? Like some automatic cleanup of space in between the lines or something.

    • @retrooldguy9880
      @retrooldguy9880 4 месяца назад

      Hmm. I just tried that and it did work, but you have the same problem as before. You have to create the space with something (REM "XXXXX", works best). As soon as you start entering code you will have the same problem with garbage/control characters messing up the LIST and possibly keep the program from running, and you still can't use a zero byte as the interpreter will see that as EOL as explained in the video. This was meant to be a neat little hack for short routines. If you want to have a lengthy chunk of code as part of your BASIC program, it would be better to put it at the end of BASIC where there are no restriction, as I demonstrated in a previous video: ruclips.net/video/3arpo-9FbCk/видео.html

    • @melkiorwiseman5234
      @melkiorwiseman5234 4 месяца назад

      @@retrooldguy9880 Put the zero byte at the start of the REM string, followed by the address of the start of the next line. Start the machine code routine after that. That might trick the LIST command into not even looking for a zero byte between the pointer to the next line and the end of the current line. In other words, if your machine code routine is 10 bytes, then put 13 characters after the REM. When you're entering the machine code routine, first enter a zero byte then the address of the start of the next line followed by the machine code routine. Is that what you did? Because it sounds like an interesting thing to try. See whether or not it saves and loads correctly, too. Off-hand, my guess is that saving the program as an ASCII file would not work correctly, while saving it as tokenised code would work.

    •  4 месяца назад

      @@retrooldguy9880 Thank you.

  • @lestersegelhorst2776
    @lestersegelhorst2776 4 месяца назад

    As a kid, I remember seeing this on some games I tried to decode. (Before I knew what machine language was) I thought it was purely a copy protection scheme.

  • @3DPDK
    @3DPDK 4 месяца назад

    🔹One other limitation: You can not add or delete any basic line *before* the REM statement. When the BASIC editor moves the REM to make room for the new line, it replaces any reverse character (any number in the ML above 128) with it's non-reversed version (basically subtracting 128 from the number). You actually can add or delete a line before the REM statement, but you must re-enter the ML in the monitor and understand that the start address of the ML and any specific target address within the code will change. 🔹If you absolutely need to LDX #$00 (or similar) use LDX #$01; DEX or use LDX #$FF; INX. Either of these adds an extra byte to the ML code. Also keep in mind the first sets the Zero flag and the second sets the Carry flag which may or may not be important to the rest of the code. 🔹You can not STA $0400 (top left screen character) or any other memory page boundary address because of the low byte "00". You can get around it by using Indirect Indexed Y addressing and figure out a way to get a "0" in the low byte of the pointer address. LDX #$01 DEX STX $0334 (820) LDX #$04 STX $0335 (821) ... ... STA ($0334),y (the pointer address held at 820/821 is 1024 ($0400) or the top left character position of the screen)

    • @retrooldguy9880
      @retrooldguy9880 4 месяца назад

      Good point about adding lines above the REM. I forgot to mention that. If you do accidentally do that, deleting that line will fix it without having to re-enter the ML. Also if you try to add to or edit the REM or even put the cursor on the REM with the ML already placed and hit ENTER, it will likely mess up the ML and you'd have to re-enter the ML code. I'm going to PIN this at the top. Thanks for pointing that out.

    • @digitalnomad9985
      @digitalnomad9985 4 месяца назад

      @@retrooldguy9880 I did something similar commercially for a customer's custom program in the 80s on a Color Computer. To save memory, I embedded a bunch of binary data and a short (hand compiled) machine language program in data string literals where the memory pointer of the string variable in the "READ" statement gets pointed to the actual literal in memory in the quotes. In addition to the "end of statement" binary marker (I think CoCo BASIC also used binary zero) I had to avoid using the "quote" character or I'd destroy the syntax of the DATA statement. I PEEKed around the listing to find the DATA statement, then POKED the values into the listing by hand, as well as hand assembling the program, because I didn't have a memory monitor or an assembler. I didn't have to guess where the actual data was in memory at runtime, because the interpreter took care of that. I could edit the rest of the BASIC program with impunity because the whole thing was functionally relocatable.

    • @csbruce
      @csbruce 3 месяца назад

      There's no absolute-indirect-indexed addressing mode. The pointer address needs to be in zero-page.

    • @3DPDK
      @3DPDK 3 месяца назад

      @@csbruce You are correct. Indirect Indexed Y or indexed X addressing must use a zero page pointer. The code snippet should be: LDX #$01 DEX STX $FB (251) LDX #$04 STX $FC (252) ... ... STA ($FB),y

  • @simona625
    @simona625 4 месяца назад

    Could you not use multiple rem statements ?

    • @retrooldguy9880
      @retrooldguy9880 4 месяца назад

      Theoretically yes. But I didn't try, it would be pretty impractical as you'd have to jump over the bytes containing the EOL, line address, next line number, and REM token to move from line to line. I'll leave that as an exercise for the user 😀

    • @mikechappell4156
      @mikechappell4156 4 месяца назад

      @@retrooldguy9880 It really shouldn't be that impractical. I don't recall if there is a jump n bytes instruction directly, but I recall you can jump n bytes on test. Set carry flag , jump carry set n bytes, so it's at most 3 bytes. IIRC, n bytes will be a standard size, 1 byte for quote, one for 0 indicating EOLN, 2 bytes for pointer to next line, 2 bytes for the line number, 1 byte for REM, space and quote. You wouldn't need to reevaluate the jump instruction at the end of each line, just end the lines with the same 3 characters before the ending quote. You would need to adjust if your were using the trick to hide the mess, but that would be standard size as well if you kept your blocks of code the same size and I guess NOP could be used for that to pad to length since instructions can be 1 to 3 bytes long. (Again, only a problem if you are trying to hide variable length code blocks, if not, it would be easy.

  • @FlemmingSteffensen
    @FlemmingSteffensen 4 месяца назад

    Fascinating. I never thought about it. Great example. With hiding the ugly REM statement at 7:06, can't you insert a $0, and the address to the next line as part of the REM statement, and move the sys address a few bytes ahead in memory. It might also save you from all the delete characters in your PLOT AT example. My guess is the EOL is only actually used for listing/running, but not for saving.