Skip to content

Instantly share code, notes, and snippets.

View amanuel2's full-sized avatar

Aman amanuel2

View GitHub Profile
#include <stdio.h>
#include <assert.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#define MAX_DATA 512
#define MAX_ROWS 100
struct Address {
@amanuel2
amanuel2 / pthread1.c
Last active July 3, 2016 03:20
Concurent Ping-Pong Example C<P-THREADS>
#include <pthread.h>
#include<stdlib.h>
//64 BITS -ALL 32 bit Arch
//32 BIT - UNIX 64 bit arch
//64 BIT - WINDOWS 64 bit arch
long long sum = 0;
static enum turn
{
PING,
#include <pthread.h>
#include<stdlib.h>
#include<stdio.h>
//64 BITS -ALL 32 bit Arch
//32 BIT - UNIX 64 bit arch
//64 BIT - WINDOWS 64 bit arch
//long long sum = 0;
static enum turn
{
#include<stdlib.h>
#include<stdio.h>
#include<stdbool.h>
#include<stdint.h>
#include "../includes/Vertex.h"
/**
* Vertex Library C
*
* GCC C99 <Vertex.c>
#ifndef _VERTEX_AM_H_LB
#define _VERTEX_AM_H_LB 1
#pragma once
#include<stdint.h>
#include<stdbool.h>
/**
* Vertex Library C
*
* GCC C99 <Vertex.h>
*
#include<stdlib.h>
#include<stdio.h>
#include<stdbool.h>
#include<stddef.h>
#include<stdint.h>
#include<errno.h>
#include "../includes/Vertex.h"
/**
* Vertex Library C
.section .data
.section .text
.globl _start
_start:
movl $1, %eax # this is the linux kernel command
# number (system call) for exiting
# a program
movl $0, %ebx # this is the status number we will
Mov ebx , 0xb8000
Mov word [ebx] , 0x2033
#STORE CURRENT_INDEX %edi
#STORE BIGGEST_VALUE %ebx
#STORE CURRENT_VALUE %eax
.section .data
data:
.long 3,67,34,222,45,75,54,34,44,33,22,11,66,0
second_data:
.int 4,5,2,224,45,3,23
This file has been truncated, but you can view the full file.
CPU Reset (CPU 0)
EAX=00000000 EBX=00000000 ECX=00000000 EDX=00000000
ESI=00000000 EDI=00000000 EBP=00000000 ESP=00000000
EIP=00000000 EFL=00000000 [-------] CPL=0 II=0 A20=0 SMM=0 HLT=0
ES =0000 00000000 00000000 00000000
CS =0000 00000000 00000000 00000000
SS =0000 00000000 00000000 00000000
DS =0000 00000000 00000000 00000000
FS =0000 00000000 00000000 00000000
GS =0000 00000000 00000000 00000000