Sign in Join
Wiki copytemporary

Lazarus Inline Assembler/ko: what changed

Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.

Title: Lazarus Inline Assembler/ko

OldNewLine
1+이것은 다른 사람들이 많은 기여를 할 수 있게하는 역활을 하게 하려고 한 것이다. 다음은 시작하깅 아주 간단한 예제이다:
2+
3+``` pascal
4+unit unt_asm;
5+{$mode objfpc}{$H+}
6+interface
7+uses
8+ Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls;
9+type
10+ { TForm1 }
11+ TForm1 = class(TForm)
12+ btnGo: TButton;
13+ edtInput: TEdit;
14+ edtOutput: TEdit;
15+ Label1: TLabel;
16+ Label2: TLabel;
17+ procedure btnGoClick(Sender: TObject);
18+ private
19+ { private declarations }
20+ public
21+ { public declarations }
22+ end;
23+var
24+ Form1: TForm1;
25+implementation
26+{ TForm1 }
27+
28+procedure TForm1.btnGoClick(Sender: TObject);
29+var
30+ num, answer : integer;
31+begin
32+ num := StrToInt(edtInput.Text);
33+ //이것은x86 상에서 라자루스가 있어야한다.
34+ {$ASMMODE intel}
35+ asm
36+ MOV EAX, num
37+ ADD EAX, 110B //이진수 110을 더한다
38+ SUB EAX, 2 //십진수 2를 뺀다
39+ MOV answer, EAX
40+ end;
41+ edtOutput.Text := IntToStr(answer);
42+end;
43+
44+initialization
45+ {$I unt_asm.lrs}
46+end.
47+```
48+
49+## 더 볼 것
50+
51+- [[VirtualTreeview Example for Lazarus]]
52+
53+---
54+*From the Free Pascal wiki, page "Lazarus Inline Assembler/ko", as it stood on 2020-02-18 after a change by Trev, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*

Back to history