Jump to content

Photo

Apple IIGS newb question - BASIC


6 replies to this topic

#1 rpiguy9907 OFFLINE  

rpiguy9907

    Moonsweeper

  • 250 posts
  • Location:New Jersey, USA

Posted Fri Feb 8, 2019 7:53 PM

I am not actually a newb to the IIGS, Ive owned and used one for years BUT Ive never tried programming on it and I finally have some time to look into it and have a couple of questions:

I presume the BASIC in ROM is identical to AppleSoft BASIC in other Apple IIs (no support for added memory, etc.)?

But it will still work in fast mode right? Could be fun to try some slow BASIC games on a system a little faster than the other Apple IIs.

What are my other options for BASIC? Are any of the options mostly Microsoft compatible?

Thank you for any tips!

Edited by rpiguy9907, Fri Feb 8, 2019 7:53 PM.


#2 The Usotsuki OFFLINE  

The Usotsuki

    River Patroller

  • 2,038 posts
  • Also called "Licca"

Posted Sat Feb 9, 2019 9:37 PM

It's the same version of Applesoft BASIC as on the Enhanced //e and //c.  It will run at whatever speed the CPU's set to (there's a poke if you really need to flip it at runtime).



#3 FujiSkunk OFFLINE  

FujiSkunk

    Quadrunner

  • 7,592 posts
  • Behold the Fuji!
  • Location:Planet Houston

Posted Sun Feb 10, 2019 12:17 AM

Like the Usotsuki said, BASIC programs will run at whichever CPU speed you set, fast or slow.  The setting affects the Apple II layer as a whole, not just machine-languae programs.

 

What are my other options for BASIC? Are any of the options mostly Microsoft compatible?

 

Applesoft BASIC is very similar to Microsoft BASIC, and in fact that's where the "soft" in the name comes from.  Most if not all of the differences come from the extensions added to Applesoft for things like graphics and character positioning, so odds are a program written purely in Microsoft BASIC will work fine on the Apple.

 

There is also Integer BASIC, which was the standard BASIC on the original Apple II, and can be loaded into any Apple II afterward, IIGS included.  Integer BASIC is very limited compared to Applesoft BASIC and so there isn't much reason to tinker with it, but sometimes you'll find a really old program from the II/II+ era written in Integer, so it's good to have around just in case.



#4 Aunty Entity OFFLINE  

Aunty Entity

    Star Raider

  • 58 posts
  • Location:Austraya mate

Posted Sun Feb 10, 2019 6:18 AM

Like the Usotsuki said, BASIC programs will run at whichever CPU speed you set, fast or slow.  The setting affects the Apple II layer as a whole, not just machine-languae programs.

 

 

 

You guys ever played, "Galaxy!"?  Its all applesoft with a few routines poked in for sound.  I have no real idea why, but it won't run properly at high speed, it seems to lose variable values.

 

A



#5 rpiguy9907 OFFLINE  

rpiguy9907

    Moonsweeper

  • Topic Starter
  • 250 posts
  • Location:New Jersey, USA

Posted Sun Feb 10, 2019 1:46 PM

Thanks!

#6 JamesD OFFLINE  

JamesD

    Quadrunner

  • 8,406 posts
  • Location:Flyover State

Posted Sun Feb 10, 2019 4:31 PM

 

You guys ever played, "Galaxy!"?  Its all applesoft with a few routines poked in for sound.  I have no real idea why, but it won't run properly at high speed, it seems to lose variable values.

 

A

The Avalon Hill game?
I wonder if it doesn't implement some sort of timer in the assembly code



#7 The Usotsuki OFFLINE  

The Usotsuki

    River Patroller

  • 2,038 posts
  • Also called "Licca"

Posted Mon Feb 11, 2019 3:43 AM

ca65 V2.14 - Git b926301
Main file   : slowgs.a65
Current file: slowgs.a65

000000r 1                         .org      $0300
000300  1  38           slowgs:   sec                 ; are we a IIgs?
000301  1  20 1F FE               jsr       $FE1F     ; clears carry on GS, NOP on all other models
000304  1                                             ; (also handled correctly by Laser 128)
000304  1  B0 15                  bcs       @1        ; not a GS, so just exit out of the function
000306  1  AD 36 C0               lda       $C036     ; lock CPU to 1 MHz
000309  1  29 7F                  and       #$7F      ;   CPU high speed bit mask off
00030B  1  8D 36 C0               sta       $C036
00030E  1  A9 F0                  lda       #$F0      ; set text to white (15) on black (0)
000310  1  8D 22 C0               sta       $C022
000313  1  AD 34 C0               lda       $C034     ; set border to black (0)
000316  1  29 0F                  and       #$0F      ;   don't touch the other nibble
000318  1  8D 34 C0               sta       $C034
00031B  1  60           @1:       rts
00031B  1               

Edited by The Usotsuki, Mon Feb 11, 2019 3:44 AM.




Reply to this topic



  


0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users