profile-img
์ง€๋ฐ์ด์˜ ํ‹ฐ์Šคํ† ๋ฆฌ
images/slide-image

์ด ์•„์ด์˜ ํŠน์ง• .. 

1. native code 

2. machine language

3. machine dependent 

 

This code is written in machine (and assembly) language for a specific processor; thus it is non-portable or machine dependent. This is the native code for the 6502 processor. Machine language is both difficult to write and to understand. (That's why Woz added all of the comments on the right).

 

 

 

step 1 - text editor : vim ๊ฐ™์€๊ฑฐ ! ์ฒ˜์Œ์— ํ…์ŠคํŠธ ์—๋””ํ„ฐ๋กœ ์ฝ”๋“œ ์ž‘์„ฑํ•จ 

step 2 - preprocessor : Performs text substitution on your source code / Converts processed source code to object code.

step 3 - compiler : converts processed source code to object code 

step 4 - linker : combines object files with library code to produce the executable image, 

step 5 - loader : reads the program on disk, loads any required shared libraries and starts the program running.

step 6 - CPU : responsible for executing your code 

 

๊ทธ๋‹ˆ๊นŒ 1. ๋น”์œผ๋กœ ํ…์ŠคํŠธ ์จ์„œ ์ฝ”๋“œ ์“ฐ๋ฉด 2. ํ”„๋ฆฌํ”„๋กœ์„ธ์„œ๊ฐ€ ์ ์€ ํ…์ŠคํŠธ๋ฅผ ์ฝ”๋“œ๋กœ substituteํ•˜๊ณ   3. ์ปดํŒŒ์ผ๋Ÿฌ๊ฐ€ sourcecode ๋ฅผ object code ๋กœ convert ํ•ด 4. ์ปด์ฐจ์ผ์ด ๋˜๋ฉด ๋ง์ปค๊ฐ€ ๋ญ”๊ฐ€ ๊ฒฐ๊ณผ๋ฅผ ๋‚ด๊ธฐ์œ„ํ•ด์„œ ๋งค์น˜๋ฅผ ๋งํฌ๋ฅผ ํ•จ 5. ๋กœ๋”ฉ์„ ํ•จ 6. ๊ฒฐ๊ณผ๋ฅผ ๋ƒ„ ???

 

 

/**
 *  @author Jimin
 *  @date Thu Aug 31
 *  @file h01.cpp
 */ -> (1) documentation comment
 
#include <iostream>
#include <string>
#include <iomanip> // -> (2) standard library

using namespace std; // -> (3) namespace directive

double convert(double temp); // -> (4) function prototype 

int main()
{
cout << "Enter a temperature in ํ™”์”จ"; // -> (6) prompt
double fahr; // -> (7) variable statement 
cin >> fahr;
double celsius = convert(fahr); //-> (9) function call 
cout << "Converted: " << fanhr << "F -" << celsius << "C" << endl; // -> (10) output statement 
return 0; // -> (11) optional return 

double convert(double temp) // -> (14) parameter
{
return (temp -32 ) * 5.0 /9.0; // -> (13) expression
} 
// -> (12) function definition
 
1. Provides an initial value for a variable when it is created.
 - initialization
2. Associates a name with a type.
- declaration
3. Allocates memory for a new variable.
- definition
4. Types like the string type.
- library types
5. Places a value into an existing variable.
- assignment 
 
6. A set of bits interpreted according to a type.
- value        
'เซฎโ‚หถแต” แต• แต”หถโ‚Žแƒโ™ก/coding' Related Articles +