2gs programming

3 posts / 0 new
Last post
Offline
Last seen: 1 month 2 weeks ago
Joined: Oct 3 2018 - 10:23
Posts: 4
2gs programming

I'm thinking about learning assembly language to program a game, and I want to use the Apple 2gs. I've never really owned one, and only used it few times. I'm intrigued about its graphics and sound, and being able to use 16-bit registers. I'm used to programming in BASIC on Commodores, and would like to use a similar setup, but playing with a 2gs emulator, I'm a little confused.

 

When first booting the gs with no disk, it goes into BASIC. Is that the same one as the IIe? Is it basically running in emulation mode (same as DOS on a 386+ PC?) How can I access the memory beyond 128Kb, 16-bit registers, new graphics modes, etc? Or do I need to put the computer in 16-bit mode, and for that do I need an OS that supports it?

 

Hopefully my questions make sense. Appreciate any clarification on this!

Dog Cow's picture
Offline
Last seen: 1 week 2 days ago
Joined: Dec 11 2008 - 16:26
Posts: 536
retrobyte12 wrote:I'm

retrobyte12 wrote:

I'm thinking about learning assembly language to program a game, and I want to use the Apple 2gs. I've never really owned one, and only used it few times. I'm intrigued about its graphics and sound, and being able to use 16-bit registers. I'm used to programming in BASIC on Commodores, and would like to use a similar setup, but playing with a 2gs emulator, I'm a little confused.

 

When first booting the gs with no disk, it goes into BASIC. Is that the same one as the IIe?

Yes, Applesoft BASIC on the IIgs is essentially the same as on the enhanced Apple IIe.

 

Quote:
Is it basically running in emulation mode (same as DOS on a 386+ PC?)

In BASIC, yes. The 65C816 CPU has an emulation flag to switch between 8-bit and 16-bit registers.

Quote:
How can I access the memory beyond 128Kb, 16-bit registers, new graphics modes, etc? Or do I need to put the computer in 16-bit mode

I suggest you get a book on Apple IIgs programming.

Apple IIGS Assembly Language Programming by Leo J. Scanlon or Programming the Apple IIGS in Assembly Language by Ron Lichty and David Eyes.

 

Learn the basics by reading a book and trying it for yourself. :-)

Offline
Last seen: 1 month 2 weeks ago
Joined: Oct 3 2018 - 10:23
Posts: 4
Dog Cow wrote:Learn the

Dog Cow wrote:

Learn the basics by reading a book and trying it for yourself. :-)

 

Thank you, I do mean to do that of course :)

I'm jusat trying to grasp the high-level picture of how Apple 2gs works. The two comparisons for me are a 32-bit PC that is running DOS, which is 16-bit. In order to use the CPU in protected (32-bit) mode, you have to use a DOS Protected mode extender, because DOS itself is running in real, 16-bit mode.

 

When 2gs boots into BASIC, I understand that the Monitor is basically 2e, but is it running in native 16-bit mode, or emulated 8-bit mode? And can I switch it to native from BASIC prompt with a soft switch if it is running in emulated mode?

 

All this because I'm trying to avoid using GS/OS. Not at all interested in a GUI, I just want to program the hardware, without any help, outside of some basic routines. Which brings me to my final question. When I boot ProDOS 8, what happens? Does the computer automaticaly switch to emulated mode? Can I again switch it to native mode?

Log in or register to post comments