corsasport.co.uk
 

Corsa Sport » Message Board » Off Day » Geek Day » Assembly Language...


New Topic

New Poll
  <<  1    2  >> Subscribe | Add to Favourites

You are not logged in and may not post or reply to messages. Please log in or create a new account or mail us about fixing an existing one - register@corsasport.co.uk

There are also many more features available when you are logged in such as private messages, buddy list, location services, post search and more.


Author Assembly Language...
PaulW
Member

Registered: 26th Jan 03
Location: Atherton, Greater Manchester
User status: Offline
7th Nov 03 at 01:08   View User's Profile U2U Member Reply With Quote

From what I can understand... something like this model??
quote:
Enter Char 1 : A
Enter Char 2 : B
Enter Char 3 : C

Display Output:

ABC....A.B.C


When you press the key to enter each char, it just reads that single charecter, then asks for the next one, etc.. then displays the output like you say & like in this little model?
PaulW
Member

Registered: 26th Jan 03
Location: Atherton, Greater Manchester
User status: Offline
7th Nov 03 at 01:10   View User's Profile U2U Member Reply With Quote

quote:
Originally posted by Paul_J
Assembler is ghey!


Couldn't agree more with you there!! Is ok for real low level stuff like boot loaders, etc, but for when your already booted into an OS (like DOS here), then just use something like C/C++, Basic, Pascal, Cobol, etc...
Jason
Member

Registered: 5th Aug 03
Location: Northern Ireland
User status: Offline
7th Nov 03 at 01:13   View User's Profile U2U Member Reply With Quote

i'll get back 2 ya least u know ur stuff!

cheers
Paul_J
Member

Registered: 6th Jun 02
Location: London
User status: Offline
7th Nov 03 at 01:16   View User's Profile U2U Member Reply With Quote

Exactly - when I was being taught assembler I couldn't help thinking 'Wtf is the point?'

they kept saying 'ah yes, but it hardly uses any memory and is very fast' - but in today's age memory isn't a big problem like it used to be and if I want to bloody add 2 numbers together I'll write a bloody program in C++ to do it or use a calculator

C++ is v.easy, never realised how easy it was, always thought it was going to be hard - but after assembler anything where things are pretty much in english is nice...

Paul J
Jason
Member

Registered: 5th Aug 03
Location: Northern Ireland
User status: Offline
7th Nov 03 at 01:20   View User's Profile U2U Member Reply With Quote

J++ is getting easier too i think...

1st project due soon
PaulW
Member

Registered: 26th Jan 03
Location: Atherton, Greater Manchester
User status: Offline
7th Nov 03 at 01:33   View User's Profile U2U Member Reply With Quote

Absolutely pointless program but what the hey, written on Linux though

quote:
#include <string>
#include <iostream>

using namespace std;

main()
{
string a("abcd efg");
string b("xyz ijk");
string c;

cout << a << " " << b << endl;

cout << "String empty: " << c.empty() << endl;
c = a + b;
cout << c << endl;
cout << "String length: " << c.length() << endl;
cout << "String size: " << c.size() << endl;
cout << "String capacity: " << c.capacity() << endl;
cout << "String empty: " << c.empty() << endl;
string d = c;
cout << d << endl;
cout << "First character: " << c[0] << endl;

string f(" Leading and trailing blanks ");
cout << "String f:" << f << endl;
cout << "String length: " << f.length() << endl;
cout << "String f:" << f.append("ZZZ") << endl;
cout << "String length: " << f.length() << endl;

string g("abc abc abd abc");
cout << "String g: " << g << endl;
cout << "Replace 12,1,\"xyz\",3: " << g.replace(12,1,"xyz",3) << endl;
cout << g.replace(0,3,"xyz",3) << endl;
cout << g.replace(4,3,"xyz",3) << endl;
cout << g.replace(4,3,"ijk",1) << endl;
cout << "Find: " << g.find("abd",1) << endl;
cout << g.find("qrs",1) << endl;

string h("abc abc abd abc");
cout << "String h: " << h << endl;
cout << "Find \"abc\",0: " << h.find("abc",0) << endl;
cout << "Find \"abc\",1: " << h.find("abc",1) << endl;
cout << "Find_first_of \"abc\",0: " << h.find_first_of("abc",0) << endl;
cout << "Find_last_of \"abc\",0: " << h.find_last_of("abc",0) << endl;
cout << "Find_first_not_of \"abc\",0: " << h.find_first_not_of("abc",0) << endl;
cout << "Find_first_not_of \" \": " << h.find_first_not_of(" ") << endl;
cout << "Substr 5,9: " << h.substr(5,9) << endl;
cout << "Compare 0,3,\"abc\": " << h.compare(0,3,"abc") << endl;
cout << "Compare 0,3,\"abd\": " << h.compare(0,3,"abd") << endl;
cout << h.assign("xyz",0,3) << endl;
cout << "First character: " << h[0] << endl;


}




when compiled usin g++, cmd ./a.out lists all this crap

quote:
abcd efg xyz ijk
String empty: 1
abcd efgxyz ijk
String length: 15
String size: 15
String capacity: 15
String empty: 0
abcd efgxyz ijk
First character: a
String f: Leading and trailing blanks
String length: 37
String f: Leading and trailing blanks ZZZ
String length: 40
String g: abc abc abd abc
Replace 12,1,"xyz",3: abc abc abd xyzbc
xyz abc abd xyzbc
xyz xyz abd xyzbc
xyz i abd xyzbc
Find: 6
4294967295
String h: abc abc abd abc
Find "abc",0: 0
Find "abc",1: 4
Find_first_of "abc",0: 0
Find_last_of "abc",0: 0
Find_first_not_of "abc",0: 3
Find_first_not_of " ": 0
Substr 5,9: bc abd ab
Compare 0,3,"abc": 0
Compare 0,3,"abd": -1
xyz
First character: x


I think I best get some sleep before I go fekin mad!

[Edited on 07-11-2003 by PaulW]
Jason
Member

Registered: 5th Aug 03
Location: Northern Ireland
User status: Offline
7th Nov 03 at 01:35   View User's Profile U2U Member Reply With Quote

huh?
PaulW
Member

Registered: 26th Jan 03
Location: Atherton, Greater Manchester
User status: Offline
7th Nov 03 at 01:38   View User's Profile U2U Member Reply With Quote

just verrrrrry bored tonight!
Jason
Member

Registered: 5th Aug 03
Location: Northern Ireland
User status: Offline
7th Nov 03 at 01:39   View User's Profile U2U Member Reply With Quote

hope ur even more bored tommorow gimmi a hand!
Jason
Member

Registered: 5th Aug 03
Location: Northern Ireland
User status: Offline
7th Nov 03 at 10:00   View User's Profile U2U Member Reply With Quote

write an assembly language program which will read nine characters from the keyboard with echo and display them as a 3x3 matrix, tabbed and spaced as shown eg if a,b,c,d,e,f,g,h,i is the input then the screen should have the appearance:


ABC.......A B C
DEF ...... D E F
GHI......G H I
Jason
Member

Registered: 5th Aug 03
Location: Northern Ireland
User status: Offline
7th Nov 03 at 10:04   View User's Profile U2U Member Reply With Quote

thats it... iv about 1hr to do it :S
Jason
Member

Registered: 5th Aug 03
Location: Northern Ireland
User status: Offline
7th Nov 03 at 10:26   View User's Profile U2U Member Reply With Quote

help

  <<  1    2  >>
New Topic

New Poll

  Related Threads Author Forum Replies Views Last Post
assembly again... Jason General Chat 0 960
21st Nov 03 at 11:03
by Jason
 
Bloody Programming Jamie General Chat 23 1252
4th Oct 04 at 14:42
by x8john
 
Steering wheel and airbag assembly for 99 sport JonnyRebel Wanted 2 1080
10th Oct 05 at 22:10
by v5uk
 
Converting webpage language 1.6Sport Geek Day 2 986
26th Jul 06 at 20:44
by Sam
 
ASP.NET vs. PHP - your thoughts Planty02 Geek Day 8 1996
26th Oct 06 at 15:47
by ed
 

Corsa Sport » Message Board » Off Day » Geek Day » Assembly Language... 29 database queries in 0.0108359 seconds