Welcome, Guest. Please login or register.


Author Topic: How to begin assembly on Enterprise (Read 29181 times)

Offline Prodatron

  • EP user
  • *
  • Posts: 256
  • Country: de
  • Back on the Z80
    • http://www.symbos.de
Re: How to begin assembly on Enterprise
« Reply #60 on: 2015.May.18. 17:22:54 »
And the CRC bytes add some rhythm :-)
:lol: :lol: :lol:

Is there a z80 crossassembler for use with Context that uses Maxam's assembler syntax (used by WinApe cpc emulator)?

Not sure how you already solved this problem.
You can use WinApe to assemble to a file on your PC, then transfer this file to a disc image and load/use it in Ep128Emu. This is the way I am developing for the Enterprise and all other Z80 machines, so I always have the same assembler (WinApe, =Maxam syntax) for all platforms.
Just use the WRITE command at the beginning of your source code:

Code: [Select]
WRITE "C:\Z80coding\PROGRAM.COM"

...or whatever :) I only load a small "make"-file in the Assembler-Editor of WinApe which is loading the full sourcecode. The most simple "make.asm" would look like this:

Code: [Select]
WRITE "C:\Z80coding\PROGRAM.COM"
READ "C:\Z80coding\PROGRAM.ASM"

I like the Alt+H shortcut in Ep128Emu a lot for reloading the disc image in drive A. This is very helpful and missing in other emulators.

Offline Tuby128

  • EP addict
  • *
  • Posts: 1448
  • Country: hu
Re: How to begin assembly on Enterprise
« Reply #61 on: 2015.May.18. 18:17:26 »
... In other words, empty space filled with FFh loads faster from tape than zeros....
This cannot be true. The bit time-slots of the Manchaster code is equidistant. And thus no matter what kind of bits coded inside two same-lenght file it's always has the same time lenght.

HU:
Ez nem lehet igaz. A Manchester-code idő szeletei időben azonos szélességűek. Így teljesen mindegy milyen bitek vannak két azonos hosszúságú fájlban, időben ugyanolyan hosszúak.
« Last Edit: 2015.May.18. 18:20:33 by Tuby128 »

Offline Zozosoft

  • Global Moderator
  • EP addict
  • *
  • Posts: 14723
  • Country: hu
    • http://enterprise.iko.hu/
Re: How to begin assembly on Enterprise
« Reply #62 on: 2015.May.18. 18:31:16 »
But who talk about Manchaster code here? We talking about the EXOS tape format.
There is 48K 00h: 4:14
And 48K FFh: 3:02

Offline Zozosoft

  • Global Moderator
  • EP addict
  • *
  • Posts: 14723
  • Country: hu
    • http://enterprise.iko.hu/
Re: How to begin assembly on Enterprise
« Reply #63 on: 2015.May.18. 18:36:09 »
EXOS tape format:
Code: [Select]
The actual whole cycle times and frequencies used for the two tape speeds are:

                   Fast Speed        Slow Speed

    leader cycle   424µs (2358 Hz)   1000µs (1000 Hz)
    one bit        344µs (2907 Hz)    800µs (1250 Hz)
    zero bit       504µs (1984 Hz)   1200µs ( 883 Hz)
    sync bit       696µs (1437 Hz)   1600µs ( 625 Hz)

Offline Tuby128

  • EP addict
  • *
  • Posts: 1448
  • Country: hu
Re: How to begin assembly on Enterprise
« Reply #64 on: 2015.May.18. 18:42:07 »
Yes, you are completly right. I am comming from an another planet.
 I cannot belive that. I had thought till now, that the Enterprise uses Mancester code for tape.
 I learn every day new things.

Offline geco

  • EP addict
  • *
  • Posts: 7082
  • Country: hu
    • Támogató Támogató
Re: How to begin assembly on Enterprise
« Reply #65 on: 2015.May.18. 19:10:08 »
There is 48K 00h: 4:14
And 48K FFh: 3:02
It was interesting to hear the samples :)

Offline ssr86

  • EP user
  • *
  • Posts: 355
  • Country: pl
Re: How to begin assembly on Enterprise
« Reply #66 on: 2015.June.06. 17:18:54 »
Can't get my file to load using Geco's example...
I get error after calling exos 1.
I don't really know how my prg file should look as I can't find any info.
I've tried without a header, with a type 5 header and header copied from rick2 prg.

What am I doing wrong?

(sorry - I don't really know what I am doing...)
« Last Edit: 2015.June.06. 17:25:57 by ssr86 »

Offline Zozosoft

  • Global Moderator
  • EP addict
  • *
  • Posts: 14723
  • Country: hu
    • http://enterprise.iko.hu/
Re: How to begin assembly on Enterprise
« Reply #67 on: 2015.June.07. 12:00:43 »
I get error after calling exos 1.
What is the error code?

Which configuration used for loading?

Quote
I've tried without a header, with a type 5 header and header copied from rick2 prg.
Header don't needed for the data file.

Are you edited the file name and length in the loader for your program?

Offline ssr86

  • EP user
  • *
  • Posts: 355
  • Country: pl
Re: How to begin assembly on Enterprise
« Reply #68 on: 2015.June.07. 13:56:40 »
What is the error code?
A=$fe (I get "EXOS function call not allowed" - after calling exos 28 which supposedly translates the error number to message string)
Quote
Which configuration used for loading?
You mean ep128emu configuration? ep128-exdos-fileio...
The file is in the same directory as the com file.
I'm using pasmo.
Quote
Header don't needed for the data file.
ok
Quote
Are you edited the file name and length in the loader for your program?
I had my prg test file named as in the example code - "data.prg".
« Last Edit: 2015.June.07. 14:04:17 by ssr86 »

Offline Zozosoft

  • Global Moderator
  • EP addict
  • *
  • Posts: 14723
  • Country: hu
    • http://enterprise.iko.hu/
Re: How to begin assembly on Enterprise
« Reply #69 on: 2015.June.07. 20:26:08 »
A=$fe (I get "EXOS function call not allowed" - after calling exos 28 which supposedly translates the error number to message string)
:shock:
Can you upload your program for can I see it in debugger?

Offline ssr86

  • EP user
  • *
  • Posts: 355
  • Country: pl
Re: How to begin assembly on Enterprise
« Reply #70 on: 2015.June.07. 21:56:38 »
:shock:
Can you upload your program for can I see it in debugger?
Well I just copy-pasted the example code into my assembler, prepared a small prg-to-be file with little code without start address.
Compiled the prg with --bin option of the pasmo assembler.
Loading the com file through the ep128emu debugger.

I'm pretty sure that it's me doing some stupid error...

Offline Zozosoft

  • Global Moderator
  • EP addict
  • *
  • Posts: 14723
  • Country: hu
    • http://enterprise.iko.hu/
Re: How to begin assembly on Enterprise
« Reply #71 on: 2015.June.07. 22:16:42 »
EXOS 1 working for me without error :oops:
- I putted the files to one directory.
- loaded one fileio config for the ep128emu
- select the directory as work directory for the emulator (ALT+F)
- optionaly at the debugger set breakpoint to 0100x (=execute at 0100h)
- at the BASIC prompt press START (F1) for load the program, then select the .COM file

At the EXOS 6 need to put real length of the file for avoid the End of file error. (Or temporary remove the JP NZ in the testing phase, just put back at the final version.)

Offline ssr86

  • EP user
  • *
  • Posts: 355
  • Country: pl
Re: How to begin assembly on Enterprise
« Reply #72 on: 2015.June.08. 19:22:17 »
- at the BASIC prompt press START (F1) for load the program, then select the .COM file

I've been loading the com file from debugger and that was the problem. When loading from basic it works (after applying the corrections for exos 6 to work).

Should've at least tried that before posting...

Offline ssr86

  • EP user
  • *
  • Posts: 355
  • Country: pl
Re: How to begin assembly on Enterprise
« Reply #73 on: 2015.August.14. 12:43:13 »
I've got another question...

I'm struggling to write a loader for the game resources (it's been some time since I last touched it)
My problem is segment $ff. It seems that the system segment has to always be assigned to a page in memory. I can't allocate it (or don't know how) so I can't load from a file to it (or so it seems). I could load the data into another segment and later copy (or decrunch) it into the $ff segment. But I would like to know how it should be done the right way.

I would like to have 2 video segments and 2 non-video faster segments at every time. Seems I can't leave out the system segment so the second video would have to be $ff...
Or am I just doing something wrong?:oops:

Offline Zozosoft

  • Global Moderator
  • EP addict
  • *
  • Posts: 14723
  • Country: hu
    • http://enterprise.iko.hu/
Re: How to begin assembly on Enterprise
« Reply #74 on: 2015.August.14. 13:03:13 »
It seems that the system segment has to always be assigned to a page in memory.
Only under the system operations. In your program can you page in anything to Page1-3. (on P0 normaly are the Page 0 segment, where the EXOS entry point and IRQ handler at the start.)