home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 23 / IOPROG_23.ISO / SOFT / ASM / UNREAL10.ZIP / TEST.ASM < prev    next >
Encoding:
Assembly Source File  |  1995-03-14  |  1.4 KB  |  42 lines

  1. ; TEST PROGRAM FOR UNREAL MODE !!!
  2. ; By D.Paccaloni == paccalon@linux.infosquare.it
  3. ;         or paccalon@ghost.dsi.unimi.it
  4. ; Assembler used: Borland TASM
  5. ; No DOS extenders needed !!! Just assemble, link and run !!!
  6.  
  7. .386    ;We are using 386 instructions !!!
  8.  
  9. Code    SEGMENT para public use16 "code"
  10.     ASSUME    cs:code
  11.  
  12. ; Here is how you DID it in normal REAL mode before:
  13. ; REMARK: Simple program that prints on the text screen a green flashing
  14. ;      "smiley face" character.
  15.  
  16.     mov    ax,0b800h        ;Get start of text memory segment..
  17.     mov    ds,ax            ; ..in DS
  18.     mov    word ptr [ds:140h],8202h ;Now put on screen a green flashing..
  19.                      ; .."smiley face" character !!!
  20.  
  21. ; Here is how you DO it in new UNREAL mode:
  22. ; REMARK: UNREAL program that prints a red flashing heart on the right
  23. ;      of the "smiley face" (see above).
  24. ;      If you have not run UNREAL.EXE before, your machine HANGS UP
  25. ;      before printing the red heart !!!
  26.  
  27.     mov    ax,0            ;Segments ? What are segments ???
  28.     mov    ds,ax            ;DS = 0 !!! LET'S USE FLAT MEMORY !!!
  29.     mov    word ptr [ds:0b8142h],8403h
  30.             ; ^^^^^^^^^^ FLAT MEMORY ABSOLUTE ADDRESS OF TEXTMEM!
  31.  
  32. ;Well, if you see a RED flashing "heart" on the right of
  33. ;the green one then IT WORKS !
  34. ;Otherwise, if your machine hangs up and you have to reset you didn't
  35. ;run UNREAL.EXE before this program.
  36.  
  37.     mov    ax,4c00h        ;All done now. Terminate process and..
  38.     int    21h            ; ..return to DOS.
  39.  
  40. Code    ENDS
  41.     END
  42.