flat assembler
Message board for the users of flat assembler.

Index > Heap > hello via lpt

Author
Thread Post new topic Reply to topic
shoorick



Joined: 25 Feb 2005
Posts: 1605
Location: Ukraine
shoorick
Code:
;=========================================
    rom_size  = 800h
    rom_start = 100000h - rom_size
    rom_empty = 0FFh
;=========================================
    use16
;-----------------------------------------
start:
    mov dx,378h
    mov al,0
next:
    out dx,al
    mov cx,07FFFh
delay:
    loop delay
    not al
    jmp next 
;-----------------------------------------
    times rom_size - 16 - $ db rom_empty
;-----------------------------------------
boot:
    jmp (rom_start shr 4):start
;-----------------------------------------
    times rom_size - $ db rom_empty
;=========================================    

this not remarkable program was written into ROM emulator and run on 386 board with no video, no RAM and no original BIOS - only inserted basic LPT Wink


Description: board view
Filesize: 27.93 KB
Viewed: 5369 Time(s)

lpt386_.jpg



_________________
UNICODE forever!


Last edited by shoorick on 31 Jan 2016, 19:58; edited 1 time in total
Post 21 Jan 2008, 11:12
View user's profile Send private message Visit poster's website Reply with quote
MHajduk



Joined: 30 Mar 2006
Posts: 6029
Location: Poland
MHajduk
shoorick wrote:
hello via lpt
For me it rather looks like S.O.S in Morse code (3 x 3 light impulses). Wink This device says: "Help me! I have no video, no RAM, no BIOS!". Wink

Anyway, it's a good work. Smile
Post 21 Jan 2008, 13:46
View user's profile Send private message Visit poster's website Reply with quote
shoorick



Joined: 25 Feb 2005
Posts: 1605
Location: Ukraine
shoorick
i thought he said: "pirlim-pirlim" Wink
Post 21 Jan 2008, 13:52
View user's profile Send private message Visit poster's website Reply with quote
MHajduk



Joined: 30 Mar 2006
Posts: 6029
Location: Poland
MHajduk
BTW, here is fine Morse code on-line translator written in Java: http://morsecode.scphillips.com/jtranslator.html. It translates from/to Morse code and even emulates sound effects of the telegraphist's work (push "Play" button). Smile
Code:
Hello, FASM coders

.... . .-.. .-.. --- --..-- / ..-. .- ... -- / -.-. --- -.. . .-. ...    
Post 21 Jan 2008, 14:03
View user's profile Send private message Visit poster's website Reply with quote
shoorick



Joined: 25 Feb 2005
Posts: 1605
Location: Ukraine
shoorick
ok Wink
maybe i will assemble soon this construction and implement something more "intellectual"

generally, it is bios replacement, while it would be better to use rom extension way, which are searching and running while boot, but then i need to make additional board with rom socket (or use something like ex-LAN card or so)
-----------
a while it is "an oscillator on a single pc"
Post 21 Jan 2008, 14:57
View user's profile Send private message Visit poster's website Reply with quote
Vov4ik



Joined: 20 May 2007
Posts: 28
Location: USSR, Moscow Region
Vov4ik
Nice blinkenlight :-) But using milliard of transistors instead of two ones is blasphemous ;-))) We are waiting for ROMDOS :-)
Joking apart, i think, it is possible to place some code at two locations: 1st way is to take a ROM, twice larger then original one and write BIOS in its low part and your code at high part. Jumping to your code may be done by setting int 18h handler to your code or by jumping to it from BIOS.
Another variant -- use two ROMs, attached parallelly and select one of them by signal at any port. But all this ways require changing/disassembling BIOS.
Second way is to place a code into ISA card's ROM, it will be automatically called by BIOS at boot.
Post 21 Jan 2008, 16:30
View user's profile Send private message ICQ Number Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4225
Location: 2018
edfed
about lpt programming and hardware, you can make a very simple board to take control aof anything, like stepper motors or led driving...
for exemple, i've made a little board to dispaly text with leds via lpt.
can be used to make an oscilloscope too.
the motor turns and the leds will show the message or sjgnals if they are monted on a weel... very fun thing. don't forget to connect leds via resistors, 560 ohms resistors are ok to limit the current to an acceptable value.

about rom, you can build a simple lpt uvprom programmer by using a 68HC11 or a 80196.

if no ┬ÁC are permitted in your project, you can also mak it with TTL logic.

note: some sdram chips exists with a little battery and permit to program it without errasing the memory in an UV oven.
BIOS is generally composed of two chips on theses old boards, one for odd bytes, and the other for even bytes.
Post 22 Jan 2008, 03:37
View user's profile Send private message Visit poster's website Reply with quote
shoorick



Joined: 25 Feb 2005
Posts: 1605
Location: Ukraine
shoorick
as i already told, i've been using bios socket for my rom program only to not make additional board. generally, to insert own code into real bios no need to disassemble it hard - there is a lot of free space there usually (you may meet repeating "Copyright by ..." there or something similar filling for empty place) - it is possible to insert own code there, but these two ways are not preffered. it is better to make additional extension card with rom socket and possible own hardware to make more universal device.
usage of microcontrollers gives small size and power comsumption etc., but with this way you have ready working board with powerfull cpu, well known to you Wink such usage may save their "life" to not throw them out Smile
Post 22 Jan 2008, 05:58
View user's profile Send private message Visit poster's website Reply with quote
delta67



Joined: 18 Jul 2012
Posts: 19
delta67
I want to initialise a 2x16 LCD module, connected to an 8088 SBC but my code didn't work!!
There's NO ram on the board

Code:
; 2x16 LCD module connected to the 8088 SBC via 8255 PIO:
; - D4-D7 are connected to portC C4-C7
; - RS is connected to PORTC C0
; - E is connected to portB B0
; 8255 : PORTA= 00    PORTB=01    PORTC=02      PORT COMMAND=03
;=========================================
    rom_size  = 2000h ; for a 8K octet EPROM you should set the rom_size to $2000
    rom_start = 100000h - rom_size
    rom_empty = 0FFh
;=========================================
    use16
;-----------------------------------------
start:
  ; init 8255
 mov al, 80h  ; MODE 0 and  all ports as outputs
     out 03h, al ; envoi sur command port
        

  ;  wait  >15mS
    mov cx,07FFFh  ; ?? s
delay1:
    loop delay1
  
    mov bl, 03h   ;  send  "3" three times to initialize the LCD in mode 8bits
        mov al, 030h
        out 02, al ;  send  first "3" on  C4-C7  , RS=0
again: mov al, 01h  
       out 01h, al  ; portB B0=1  (E=1)
    nop
 nop
 mov al, 00h   
      out 01h, al  ; E=0


  ;   wait >5mS
    mov cx,01FFFh
delay2:
    loop delay2
     
    dec bl   ; "3" sent 3 times?
      jnz again  ; NO , then repeat
       ; YES , now LCD is in 8bits mode 8 
 ;----------------------------------------------
     
    mov al, 020h ; mode 4bits
   out 02h, al ;  send "2" on C4-C7  , RS=0
  mov al, 01h  
       out 01h, al  ; portB B0=1  (E=1)
    nop
 nop
 mov al, 00h   
      out 01h, al  ; E=0
  
    ;   wait 5mS
         mov cx,0FFFh
delay3:
    loop delay3
     
    ;       At this point, the normal 4 wire command routine can be used 
       ;---------------------------------------------------------------------------------
  ; Now we send the command "28h"  Function set, 4 wire, 2 lines, 5x7 font
  mov al, 020h ; 
     out 02h, al ;   send "2" on C4-C7  , RS=0
 out 01h, al  ; portB B0=1  (E=1)
    nop
 nop
 mov al, 00h   
      out 01h, al  ; E=0
  nop
 
    mov al, 080h ; 
     out 02h, al ;   send "8" on C4-C7  , RS=0
 mov al, 01h  
       out 01h, al  ; portB B0=1  (E=1)
    nop
 nop
 mov al, 00h   
      out 01h, al  ; E=0
  
    ;   wait 5mS
        mov cx,0FFFh
delay4:
    loop delay4
      ;---------------------------------------------------------------------------------
  ; Now we send the command "0Ch"   = Display on, cursor off,  blink off
    ; mov al, 00h ;  AL is already cleared
      out 02h, al ;  send "0" on C4-C7  , RS=0
  mov al, 01h  
       out 01h, al  ; portB B0=1  (E=1)
    nop
 nop
 mov al, 00h   
      out 01h, al  ; E=0
  nop
 
    mov al, 0C0h ; 
     out 02h, al ;   send "C" on C4-C7  , RS=0
 mov al, 01h  
       out 01h, al  ; portB B0=1  (E=1)
    nop
 nop
 mov al, 00h   
      out 01h, al  ; E=0
  
    ;   wait 5mS
        mov cx,0FFFh
delay5:
    loop delay5
 
         ;---------------------------------------------------------------------------------
  ; Now we send the command "06h"   = Address increment, no scrolling
       
    ; mov al, 00h ;  AL is already cleared
      out 02h, al ;   send "0" on C4-C7  , RS=0
 mov al, 01h  
       out 01h, al  ; portB B0=1  (E=1)
    nop
 nop
 mov al, 00h   
      out 01h, al  ; E=0
  nop
 
    mov al, 060h ; 
     out 02h, al ;   send "6" on C4-C7  , RS=0
 mov al, 01h  
       out 01h, al  ; portB B0=1  (E=1)
    nop
 nop
 mov al, 00h   
      out 01h, al  ; E=0
  
    ;   wait 5mS
        mov cx,0FFFh
delay6:
    loop delay6
      
    
    ;---------------------------------------------------------------------------------
  ; Now we send the command "01h"  Clear LCD command
        
    ; mov al, 00h ;  ALis already cleared
       out 02h, al ;   send "0" on C4-C7  , RS=0
 mov al, 01h  
       out 01h, al  ; portB B0=1  (E=1)
    nop
 nop
 nop
 mov al, 00h   
      out 01h, al  ; E=0
  nop
 
    mov al, 010h ; 
     out 02h, al ;   send "1" on C4-C7  , RS=0
 mov al, 01h  
       out 01h, al  ; portB B0=1  (E=1)
    nop
 nop
 nop
 mov al, 00h   
      out 01h, al  ; E=0
  
    ;   wait 5mS
        mov cx,0FFFh
delay7:
    loop delay7
      
;============================================= 
;        Send a character data to LCD
        ;write 'E'   (45h)  to the LCD
    mov al, 041h    
    out 02h, al ;   send "4" on C4-C7  , 1 on C0 (RS=1)
       nop
 nop
 mov al, 01h  
       out 01h, al  ; portB B0=1  (E=1)
    nop
 nop
 mov al, 00h   
      out 01h, al  ; E=0
  nop
 
    mov al, 051h   
     out 02h, al ;   send "5" on C4-C7  ,1 on C0 (RS=1)
        nop
 nop
 mov al, 01h  
       out 01h, al  ; portB B0=1  (E=1)
    nop
 nop
 mov al, 00h   
      out 01h, al  ; E=0
  
;=============================
          hlt   ; stop    
;-----------------------------------------
    times rom_size - 16 - $ db rom_empty ; on remplit l'espace vide par FFh sauf les derniers 16 octets
;-----------------------------------------
boot:             ; vecteur reset : FFFF0
    jmp (rom_start shr 4):start
;-----------------------------------------
    times rom_size - $ db rom_empty ; on remplit le rest vide du 16 octets
    
    
    
        
Post 20 Jul 2012, 16:23
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Copyright © 1999-2019, Tomasz Grysztar.

Powered by rwasa.