Laptop Screens & LCD Panels

Best Price Laptop Screen & LCD Panels

Archive for the ‘resources’ tag

Assembly Display

without comments

Assembly Display
Write lines of code in assembly language to display a character ‘B’ at 20th row and?

Um...

You can write directly to the framebuffer, or use terminal codes. I will presume terminal codes. Most terminals repond to ANSI sequences.

To position the cursor to row 20, column 5, you will have to send

ESC [ 20 ; 5 H

(with no spaces).

Assuming Intel assembler (using NASM), running on a Linux (or unix-like) platform, the assembler would look like:

; vim: set ft=asm ts=8 sts=8 sw=8 ai et :
; :asmsyntax=nasm
; tabs 9,17,33,71
;
; PROJECT: POSITION
; FILE: DUMB.ASM
; AUTHOR: FRED WEIGEL
; DATE WRITTEN: OCTOBER 19, 2009
; DATE MODIFIED: OCTOBER 19, 2009

GLOBAL main
EXTERN write,exit

DATA: DB 01BH,'[20;5HB'
main:
MOV EAX,8 ; LENGTH OF DATA
PUSH EAX
MOV EAX,DATA
PUSH EAX
MOV EAX,1
PUSH EAX
CALL write ; WRITE(1,DATA,8)
MOV EAX,0
PUSH EAX
CALL exit ; EXIT(0)

END

To build this:

nasm -f elf -o dumb.o dumb.asm
gcc -o dumb dumb.o

would do. We use gcc to invoke the system linker, to bind in the needed system calls (in this case "write" and "exit"). Note that you could use INT 80H to accomplish this as well, and bypass any run-time library support. However, this technique is beyond this introduction.

Edit: fixed asm to actually display the "B", and illustrate use of LEA instruction.

DELL STUDIO XPS 1340 133 LED LCD DISPLAY COMPLETE SCREEN ASSEMBLY BLACK CWFGN
DELL STUDIO XPS 1340 133 LED LCD DISPLAY COMPLETE SCREEN ASSEMBLY BLACK CWFGN
Paypal   US $79.99
Gateway M320 Laptop 15 LCD Display Screen Assembly
Gateway M320 Laptop 15 LCD Display Screen Assembly
Paypal   US $19.99
Dell Latitude C600 C500 Laptop 14 LCD Display Assembly
Dell Latitude C600 C500 Laptop 14 LCD Display Assembly
Paypal   US $29.85
Dell Latitude C640 C610 Laptop 14 LCD Display Assembly
Dell Latitude C640 C610 Laptop 14 LCD Display Assembly
Paypal   US $38.85
Dell Latitude D600 D500 Laptop 14 LCD Display Assembly
Dell Latitude D600 D500 Laptop 14 LCD Display Assembly
Paypal   US $38.85
661 5470 Glossy Display Assembly with AirPort Antenna 17inch i5 i7 Macbook Pro
661 5470 Glossy Display Assembly with AirPort Antenna 17inch i5 i7 Macbook Pro
Paypal   US $200.00
A1286 2010 15 Unibody Macbook Pro LCD Screen Display Assembly Repair Part 154
A1286 2010 15 Unibody Macbook Pro LCD Screen Display Assembly Repair Part 154
Paypal   US $439.99
156 LCD Screen Display assembly for ASUS G51
156 LCD Screen Display assembly for ASUS G51
Paypal   US $52.00
EXCELLENT Cond 2011 Macbook Pro 13 A1278 Complete Display Screen Assembly
EXCELLENT Cond 2011 Macbook Pro 13 A1278 Complete Display Screen Assembly
Paypal   US $299.99
Macbook Air 116 14 16GHz A1370 OEM LCD LED Screen Display Assembly A GLP
Macbook Air 116 14 16GHz A1370 OEM LCD LED Screen Display Assembly A GLP
Paypal   US $436.50
NEW ORIGINAL Macbook Pro A1278 13 LCD Display Screen Assembly model 2009 2010
NEW ORIGINAL Macbook Pro A1278 13 LCD Display Screen Assembly model 2009 2010
Paypal   US $499.00
Macbook Pro 15 22Ghz or 24Ghz LCD Display Assembly
Macbook Pro 15 22Ghz or 24Ghz LCD Display Assembly
Paypal   US $150.00
View Page:   1  2  3  4
Powered by phpBay Pro

LCD DISPLAY NOKIA E66,E66i TROCA, DISSASSEMBLY, assembly PAULO.CRUZZZ@HOTMAIL.COM

Written by admin

December 17th, 2010 at 12:54 am