ugBASIC 1.18
An isomorphic BASIC language compiler for retrocomputers
Loading...
Searching...
No Matches
8086.h
Go to the documentation of this file.
1#ifndef __UGBC_8086__
2#define __UGBC_8086__
3
4/*****************************************************************************
5 * ugBASIC - an isomorphic BASIC language compiler for retrocomputers *
6 *****************************************************************************
7 * Copyright 2021-2026 Marco Spedaletti (asimov@mclink.it)
8 *
9 * Licensed under the Apache License, Version 2.0 (the "License");
10 * you may not use this file except in compliance with the License.
11 * You may obtain a copy of the License at
12 *
13 * http://www.apache.org/licenses/LICENSE-2.0
14 *
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
20 *----------------------------------------------------------------------------
21 * Concesso in licenza secondo i termini della Licenza Apache, versione 2.0
22 * (la "Licenza"); è proibito usare questo file se non in conformità alla
23 * Licenza. Una copia della Licenza è disponibile all'indirizzo:
24 *
25 * http://www.apache.org/licenses/LICENSE-2.0
26 *
27 * Se non richiesto dalla legislazione vigente o concordato per iscritto,
28 * il software distribuito nei termini della Licenza è distribuito
29 * "COSì COM'è", SENZA GARANZIE O CONDIZIONI DI ALCUN TIPO, esplicite o
30 * implicite. Consultare la Licenza per il testo specifico che regola le
31 * autorizzazioni e le limitazioni previste dalla medesima.
32 ****************************************************************************/
33
34#include "cpu.h"
35
36#define VT_FLOAT_BITWIDTH( p ) \
37 ( \
38 VT_BW_32BIT( p, FT_FAST ) + \
39 VT_BW_32BIT( p, FT_SINGLE ) \
40 )
41
42#define VT_FLOAT_NORMALIZED_BITWIDTH( p ) \
43 ( \
44 VT_BW_32BIT( p, FT_FAST ) + \
45 VT_BW_32BIT( p, FT_SINGLE ) \
46 )
47
48#define VT_FLOAT_NORMALIZED_POW2_WIDTH( p ) \
49 ( \
50 VT_POW2_2( p, FT_FAST ) + \
51 VT_POW2_2( p, FT_SINGLE ) \
52 )
53
54#define CPU_LITTLE_ENDIAN 1
55#define REGISTER_BASE 0x1000
56#define IS_REGISTER(x) ((x & REGISTER_BASE) == REGISTER_BASE)
57
83
92
93void vars_emit_byte( Environment * _environment, char * _name, int _value );
94void vars_emit_word( Environment * _environment, char * _name, int _value );
95void vars_emit_dword( Environment * _environment, char * _name, int _value );
96void vars_emit_number( Environment * _environment, char * _name, int _value );
97
98#endif
@ REGISTER_NONE
Definition 6309.h:62
#define REGISTER_BASE
Definition 6309.h:57
@ STACK_NONE
Definition 6309.h:78
@ STACK_BYTE
Definition 6309.h:79
@ STACK_WORD
Definition 6309.h:80
@ STACK_DWORD
Definition 6309.h:81
@ REGISTER_CARRY
Definition 6502.h:76
@ REGISTER_ZERO
Definition 6502.h:77
enum _CPU8086Stack CPU8086Stack
_CPU8086Stack
Definition 8086.h:84
void vars_emit_word(Environment *_environment, char *_name, int _value)
Definition _vars.c:92
void vars_emit_dword(Environment *_environment, char *_name, int _value)
Definition _vars.c:100
void vars_emit_number(Environment *_environment, char *_name, int _value)
Definition _vars.c:108
enum _CPU8086Register CPU8086Register
_CPU8086Register
Definition 8086.h:58
@ REGISTER_DI
Definition 8086.h:77
@ REGISTER_BH
Definition 8086.h:65
@ REGISTER_BL
Definition 8086.h:64
@ REGISTER_AL
Definition 8086.h:62
@ REGISTER_CH
Definition 8086.h:67
@ REGISTER_CL
Definition 8086.h:66
@ REGISTER_DL
Definition 8086.h:68
@ REGISTER_DH
Definition 8086.h:69
@ REGISTER_DX
Definition 8086.h:73
@ REGISTER_BP
Definition 8086.h:75
@ REGISTER_SI
Definition 8086.h:76
@ REGISTER_CX
Definition 8086.h:72
@ REGISTER_BX
Definition 8086.h:71
@ REGISTER_AX
Definition 8086.h:70
@ REGISTER_SP
Definition 8086.h:74
@ REGISTER_AH
Definition 8086.h:63
void vars_emit_byte(Environment *_environment, char *_name, int _value)
Definition _vars.c:84
struct _Environment Environment
Structure of compilation environment.