Offer for alasm coders alasm

ZXNet echo conference «zxnet.soft»

From Alexander Bondarenko To All 22 April 2004

--------------------------------------------------------- Posted by: Alexander Bondarenko from CODE.ZX Date: 22 Apr 2004 Time: 14:58 From: Alexander Bondarenko, 500:3432/3 For: All Topic: Suggestion for alasm coders --------------------------------------------------------- *** Also sent to CODE.ZX (For those who know how to code...) *** Also sent to ZXNET.SOFT (Softina...) *** Also posted in EKB.PROGRAMMING (Online programming.) Hello, All! To build the capacity of a "smart" library of procedures under I need help from coders. Need ideas, suggestions, etc. I provide a brief description of the library for those who are interested. ================================================================================== LIB+ The LIB+ library (currently in development) is a collection of all sorts of useful procedures and subroutines, so far there are only about 30 of them. She designed for assembler alasm - as the only one in real life, on currently an assembler that supports conditional translation. The general organization of the library is such that the programmer cannot you need to monitor it in no way, except how to determine one service variable (and only if it is needed). For To “call” the library you just need to enter at the end of the program: INCLUDE "LIB+"In this case, it will automatically be determined which procedures need to compile and which ones don't. The program itself has enough explicitly indicate the procedure label somewhere so that it can be used later linked: CALL Procedure or LD BC,Procedure LIB+ file - the main module of the library, defines the state label and in case it is used but not defined, makes an INCLUDE of the auxiliary file, which contains procedure. Library auxiliary files contain procedures a certain topic. Total currently exists the following set of these files: SCREEN_P - procedures for working with screen addresses WINFX_R - procedures for various effects with windows on the screen. PR_R - three printing procedures, respectively on 42, 51 and 64 characters per line. Option - for character by character prints, fast. But for text leaflets Another option is preferable - lowercase. MEM128_P - procedures for working with upper memory pages (currently - only for 128k) WINMAN_P - window manager, allows you to specify such and such a window as the current one, or “clear” the parameters of the current window PRNMAN_R - print procedure manager, allows you to set print procedure as current, print from it to current window and immediately switch to othersprinting procedures. Automatically pairs with WINMAN_R. INPUT_P - keyboard polling procedures (via 48th ROM) These files can be called in a program separately from LIB+, which will allow you to compile sets specific to the topic procedures to a specific place in the code. You can refuse altogether LIB+, but then you will have to monitor the compilation process yourself. Letter R or P at the end of the auxiliary file name means whether it can exist independently, without the need for other supporting files. If the name ends with _P, which means it can. Library hierarchy: +----->WINMAN_P | | PRNMAN_R-----+ WINFX_R------>SCREEN_P | ^ | | +----------->PR_R------------+--->FONT42, FONT51, FONT64 MEM128_P INPUT_P When using LIB+, you can specify the page after INCLUDE, where the entire set will be loaded during compilation. There is also the ability to load LIB+ in one place, and auxiliary files - to another. This is set by the _LPG1 variable. If she defined, then all auxiliary files will be loaded into page whose number is contained in _LPG1. This is made for partial acceleration of the compilation process.Individual procedures may be modified depending on whether any other procedures are used, more or less related to these. For example, the SET_WIN procedure (task current window), when using the PRNMAN__R module, there will be, in addition setting the screen window itself, recalculating and for current printing procedure. If the PRNMAN_R module is not is used, then in SET_WIN there will not even be a hint of code, involved in this recalculation. Or - all special effects procedures with a window, when using WINMAN_R, are endowed with a second point input (CW_ + name of the special effect procedure) - for working with current window (does not require explicitly setting window parameters). But this "endowment" occurs again if it is somewhere was called. The library allows you to organize the source code of the program more culturally and in some places even “thinks” a little for the programmer. Here is a list of library procedures: SCREEN_P - working with screen addresses SCRADR - calculation of the address on the screen using familiar coordinates in DE (YX) and placing it in HL ATRADR - the same, but for the address in the attributes SCPXADR - the same, but for the address on the screen and by pixel coordinates SCR2ATR - convert screen address to HL for the corresponding attribute. DNHL - recalculation of the screen address in HL by the line below UPHL - the same, but the line is higher DN8HL - the same, but 8 lines lowerUP8HL - the same, but 8 lines higher PR_R - printing procedures This module requires 3 font files for procedures - FONT42, FONT51 and FONT64. If labels of the same name are already defined, then the font will not be loaded, which also allows link fonts manually to a specific place in the program. PR42, PR51, PR64 - symbol printing procedures. Printable symbol - in A. GTXY42, GTXY51, GTXY64 - positioning procedures "carriages". DE - print coordinates in matrices. PRLIN42, PRLIN51, PRLIN64 - print one line of a character. A- symbol, DE - print coordinates in matrices, B - line number in familiarity, H is the address of the symbol line. Auxiliary procedures. WINFX_R - a set of special effects. For these procedures, the window coordinates are specified in DE (YX), window dimensions - in BC (height/length). Everything according to acquaintances. CLRSWN (window version - CW_CLRSWN) - clear screen window area FILAWN (CW_FILAWN) - fill the attribute area with a byte windows RMKWIN (CW_RMKWIN) - draw a frame around the window. Frame - rectangular line 1 pixel thick, filled with 0 - around windows (work is carried out on the area bordering the window, so a window should always have this area around it if it is adjacent to the screen border, there will be glitches), and the same line - along the bottom and right border of the window rectangle, filled with 1. SLC_WIN_UP (CW_SLC_WIN_UP) - scrolling the window up by familiar place, with attributes.SLP_WIN_UP (CW_SLP_WIN_UP) - scrolling the window up by a pixel SLP_WIN_DN (CW_SLP_WIN_DN) - scrolling the window down by pixel MEM128_P - procedures for working with upper memory pages. SET_PG - set current page to A PUSH_PG - store the current page number on the stack POP_PG - restore page number from stack and set her WINMAN_P - small window manager SET_WIN - set the current window (DE - YX, BC - height/length). If the window extends somewhere beyond the screen, then it will adjusted to its size. GET_WIN_INFO - get the parameters of the current window. PRNMAN_R SET_CUR_PR - set the current printing procedure (address - in HL) PR_WIN - print the character (A) in the window PR_STR_WIN - print a string (address in HL, ends with 0 or 13) GTXY_WIN - positioning the carriage inside the window INPUT_P - keyboard polling via 48th ROM INKEY48 - number of the pressed key in A ================================================================================== In general, what exists at the moment is by no means helicopter, there is still plenty of work to be done on the library. I hope for the support of the people. Best regards, Alexander. -+- [code] [gfx] Current project (alasm LIB+): 25% + Origin: [9/I 2k] [Speccy rulez] [pc - suxx] (500:3432/3)╙────────────────────── ──────────────────────╜ *Hello, All!* /That’s all, All, you can scroll further.../