Some help translating some asm to C



I am trying to translate as much assembly into C as possible in a
module for an OS.

; ****************************************************
; ***** The following equates must be set to 100H ***
; ***** + the addresses specified in LOADER.PRN ***
; ***** ***
equ1 equ rsxstart ;does this adr match loader's?
equ2 equ fixchain ;does this adr match loader's?
equ3 equ fixchain1 ;does this adr match loader's?
equ4 equ fixchain2 ;does this adr match loader's?
equ5 equ rsx$chain ;does this adr match loader's?
equ6 equ reloc ;does this adr match loader's?
equ7 equ calcdest ;does this adr match loader's?
equ8 equ scbaddr ;does this adr match loader's?
equ9 equ banked ;does this adr match loader's?
equ10 equ rsxend ;does this adr match loader's?
equ11 equ ccporg ;does this adr match loader's?
equ12 equ ccpend ;This should be 0D80h
rsxstart equ 0100h
fixchain equ 01D0h
fixchain1 equ 01EBh
fixchain2 equ 01F0h
rsx$chain equ 0200h
reloc equ 02CAh
calcdest equ 030Fh
scbaddr equ 038Dh
banked equ 038Fh
rsxend equ 0394h
ccporg equ 041Ah

org ccporg ;LOADER is at 100H to 3??H
So far I got this:

// The following equates must be set to 100H + the
// address specified in loader.prn
int *equ1 = rsxstart;
int *equ2 = fixchain;
int *equ3 = fixchain1;
int *equ4 = fixchain2;
int *equ5 = rsx$chain;
int *equ6 = reloc;
int *equ7 = calcdest;
int *equ8 = scbaddr;
int *equ9 = banked;
int *equ10 = rsxend;


int *rsxstart = 0x0100;
int *fixchain = 0x01d0;
int *fixchain1 = 0x01eb;
int *fixchain2 = 0x01f0;
int *rsx$chain = 0x0200;
int *reloc = 0x02ca;
int *calcdest = 0x030f;
int *scbaddr = 0x038d;
int *banked = 0x038f;
int *rsxend = 0x0394;
int *ccporg = 0x041a;

I don't know what the C equivelent of the opt command is. Am I
translating this correctly? Thanks in advance for your help.

.



Relevant Pages

  • Re: Array of indices
    ... > thing is to translate it to C... ... But it is nowhere close to be translateable into a programming language. ... After that whole thing finished all array elements ... int FindLargest(float A, int NrElements) ...
    (alt.comp.lang.learn.c-cpp)
  • Re: Reading C code in matlab... mex file?
    ... translate" The following from c: ... 'int nKernels' */ ... FLOAT32 Offset, dTheta_i, dTheta_j; ...
    (comp.soft-sys.matlab)
  • Re: help understanding assignment with post increment operator
    ... > until after the assignment has taken place, but to my mind the line ... Hi Rob, ... int x = 0; ... it would translate to something like this: ...
    (comp.lang.java.help)
  • Re: SML please for translation
    ... you translate me this program: ... type var = string; ... N of int ...
    (comp.lang.ml)
  • Re: Newbie Convert int to int * ???
    ... We don't worry about this ... that I want to translate into VB. ... your function expects a pointer to int and a pointer to double - ...
    (microsoft.public.dotnet.languages.vc)