DonNews #17
30 апреля 2002
  Софт  

Project - is a new environment / system Operetsionnaya SinOS from Disabler: programming examples.

<b>Project</b> - is a new environment / system Operetsionnaya SinOS from Disabler: programming examples.
                                           (C) 2oo2 Disabler / 
DPL 



                 Disabler Production LabAratory


                          Presents:



`-1 - Introduction



  Hayushki, people! With you again Disabler and regular program 
of DPL. At this time you have the opportunity to oprobyvat

the work of a new shell for writing programs. Its structure
This system is similar to MustDie'95. The program structure so 
as very similar, ie you create a window with the text options, 
or prompts, and then describes the reaction to the choice of a 
specific option. 



`-2 - System Requirements



                  To run the system must:


                         Required:

■ 128kb of main memory (Ram)
■ 16kb additional memory (Cashe)
■ TR-Dos 5.03 with the team IN A, (# 1F)


                         Desirable:

■ System SetUP v2.04
■ Kempston Mouse
■ 32kb additional memory (Cashe)


                          Ideal:

■ 1024kb static ram + turbo 14mHz no wait!
■ 256kb of additional memory (Cashe)


`-3 - Structure



     Program for SinOS consists of three main parts:

1. File descriptor, which consists of ID-String'a accessories 
file 

   to the system, program name, address, major launches.
2. Descriptors windows.
3. Set of reactions to choose from.



;------------------------------------------------- 
-------------; Example file for SinOS v1.00 
;------------------------------------------------- 
-------------; (c) 2001 Disabler Production Labaratory 
;------------------------------------------------- 
------------- 

              DB "SinOS v1.00"; ID-String file

              DB "Name bend!"; Guess ...

              DW adres_okna_install

              DW adres_okna_second_open

;-------- Format Descriptor window -------

              DB Y_koordinata_okna, X_koordinata_okna

              DB razmer_okna_po_X, razmer_okna_po_y

              DB "Zagolovok_okna, 1; <- HA CLED.CTPOKU

              DB 1; <- HA CLED.CTPOKU


              DB "Tekst option # 1", 1

              DB "Tekst option # 2, 1
; .... ....................

              DB "Tekst option # N"

              DB 0; <- KOHETS OPICATELEY Option


              DW Adres_protsedury_'open '


              DB y_koord_poloski_ # 1, # 1 x_koord_poloski_

              DB dlina_poloski_vybora_optsii_ # 1

              DB marker_optsii_ # 1

              DW adres_ # 1


              DB y_koord_poloski_ # 2, # 2 x_koord_poloski_

              DB dlina_poloski_vybora_optsii_ # 2

              DB marker_optsii_ # 2

              DW adres_ # 2
; .... .................

              DB y_koord_poloski_ # N, # N x_koord_poloski_

              DB dlina_poloski_vybora_optsii_ # N

              DB marker_optsii_ # N

              DW adres_ # N


              DB # ff; <- Konets descriptors selection


              DB marker_'close '

              DW adres_'close '



                             FAQ:

Q: What is the>>> adres_okna_install <<??
A: Address the window that opens only once, at

   boot program.

Q: What is the>>> adres_okna_second_open <<??
A: The address of the first (main) window.

Q: What is the>>> adres_protsedury_'open '<<??
A: This is the address of procedure to be invoked immediately 
after 

   open the window. If the do not need it, instead it can be

   write TO_RET, where TO_RET - mark on the team RET, ie


   TO_RET RET

Q: What is the>>> marker_optsii_ # N, adres_ # N <<<???
A: This determines the token response to the selection of 
options. 

   # 00 - OPEN the following window 'adres_ # N'.

   # 01 - 3akryt the current window and return to the 'ADREC_ # 
N' 

         for updating it.

   # 02 - 3akryt current and open a new window 'adres_ # N'

   # FE - Byzvat procedure 'adres_ # N'

Q: What is the>>> marker_'close 'adres_'close' <<??
A: This is an analogue of the marker response to selection, but 
operates at about   Mahe, ie when not selected any of the 
options and pressed 

  selection button.


- Example of a simple program for SinOS -

              DB "SinOS v1.00"

              DB "Test Program ..."

              DW w_inst

              DW w_main

w_inst DB 3,3,5,17, # 57

              DB "Program Installer", 1,1

              DB "Program has installed", 1

              DB "-----> Yep <-----", 0

              DW install

              DB 6,3,18,2

              DW w_main

              DB # ff, # fe

              DW to_ret

w_main DB 3,3,5,17, # 47

              DB "SinOS Test Program!", 1,1

              DB "Reinstall Program", a

              DB "Exit to SinOS", 0

              DW to_ret

              DB 5,3,18,2

              DW w_inst

              DB 6,3,18,1
p_exit DW 0

              DB # ff, # fe

              DW to_ret

install LD HL, (23773)

              LD (p_exit), HL
to_ret RET

;-----------------------------------

 Now some useful information for
writing programs under SinOS:

■ All the reactions on the choice of ending the command RET
■ Program assembled under the address # C000 (49152)
■ size Program # 4000 (16384) bytes
■ Programs are loaded into the page # 14, # 16, # 17
■ It is advisable to Cashe to hit the Reset button
■ If you press the Reset + Symbol Shift, then SinOS open a 
window, the address 

  which is specified at 23,728 (reaction to the NMI)
■ If you press the Reset + Any Key (except SS, Enter) you can 
get into 

  mate Cashe, if you have it 32kb.
■ If you load the command RST # 10 is available kernal.

  Accessing kernalyu this:


                RST # 10

                DB function


  You have the following functions:

cls EQU 00 - clearing the screen without changing the 
attributes of 

                 IN: -

                 OUT: -
fill EQU 01 - fill the screen color

                 IN: A - Color

                 OUT: -
paint EQU 02 - filling in a single byte of memory

                 IN: HL - address of the beginning

                     BC - unit size-1

                     A - byte fill

                 OUT: -
fone EQU 03 - generation wallpaper

                 IN: -

                 OUT: -
window EQU 04 - opening the window without saving the background

                 IN: HL - window handle

                 OUT: -
window2 EQU 05 - opening a window while preserving the 
background 

                 IN: HL - window handle

                 OUT: -
pop_win EQU 06 - Restoring the background under the window

                 IN: -

                 OUT: -
pop_all EQU 07 - Restoring the background under all windows

                 IN: -

                 OUT: -
print EQU 08 - print line, 00 .. 0D - end of line

                 IN: HL - address of the text

                     DE - address on the screen

                 OUT: -
xprint EQU 09 - Print Text, 00 - End of Text

                                01 .. 0D - end of line

                 IN: HL - address of the text

                     DE - address on the screen

                 OUT: -
down_hl EQU 10 - conversion of the addresses in the screen 
below the line 

                 IN: HL - address on the screen

                 OUT: HL - restated address
down_de EQU 11 - analog down_hl, but de

                 IN: DE - address on the screen

                 OUT: DE - restated address
de_adr EQU 12 - calculation of addresses in the screen

                 IN: DE - coordinates in the familiarity

                 OUT: HL - address on the screen

                      DE - address attributes
cancel EQU 13 - call box on the principle of clicking on the 
choice 

                 IN: HL - address of the window

                     A - handle 'open'

                 OUT: -
last_hl EQU 14 - inversion of the current band of choice

                 IN: -

                 OUT: -
fl_hl EQU 15 - change the color of window title

                 IN: A - color of title

                 OUT: -
get EQU 16 - saving the background under the cursor

                 IN: -

                 OUT: -
put EQU 17 - drawn in

                 IN: -

                 OUT: -
rest EQU 18 - Restoring the background under the cursor

                 IN: -

                 OUT: -
read EQU 19 - reading of sectors

                 IN: HL - Address

                     DE - track / sector

                     B - number of sectors

                 OUT: -
write EQU 20 - recording sectors

                 IN: HL - Address

                     DE - track / sector

                     B - number of sectors

                 OUT: -
get_xy EQU 21 - the cursor location in pixels

                 IN: -

                 OUT: HL - coordinates of the cursor



`-4 - Author, Rights



    Author of SinOS v1.00: .................. Disabler / DPL

    Copyright: ............ Disabler Production Labaratory

    Distribute: ................................ No Limits


`-5 - SetUP v2.04


 You've probably already asked the question, what is this 
SetUP??? So, this sort of thing that allows you to configure 
the hardware performance of your computer programmatically. And 
now more detail about what can SetUP:


1. Selection of types of ROM, provided that the Basic and Dos 
is in a different ROM. There are other four main ROM (from 
BASIC), and two with Dos'om. Personally, I like this:




          Number Zero First

           Rom Half Half


           # 00 Quick Commander Basic'2000

           # 01 NeOS v1.0 Basic'2000

           # 02128 Basic/91y 48 Basic/91y

           # 03128 Basic/82y 48 Basic/82y


          DOS # 0 TR-Dos 5.03 for Honey Commander

          DOS # 1 TR-Dos 5.04 turbo


2. Switch up to eight switches. Seven of them support
SinOS and one backup. I've done this:

Lock 48kb rom ......... Nop - disable zero bank ROM
Emulate rom by cashe .. Nop - emulation of the bank's zero-ROM 
with 

                            using a zero bank Cashe
Write to cashe ........ Yep - you can write to Cashe
Entry to cashe by ..... NMI - Button activation Cashe (NMI / 
Reset) Set black border ...... Yep - Forcing BORDER 0

Devided bright ........ Nop - change bits for the Flash on the 
brightness 

                            paper (for separate brightness and 
Ink 

                            Paper)
Tactes per line ....... 228 - line size of the screen 
horizontally 

                            ticks (228/232)

■ SetUP activated when Reset'e in Cashe.
■ off when writing to the port # FFFF or when the Cashe
■ Port Settings - # FE77
■ Port ROM - # FF77, where there is a feature: lower four bits

  choose one of four ROM, ie zero allows the sample,

  the remaining bits should be equal to unity. Fourth bit

  indicate the type of ROM Dos.



`-6 - Contact phone numbers



    Phones:

             8 (928) 91-33-007 Andrew (Disabler)

             8 (903) 40-22-186 Andrew (Disabler)

             8 (863) 2-404-905 Mike (Mick)






Other articles:

Entry - Disabler finished writing a new shell to DonNews.

Guests - visiting Rostov group Disabler Production LabAratory.

SS'01 report - report Joker / OHG with the St. Petersburg Festival of Computer Art Chaos Construction 2001.

SS'01 results - the results of the St. Petersburg Festival of Computer Art Chaos Construction 2001.

Bugs! - a different glitch assembler XAS'a. "Iron" glitches: the keyboard port, kempston joystick'a, music processor cache on the Pentagon, disk drives.

Humor - a couple of fun pieces and stories.

Project - is a new environment / system Operetsionnaya SinOS from Disabler: programming examples.

Systemka - a description of the Shuffle Commander'a Disabler / DPL.

911 - How to beat the game "Operation RR"

Coding - the combination of visual effects with digital music.

Iron - connect to the Spectrum SRAM (cache).

tube - hidden options cell phones Ericsson LX677, DH618, DH668, DF688.

Rec.lame - Ads on the pages of newspapers are published free of charge.

In Room - Graphic converter to Alone Coder Editor!!!

Credits - the authors of the paper.

Afterword - what annoys me a ZX.


Темы: Игры, Программное обеспечение, Пресса, Аппаратное обеспечение, Сеть, Демосцена, Люди, Программирование

Similar articles:
Pulse scenes - Report from the Assembly Party'99 (Finland).
Tusovka - stories and poems.
Bypassing - cheats for the games Sex Xonix, King Valley.

В этот день...   23 November