Re: A86: Re: Closing menus
[Prev][Next][Index][Thread]
Re: A86: Re: Closing menus
memory is not the same?
for 'local' variables at the top of the program define them like:
onebyte equ TEXT_MEM
twobytes equ TEXT_MEM+1
threebytes equ TEXT_MEM+3
get it? start at TEXT_MEM and then add to the offset after each new one you
'allocate'
the external variables is harder to do
ld hl,var_info
rst 20h
ld hl, code_end - code
call $472F
ld a,b
ex de,hl
call $4c3f
call _SET_ABS_DEST_ADDR
xor a
ld hl,code_end - code
call _SET_MM_NUM_BYTES
xor a
ld hl,code
call _SET_ABS_SRC_ADDR
call _mm_ldir
var_info:
.db $xx,$x,"name" ;first byte is the variable type 2nd is the name
length 3rd is the name
code:
.db numbers,"strings and stuff too if its a program or string"
code_end:
OBJECT TYPE VALUE OBJECT TYPE
----------------- -----------
00 REAL
01 COMPLEX
02 VECTOR - REAL
03 VECTOR - COMPLEX
04 LIST - REAL
05 LIST - COMPLEX
06 MATRIX - REAL
07 MATRIX - COMPLEX
08 CONSTANT - REAL
09 CONSTANT - COMPLEX
0A EQUATION
0B system use
0C STRING
0D GRAPH DATABASE - STANDARD
0E GRAPH DATABASE - POLAR
0F GRAPH DATABASE - PARAMETRIC
10 GRAPH DATABASE - DIFFERENTIAL EQUATION
11 PICTURE
12 PROGRAM
13 CONVERSION
14 system use
15 system use
16 system use
17 system use
18 system use
19 system use
1A system use
1B system use
1C system use
1D system use
1E system use
1F system use
>Thanks. I checked the equates, the memory is not the same. What is the
>difference?
>One more question: How do you create local and global variables that are
not
>stored in the program?
>
>David Phillips
>electrum@tfs.net
>
>
>Trey Jazz wrote:
>
>> use this call to close the menus so you can write to the bottom 1 or 2
lines
>>
>> _flushallmenus equ 49DCh
>>
>> the _penRow and _penCol are the same as the _curRow and _curCol but for
the
>> small font and the _vputs is the same as _puts but small and they can
both
>> be displayed on the screen at the same time not like on diff screens a la
>> QBasic.
>>
>> I wrote this little tic-tac-toe game to teach myself 86asm and had one
>> problem (well, once I had it working...): I only ran it from ASM(, but
when
>> pasting the name from the prog menu, the bottom two lines were cut off,
like
>> the menus stayed open. It worked fine when typing tictac from a blank
>> screen.
>> It uses _puts to output text, so it looks like a TI-BASIC program. Do
you
>> have to do anything to close menus when using the text-mode? BTW, how
does
>> that work? Is there a screen-mode change, or just call a separate
function
>> for the multi-width small font?
>
>
>