first_pass.c
void updateAddresses(fileInformation fileInformation){
    /*setting pointers to the heads of the lists */
    DataNodePointer dataPtr = fileInformation.data_head;
    SymbolNodePointer SymbolPtr = fileInformation.symbol_head;

    while(dataPtr != NULL){
        /*increasing the memory address so it will match to the IC */
        dataPtr->memory_address +=fileInformation.IC;
        dataPtr = dataPtr->next;
    }

    while(SymbolPtr != NULL){
        if(SymbolPtr->type == DATA_TYPE){
            SymbolPtr->memory_address += fileInformation.IC;
        }
        SymbolPtr = SymbolPtr->next;
    }

}
/**
 * updating the addresses acording to the synthax that has been given in the book
 * @param fileInformation holds needed data to handle the whole inputfile
 */
updating the addresses acording to the synthax that has been given in the book
@param fileInformation holds needed data to handle the whole inputfile
updating the addresses acording to the synthax that has been given in the book @param fileInformation holds needed data to handle the whole inputfile
void updateAddresses(fileInformation fileInformation){
    DataNodePointer dataPtr = fileInformation.data_head;
    SymbolNodePointer SymbolPtr = fileInformation.symbol_head;
    while(dataPtr != NULL){
        dataPtr->memory_address +=fileInformation.IC;
        dataPtr = dataPtr->next;
    }
    while(SymbolPtr != NULL){
        if(SymbolPtr->type == DATA_TYPE){
            SymbolPtr->memory_address += fileInformation.IC;
        }
        SymbolPtr = SymbolPtr->next;
    }
}
void updateAddresses ( fileInformation fileInformation ) { DataNodePointer dataPtr = fileInformation . data_head ; SymbolNodePointer SymbolPtr = fileInformation . symbol_head ; while ( dataPtr != NULL ) { dataPtr -> memory_address += fileInformation . IC ; dataPtr = dataPtr -> next ; } while ( SymbolPtr != NULL ) { if ( SymbolPtr -> type == DATA_TYPE ) { SymbolPtr -> memory_address += fileInformation . IC ; } SymbolPtr = SymbolPtr -> next ; } }
updating the addresses acording to the synthax that has been given in the book
 @param fileInformation holds needed data to handle the whole inputfile
updating the addresses acording to the synthax that has been given in the book @param fileInformation holds needed data to handle the whole inputfile
/*setting pointers to the heads of the lists */ /*increasing the memory address so it will match to the IC */