Skip to content

Instantly share code, notes, and snippets.

View sinannar's full-sized avatar
🙃
I may be slow to respond.

Sinan NAR sinannar

🙃
I may be slow to respond.
View GitHub Profile
@sinannar
sinannar / gist:1519529
Created December 25, 2011 17:35
billab-hw-part2-20point
;
;I want to describe my algorithm here cause this is so easig to use in this program
;We have got four number as a,b,c and d
;I compare firstly a and b and select the bigger one
;Next,I compare c and d and select the bigger one
;In concluion i compare this two result
;
;a->R1 , b->R2 ,b->R3 ,d->R4
;compare a and b,move the bigger one to R5
;compare c and d,move the bigger one to R6
@sinannar
sinannar / gist:1519531
Created December 25, 2011 17:35
billab-hw-part3-30point
load rf,10
load rf,10
load rf,10
load rf,10
load r1,[pay]
load r2,[payda]
load r3,0 ;bolum
load r4,11111111b ;XOR necessarities
@sinannar
sinannar / gist:1519536
Created December 25, 2011 17:39
billab-hw-part1-10point
LOAD RF,10 ;cleaning screen
LOAD RF,10
LOAD RF,10
LOAD RF,10
LOAD R1,8 ;loading integers registers
LOAD R2,3
LOAD R3,2
LOAD R4,11111111b ;tools we use when get two's compliment
@sinannar
sinannar / gist:1519630
Created December 25, 2011 19:15
billab-hw-part4-40point
load rf,10 ;cleaning screen
load rf,10
load rf,10
load rf,10
load r1,Array ;loading array first adress
load r2,1 ;step
load r0,0 ;condition check
load r3,0 ;total
@sinannar
sinannar / example.cpp
Created December 25, 2011 19:21
about pointers memory
#include<iostream>
using std::cout;
using std::endl;
int main(void)
{
int a[10];
cout<<"a="<<a<<" a+1="<<(a+1)<<" a+2="<<(a+2)<<" a+3="<<(a+3)<<endl<<endl;
@sinannar
sinannar / testingConstDest.cpp
Created January 18, 2012 16:53
If you have some trouble with const and dest when they called,try it
#include <iostream>
using namespace std;
#define POINTER_CREATION
#define REAL_CREATION
class Aaa{
public:
Aaa()
@sinannar
sinannar / basicException.cpp
Created January 18, 2012 16:54
Exception 1
#include <iostream>
#include <string>
using namespace std;
class Exception
{
public:
Exception(string e)
{
@sinannar
sinannar / Exception2.cpp
Created January 18, 2012 16:54
Throw exception from where
#include <iostream>
//#define EXCEPTION_TEST1
#define EXCEPTION_TEST2
using namespace std;
class Exception
{
public:
Exception(string e)
@sinannar
sinannar / Exception3.cpp
Created January 18, 2012 16:56
catch(...) block learning
#include <iostream>
using namespace std;
class Exception
{
public:
Exception(string e)
{
@sinannar
sinannar / examexamples.cpp
Created January 18, 2012 23:05
where is the error if there is error- c++ example
#include <iostream>
//#define TEST1 //yanlıs obje olusmaz
//#define TEST2 //yanlıs A da c dıe bısı yok
//#define TEST3 //yanlıs upcasting downcasting olayı
//#define TEST4 //calısıo
//#define TEST5 //yanlıs templatelık
class A
{