Enterprise Forever

:UK => Programming => Topic started by: JSP on 2018.April.08. 17:22:43

Title: Call to ROM during reboot
Post by: JSP on 2018.April.08. 17:22:43

Like everyone else, who are venturing into MC coding on the EP128, I use the SAMPLE.ASM programming example to get started. In my case I look at each line of the program and analyze its purpose to get a feeling for how it works.

There is a section that sets up pages for a reset. It goes like this... (comments as I understand the process)

LD C,40H ; This triggers deallocation of all user RAM during the EXOS Reset (RESET=0)
EXOS RESET ; Afterwards only PAGE0 is defined by the system and pointing to the lowest RAM segment (0F8H on my EP128)

LD A,1 ; So we initialize Page3 (port 0B3H) to point to segment 1 (ROM segment)
OUT (0B3H),A

Then comes the question...

LD A,6

The comments in the program refer to the 6 function=Enterprise logo screen and make a call to a (fixed) address in the ROM in Page 3. Offset 0DH from the start address of memory mapped to Z80 space 0C00H-0FFFFH (Page3)

... Where can I find documentation that tells me I need to jump to this specific address with this particular value. Any help is appreciated, please.

I have the English  version of the Kernal Specification 2.1, but I have no manuals or articles discussing ROMS and their layout. If such documentation exist in English, it is preferable. If it exists in Hungarian... well, Google Translate will point me in the right direction though it obviously has issues and translates word into English words, where you need a little bit of vertical thinking to decode the actual meaning. :-)

Title: Re: Call to ROM during reboot
Post by: Zozosoft on 2018.April.08. 18:39:53
The information come from ROM disassemblies:
Segment 0 (http://enterprise.iko.hu/books/Segment_0.pdf)
Segment 1 (http://enterprise.iko.hu/books/Segment_1.pdf)
And the book "Gépi kódú programozás" (Machine code programing) are talks detailed about the EXOS initializátion:
System initialization (http://ep128.hu/Ep_Konyv/Gepi_kod.htm#18)

At the ROM1:
C00A: JP WP         ;normal EXOS extension entry point, jump to WP
C00D: JP EXOS_1 ;execute EXOS segment 1 functions
EXOS 1 functions:
0: Read Time
1: Set Time
2: Read Date
3: Set Date
4: Tick Clock
5: Load Relocatable module
6: Copyright Display (the starting ENTERPRISE screen) 
Title: Re: Call to ROM during reboot
Post by: JSP on 2018.April.08. 21:17:59

Ahh - Thanks.

I can see there is a lot of interesting information in that book and in those ROM listings. Google Translate will have to do some hard work here. And so will I :-)