SAIFIINDUSTRIES's picture
Add batch 10 (abdelazeem201_Systolic-array-implementation-in-RTL-for-TPU, MiSTer-devel_ao486_MiSTer, pulp-platform_cheshire, WangXuan95_FPGA-ftdi245fifo, wuxx_Colorlight-FPGA-Projects)
ed7714b verified
Raw
History Blame Contribute Delete
2.81 kB
/*
* This file is part of the etherdfs project.
* http://etherdfs.sourceforge.net
*
* Copyright (C) 2017 Mateusz Viste
*
* Contains all global variables used by etherdfs.
*/
#ifndef GLOBALS_SENTINEL
#define GLOBALS_SENTINEL
/* required size (in bytes) of the data segment - this must be bigh enough as
* to accommodate all "DATA" segments AND the stack, which will be located at
* the very end of the data segment. packet drivers tend to require a stack
* of several hundreds bytes at least - 1K should be safe... It is important
* that DATASEGSZ can contain a stack of AT LEAST the size of the stack used
* by the transient code, since the transient part of the program will switch
* to it and expects the stack to not become corrupted in the process */
#define DATASEGSZ 3500
/* a few globals useful only for debug messages */
#if DEBUGLEVEL > 0
static unsigned short dbg_xpos = 0;
static unsigned short far *dbg_VGA = (unsigned short far *)(0xB8000000l);
static unsigned char dbg_hexc[16] = "0123456789ABCDEF";
#define dbg_startoffset 80*16
#endif
/* whenever the tsrshareddata structure changes, offsets below MUST be
* adjusted (these are required by assembly routines) */
#define GLOB_DATOFF_PREV2FHANDLERSEG 0
#define GLOB_DATOFF_PREV2FHANDLEROFF 2
#define GLOB_DATOFF_PSPSEG 4
#define GLOB_DATOFF_PKTHANDLE 6
#define GLOB_DATOFF_PKTINT 8
static struct tsrshareddata {
/*offs*/
/* 0 */ unsigned short prev_2f_handler_seg; /* seg:off of the previous 2F handler */
/* 2 */ unsigned short prev_2f_handler_off; /* (so I can call it for all queries */
/* that do not relate to my drive */
/* 4 */ unsigned short pspseg; /* segment of the program's PSP block */
/* 6 */ unsigned short pkthandle; /* handler returned by the packet driver */
/* 8 */ unsigned char pktint; /* software interrupt of the packet driver */
unsigned char drv; /* used drive (0=A:, 1=B, etc */
} glob_data;
static unsigned char glob_reqdrv; /* the requested drive, set by the INT 2F *
* handler and read by process2f() */
static unsigned short glob_reqstkword; /* WORD saved from the stack (used by SETATTR) */
static struct sdastruct far *glob_sdaptr; /* pointer to DOS SDA (set by main() at *
* startup, used later by process2f() */
/* seg:off addresses of the old (DOS) stack */
static unsigned short glob_oldstack_seg;
static unsigned short glob_oldstack_off;
/* the INT 2F "multiplex id" registered by EtherDFS */
static unsigned char glob_multiplexid;
/* an INTPACK structure used to store registers as set when INT2F is called */
static union INTPACK glob_intregs;
#endif