-- Oleg N. Cher http://zx.oberon2.ru/ ---- To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})LISTS.OBERON.CH nu.&I8m: z{mʗbqb z{m}ޝxjǺ z{Ch+bv!~)^{\rtf1\ansi\ansicpg1252\fromtext \deff0{\fonttbl {\f0\fswiss\fcharset0 Arial;} {\f1\fmodern Courier New;} {\f2\fnil\fcharset2 Symbol;} {\f3\fmodern\fcharset0 Courier New;} {\f4\fswiss\fcharset128 MS Mincho;} {\f5\fswiss\fcharset134 SimSun;}} {\colortbl\red0\green0\blue0;\red0\green0\blue255;} \uc1\pard\plain\deftab360 \f0\fs20 Oleg N. Cher:\par \par >>has found a trap\par \par \par the compiler trap is triggered by the illegal use ADR funtion:\par \par ...SYSTEM.ADR(Rsrc1);...\par \par >>Is there a good way to work with address of code procedure?\par \par we know the code procedure is inline bytes only ,no ADR at all,\par so we should prevent it:\par \par DevCPB.MOp\par \par FROM\par ....\par | adr: \par IF z.class = Nproc THEN\par ....\par \par TO:\par ...\par | adr:\par IF (z.class = Nproc)&( z.obj.mode#CProc) THEN\par \par ....\par \par \par \par \par luowy\par \par \htmlrtf{\f4\fs20\htmlrtf0 ----- \'8c\'b4\'95\'b6 ----- \htmlrtf\f0}\htmlrtf0 \par \htmlrtf{\f5\fs20\htmlrtf0 \'b7\'a2\'bc\'fe\'c8\'cb: Oleg N. Cher \htmlrtf\f0}\htmlrtf0 \par \htmlrtf{\f5\fs20\htmlrtf0 \'d6\'f7\'a1\'a1\'cc\'e2: [BLACKBOX] Trap while compiling SYSTEM.GET\htmlrtf\f0}\htmlrtf0 \par \htmlrtf{\f5\fs20\htmlrtf0 \'ca\'b1\'a1\'a1\'bc\'e4: 2012\'c4\'ea5\'d4\'c210\'c8\'d5 2:27:02\htmlrtf\f0}\htmlrtf0 \par \par Dear Marc,\par \par thank you for quick and circumstantial answer.\par \par I'm experimenting with removing the restrictions on code procedure size \par and has found a trap, which falls out when compiling of such code. I \par think, this will you interesting, but can even useful.\par \par \par \par MODULE DevTestCodeSizeProc;\par IMPORT SYSTEM, StdLog;\par \par CONST\par \tab Rsrc1_size = 1;\par \par PROCEDURE [code] Rsrc1 0C3H;\par \par PROCEDURE Do* ;\par VAR i, x: INTEGER;\par BEGIN\par \tab FOR i := 0 TO Rsrc1_size - 1 DO SYSTEM.GET(SYSTEM.ADR(Rsrc1) + i, x); \par StdLog.Int(x) END\par END Do;\par \par END DevTestCodeSizeProc.\par \par \par \par Is there a good way to work with address of code procedure?\par \par \par What is practical reason of using of code procedures with zero size?\par For example, such procedure is used in modules\par \par (System)Kernel - PROCEDURE [code] ALLOC\par \par (System)Math - \tab PROCEDURE [code] FLD (x: REAL);\par \tab PROCEDURE [code] TOP (): REAL;\par \par etc.\par \par \par Thanks.\par \par \par \par Marc Frei wrote:\par \par > Dear Oleg,\par > \par > Here the response to your question from last week from my colleaugue Beat Heeb who is maintaining the BlackBox compiler:\par > \par > It is a restriction of the compiler.\par > \par > The code of a code procedure is stored in object.conval.ext. This is byte array of arbitrary size but the number of bytes used is stored in the first byte (ext^[0]) and thus restricted to 0..255.\par > \par > To change that you would have to change how this length is stored. Search for "CProc" in all compiler sources.\par > \par > Kind regards,\par > Marc\par \par --\par Oleg N. Cher\par http://zx.oberon2.ru/\par \par \par ----\par To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})LISTS.OBERON.CH}}nu.&I8m:Received on Thu May 10 2012 - 11:11:15 UTC
This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:30:03 UTC