Welcome, Guest. Please login or register.


Author Topic: Q&A (Read 56573 times)

Offline g0blinish

  • EP fan
  • *
  • Posts: 110
Re: Q&A
« Reply #60 on: 2015.November.29. 12:32:38 »
I think my questions ain't offtopic.  will wait geco's reply.

Offline lgb

  • EP addict
  • *
  • Posts: 3563
  • Country: hu
  • æðsta yfirmaður
    • http://lgb.hu/
Re: Q&A
« Reply #61 on: 2015.November.29. 13:31:34 »
I think my questions ain't offtopic.  will wait geco's reply.

Of course it's not off-topic, since this very topic is for Q&A about the devcompo :)

Offline g0blinish

  • EP fan
  • *
  • Posts: 110
Re: Q&A
« Reply #62 on: 2015.November.30. 08:48:51 »
if possible to switch segments via ports B0h-B3h, can I read values from these ports?

Offline Zozosoft

  • Global Moderator
  • EP addict
  • *
  • Posts: 14722
  • Country: hu
    • http://enterprise.iko.hu/
Re: Q&A
« Reply #63 on: 2015.November.30. 08:58:20 »
can I read values from these ports?
Yes.

Offline g0blinish

  • EP fan
  • *
  • Posts: 110
Re: Q&A
« Reply #64 on: 2015.November.30. 09:05:20 »
Back again to ZX Spectrum creation:

Code: [Select]
;11.23 Function 25 - Free Segment
;    Parameters :  C segment number
;    Results    :  A status
                              ;Az 0FAH szegmens felszabaditasa...
                              ; For the Liberation of 0FAH segment ...
            LD C,0FAH
            EXOS 25
                              ;... es belapozasa a 2-es lapra Ugyanez az 0FCH szegmenssel
                              ; ... And belapozasa the 2nd sheet of the same segment 0FCH
            LD A,0FAH
            OUT (0B2H),A ; segment FAh at $8000

            LD C,0FCH;;free segment FCh
            EXOS 25

            LD A,0FCH
            OUT (0B1H),A;segment FC at $4000

 So, segment FCh always related to Nick?

Offline lgb

  • EP addict
  • *
  • Posts: 3563
  • Country: hu
  • æðsta yfirmaður
    • http://lgb.hu/
Re: Q&A
« Reply #65 on: 2015.November.30. 09:11:06 »
So, segment FCh always related to Nick?

Segments FC,FD,FE,FF are always (both on EP64 and EP128) the video RAM ("VRAM") which is used by the Nick linearly _regardless_ of the state of ports B0...B3 (these ports map segments for the CPU only, Nick always sees the VRAM - and only the VRAM - segments directly and linearly).
« Last Edit: 2015.November.30. 09:42:20 by lgb »

Offline Zozosoft

  • Global Moderator
  • EP addict
  • *
  • Posts: 14722
  • Country: hu
    • http://enterprise.iko.hu/
Re: Q&A
« Reply #66 on: 2015.November.30. 09:13:33 »
So, segment FCh always related to Nick?
Yes.

But the exampled source code are wrong for memory allocation.

Offline g0blinish

  • EP fan
  • *
  • Posts: 110
Re: Q&A
« Reply #67 on: 2015.November.30. 09:16:04 »
Yes.

But the exampled source code are wrong for memory allocation.

wrong in "get a free Video segment"?


Offline Zozosoft

  • Global Moderator
  • EP addict
  • *
  • Posts: 14722
  • Country: hu
    • http://enterprise.iko.hu/
Re: Q&A
« Reply #68 on: 2015.November.30. 09:20:33 »
wrong in "get a free Video segment"?
Yes. EXOS 25 only can be used when you allocated the segment.
See my SAMPLE.ASM for right memory allocation.

And I will shortly upload my loader for Spectrum conversions.

Offline g0blinish

  • EP fan
  • *
  • Posts: 110
Re: Q&A
« Reply #69 on: 2015.November.30. 09:23:51 »
And I will shortly upload my loader for Spectrum conversions.

Yes, great to see one!

Offline g0blinish

  • EP fan
  • *
  • Posts: 110
Re: Q&A
« Reply #70 on: 2015.November.30. 09:48:37 »
Yes. EXOS 25 only can be used when you allocated the segment.
See my SAMPLE.ASM for right memory allocation.


for some reasons, routine jumps to the exit routine. How to detect error and reason?

Offline Zozosoft

  • Global Moderator
  • EP addict
  • *
  • Posts: 14722
  • Country: hu
    • http://enterprise.iko.hu/
Re: Q&A
« Reply #71 on: 2015.November.30. 10:00:32 »
for some reasons, routine jumps to the exit routine. How to detect error and reason?
After any EXOS call NZ flag set if any error occured.
Then the A register contain the error code, which can be used for advanced error handling.

If you want get the error message can be asked from the system with EXOS 28 call.

Offline g0blinish

  • EP fan
  • *
  • Posts: 110
Re: Q&A
« Reply #72 on: 2015.November.30. 10:11:04 »
252 "Stack overflow". very interesting.

Offline BruceTanner

  • EP lover
  • *
  • Posts: 607
  • Country: gb
Re: Q&A
« Reply #73 on: 2015.November.30. 10:20:33 »
252 "Stack overflow". very interesting.
252 = FC in hex. Looks to me like segment number and error code might have got mixed up! :oops:

Offline Zozosoft

  • Global Moderator
  • EP addict
  • *
  • Posts: 14722
  • Country: hu
    • http://enterprise.iko.hu/
Re: Q&A
« Reply #74 on: 2015.November.30. 10:24:41 »
252 "Stack overflow". very interesting.
EXOS have a own stack in the System Segment. And EXOS calls can be use another EXOS function calls. Then need always check the available space in the System Stack. Simple example: BASIC use Read Block function to read EDITOR channel, for read the new line entered by the user.
The EDITOR device read characters from the KEYBOARD device, and write characters to the VIDEO device. These are also additional EXOS calls.
And when the user press the Enter then return the EDITOR from the main EXOS call to the BASIC.