loading asm & Applesoft program

8 posts / 0 new
Last post
Offline
Last seen: 11 months 1 week ago
Joined: Aug 28 2019 - 08:51
Posts: 6
loading asm & Applesoft program

Working on some interfacing experiments.  They come from a book called "Interfacing & digital experiments with your apple" by Charles Engelsher.  It requires me to load both an assembly program and applesoft program at the same time.  The applesoft program calls the assembly program as a sub routine.   I wrote the assembly program using Lisa v2.5.   Can't figure out how to back out of Lisa once the binary is loaded and lauch the applesoft program???  If I try to load the assembly program outside of Lisa I get a file type error message.  Could I be getting tripped up by two different versions of Dos?  I am working in Dos 3.3.  When I boot from my Lisa disk I don't see any indication of what version of Dos it is running? 

 

Any suggestions are much appreciated.  Thanks, Chris

Offline
Last seen: 7 hours 4 min ago
Joined: Jul 5 2018 - 09:44
Posts: 2536
Your assembled output needs

Your assembled output needs to be saved in a 'B' type file and loaded with BLOAD.  Make sure you don't put your assembly code at $800, because that is where Applesoft normally goes.  If your code is small it might fit at $300, otherwise it is best to put it up high near the bottom of DOS.  If your Applesoft program isn't too big and not using the 2nd hires page you can probably just load at $6000.

 

Offline
Last seen: 11 months 1 week ago
Joined: Aug 28 2019 - 08:51
Posts: 6
My file is saved as a binary.

My file is saved as a binary.  When I try to Bload it in Dos 3.3  I get a "File Type Mismatch" error.

Offline
Last seen: 7 hours 4 min ago
Joined: Jul 5 2018 - 09:44
Posts: 2536
Does the file show as "B" in

Does the file show as "B" in CATALOG?  Some of the old assemblers used to save files as type S or something like that, and you can't BLOAD those.  Anyway, I use a cross assembler that runs on Linux and then utilities to copy my assembler output binary code to a disk image and then either run that disk image in an emulator or put it on a USB stick and attach it to my Apple II wuth CFFA 3000.  A lot of people use this kind of work model these days.  Many use Merlin 32 assembler which runs on either Linux or Windows.  I wrote my own assembler which can handle a lot of Merlin style code but also can assemble a lot of code with LISA or EDASM syntax too, even some S-C.

 

 

Offline
Last seen: 11 months 1 week ago
Joined: Aug 28 2019 - 08:51
Posts: 6
Found some LISA documentation

Found some LISA documentation and it looks like it was writen to run in Dos 3.2.  Thinking that was the issue.  Rewrote the assembly program in Merlin for Dos 3.3 (took 10 min) and it runs now with no issues now.   To answer your question, yes it shows as a binary.  According to the LISA documentation it will show that way even though it's really a .L file.  You can't Bload or Brun it.  

 

Bye the way, writing your own assembler, that is pretty impressive.  Way beyond my hacking skills.  Thanks for the feedback.  Chris

Offline
Last seen: 7 hours 4 min ago
Joined: Jul 5 2018 - 09:44
Posts: 2536
It really wasn't that hard to

It really wasn't that hard to write an assembler, it only took me a few days and a few thousand lines of code.  If you are interested in looking at it the source code is here:

https://github.com/softwarejanitor/as65

 

I also wrote a disassembler and a few other little things that might be useful to Apple II developers.

 

 

MarkO's picture
Offline
Last seen: 1 week 8 hours ago
Joined: Dec 10 2011 - 16:26
Posts: 688
loading asm & Applesoft program

Thanks for the Utilities...

 

 

MarkO

Offline
Last seen: 7 hours 4 min ago
Joined: Jul 5 2018 - 09:44
Posts: 2536
Thanks for using them.  I

Thanks for using them.  I haven't had a lot of time lately to work on them but I am always open to input, ideas, bug fixes or even bug reports.

 

Log in or register to post comments