Assembly

Bahasa rakitan atau lebih umum dikenal sebagai Assembly adalah bahasa pemrograman tingkat rendah yang digunakan dalam pemrograman komputer, mikroprosesor, pengendali mikro, dan perangkat lainnya yang dapat diprogram. Bahasa rakitan mengimplementasikan representasi atas kode mesin dalam bentuk simbol-simbol yang secara relatif lebih dapat dipahami oleh manusia. Berbeda halnya dengan bahasa-bahasa tingkat tinggi yang berlaku umum, bahasa rakitan biasanya mendukung secara spesifik untuk suatu ataupun beberapa jenis arsitektur komputer tertentu. Dengan demikian, portabilitas bahasa rakitan tidak dapat menandingi bahasa-bahasa lainnya yang merupakan bahasa pemrograman tingkat tinggi. Namun demikian, bahasa rakitan memungkinkan programmer memanfaatkan secara penuh kemampuan suatu perangkat keras tertentu yang biasanya tidak dapat ataupun terbatas bila dibuat dengan menggunakan bahasa pemrograman tingkat tinggi.

Pada bahasa rakitan, programmer umumnya menggunakan sebuah program utilitas yang disebut sebagai perakit (bahasa Inggris: assembler) yang digunakan untuk menerjemahkan kode dalam bahasa rakitan tersebut ke dalam kode mesin untuk perangkat keras tertentu. Sebuah perintah dalam bahasa rakitan biasanya akan diterjemahkan menjadi sebuah instruksi mnemonic dalam kode mesin, berbeda halnya dengan kompiler pada bahasa pemrograman tingkat tinggi yang menerjemahkan sebuah perintah menjadi sejumlah instruksi dalam kode mesin.

Beberapa perangkat lunak bahasa rakitan terkenal biasanya menyediakan tambahan fitur untuk memfasilitasi proses pengembangan program, mengontrol proses perakitan, dan alat bantu ”debugging”.

Dasar alasan menggunakan bahasa rakitan

Ada beberapa dasar alasan menggunakan bahasa rakitan dilihat dari sudut pandang penggunaannya:

  • Bahasa rakitan dibandingkan dengan bahasa mesin, bahasa rakitan merupakan representasi atas bahasa mesin yang dirancang agar lebih mudah dipahami oleh manusia. Dengan menggunakan bahasa rakitan, seorang programmer dapat lebih mudah mengingat instruksi-instruksi dengan menggunakan simbol yang lebih dimengerti dibandingkan bila menggunakan simbol mnemonic kode mesin secara langsung. Demikian halnya pula dengan mekanisme lompatan yang umum terdapat dalam bahasa mesin yang biasanya menggunakan alamat memori, programmer dapat lebih mudah menggunakan fasilitas pelabelan yang terdapat pada bahasa rakitan dibandingkan menggunakan alamat memori tertentu dalam kode mnemonic.
  • Bahasa rakitan dibandingkan dengan bahasa tingkat tinggi, bahasa rakitan memungkinkan programmer untuk mengontrol serta memanfaatkan secara penuh kapabilitas yang terdapat atas suatu perangkat keras, berbeda halnya dengan bahasa pemrograman tingkat tinggi yang memiliki banyak keterbatasan dalam pemanfaatan secara penuh suatu perangkat keras. Bahasa rakitan menjanjikan tingkat unjuk kerja yang maksimum karena sifatnya yang menerjemahkan secara langsung instruksi rakitan menjadi instruksi mesin, berbeda halnya dengan bahasa pemrograman tingkat tinggi yang biasanya menerjemahkan sebuah instruksi menjadi sejumlah kode mesin.

Representasi kode mesin

Bahasa rakitan menerjemahkan sebuah instruksi rakitan menjadi instruksi mesin, umumnya mekanisme penerjemahan ini bersifat 1-1, karenanya dapat disebutkan pula bahwa setiap instruksi dalam bahasa rakitan merupakan representasi dari instruksi kode mesin.

Sebagai contoh, berikut adalah instruksi yang digunakan pada prosesor x86 untuk memindahkan nilai 97 sebesar 8-bit ke dalam register prosesor AL. Kode biner atas instruksi pemindahan adalah 10110 diikuti dengan 3-bit pengenal atas register yang akan digunakan. Pengenal atas register AL dalam hal ini adalah 000. Kemudian, nilai 97 dalam kode biner adalah 01100001, sehingga kode mesin yang digunakan untuk memindahkannya adalah sebagai berikut:

10110000 01100001

Kode biner ini dapat diubah agar lebih mudah dibaca manusia dengan mengkonversikannya dalam bilangan heksadesimal sebagai berikut:

B0 61

Pada instruksi diatas, B0 berarti: ‘Pindahkan nilai berikut ke register AL’, dan 61 adalah representasi bilangan heksadesimal untuk nilai 01100001, atau 97 dalam bilangan desimal. Bahasa rakitan untuk prosesor Intel menyediakan simbol mnemonic MOV (yang merupakan singkatan dari move) untuk instruksi serupa sehingga kode mesin sebelumnya dapat ditulis dalam bahasa rakitan sebagai berikut:

MOV AL, 61h       ; Isi register AL dengan nilai 97 (61h)

Bahasa rakitan memungkinkan programmer menambahkan komentar atas setiap instruksi yang ditulis untuk mempermudah pembacaan dan lebih mudah pemahaman.

source

Komentar
  1. grosir baju bayi berkata:

    Wow, marvelous blog layout! How long have you been blogging for? you made blogging look easy. The overall look of your website is fantastic, let alone the content!. Thanks For Your article about Assembly Secarik Kertasâ„¢ .

  2. I simply want to mention I’m all new to blogging and definitely savored you’re web-site. Likely I’m want to bookmark your blog post . You actually have wonderful well written articles. Appreciate it for revealing your web-site.

  3. healthy hair berkata:

    I simply want to tell you that I am just new to blogging and seriously enjoyed your web blog. Almost certainly I’m going to bookmark your site . You actually come with impressive article content. Cheers for revealing your blog.

  4. grow hair faster berkata:

    I just want to mention I am new to blogging and site-building and honestly loved you’re web-site. Very likely I’m planning to bookmark your site . You definitely come with fantastic articles. Thanks for sharing with us your web-site.

  5. There may be noticeably a bundle to learn about this. I assume you made sure nice points in options also.

  6. This Site berkata:

    Very interesting information!Perfect just what I was searching for!

  7. Ginny Demry berkata:

    Well, see, here’s the thing. While I agree with what you’ve said, you could be so much more convincing if you could supply more detail and reference. However, I’ve enjoyed your post, thank you for putting in the time!

  8. How come you dont have your web site viewable in wap format? cant see anything in my iPhone.

  9. chair mats berkata:

    quite helpful material, in general I picture this is worthy of a bookmark, cheers

  10. This is the punish Assembly Secarik Kertasâ„¢ blog for anyone who wants to act out out about this substance. You remark so much its near tiring to fence with you (not that I really would want…HaHa). You definitely put a new stunting on a topic thats been scripted some for age. Discriminating nonsense, simply eager!

  11. fairly valuable stuff, in general I picture this is worthy of a book mark, thanks

  12. If you dont mind, exactly where do you host your site? I am shopping for a very good host and your site appears to be fast and up just about all the time

  13. Just discovered this blog thru Yahoo, what a way to brighten up my year!

  14. More hints berkata:

    Core Criteria In pennsylvania truck accident lawyer – Uncovered Guidance

  15. chairmats berkata:

    If you dont mind, exactly where do you host your web page? I am shopping for a good host and your site seams to be quick and up most the time

  16. Suzette Haydel berkata:

    Awsome website! I am loving it!! Will be back later to read some more. I am taking your feeds also

  17. Good website, wonderful content material, clear write article, simply no add-ons over site along with just what most critical: you’re posting along with meaning! Recover the cash of site have got introducing report using a lot ####, just for the web site watch. But here’ can easily relax, take it easy and browse some thing excellent.

  18. supletivo online berkata:

    Hi, perhaps there is any kind of chance for connection with the article author of this article? I have a few inquiries, however, e-mail handle inside save does not work i don’t know whether the problem will lie upon my personal aspect or the one you have. Thanks a lot and finest relation.

  19. here berkata:

    Nice post ! Thanks for, posting on my blog dude. Ill message you some time! I didnt realise that.

  20. I just now wanted to thank you once more for this amazing blog you have designed here. It really is full of useful tips for those who are actually interested in this subject, particularly this very post. Your all really sweet in addition to thoughtful of others plus reading your blog posts is a great delight in my experience. And what generous treat! Mary and I really have excitement making use of your tips in what we need to do in a few weeks. Our record is a distance long and simply put tips will be put to very good use.

  21. consumers berkata:

    I love your wordpress design, where did you get a hold of it?

  22. deals marseille berkata:

    Even though I actually like this post, I think there was an punctuational error near to the finish of the third paragraph.

  23. Hollie Alpizar berkata:

    Very efficiently written story. It will be useful to everyone who utilizes it, as well as yours truly :). Keep doing what you are doing – for sure i will check out more posts.

  24. Chong Geibig berkata:

    I have been surfing online more than three hours today, yet I never found any interesting article like yours. It’s pretty worth enough for me. In my view, if all website owners and bloggers made good content as you did, the net will be a lot more useful than ever before.

  25. Dennis Freibert berkata:

    Aw, this was a very nice post. In idea I want to put in writing like this moreover – taking time and actual effort to make a very good article… however what can I say… I procrastinate alot and certainly not appear to get something done.

Beri Komentar Disini