home *** CD-ROM | disk | FTP | other *** search
- ; TEST PROGRAM FOR UNREAL MODE !!!
- ; By D.Paccaloni == paccalon@linux.infosquare.it
- ; or paccalon@ghost.dsi.unimi.it
- ; Assembler used: Borland TASM
- ; No DOS extenders needed !!! Just assemble, link and run !!!
-
- .386 ;We are using 386 instructions !!!
-
- Code SEGMENT para public use16 "code"
- ASSUME cs:code
-
- ; Here is how you DID it in normal REAL mode before:
- ; REMARK: Simple program that prints on the text screen a green flashing
- ; "smiley face" character.
-
- mov ax,0b800h ;Get start of text memory segment..
- mov ds,ax ; ..in DS
- mov word ptr [ds:140h],8202h ;Now put on screen a green flashing..
- ; .."smiley face" character !!!
-
- ; Here is how you DO it in new UNREAL mode:
- ; REMARK: UNREAL program that prints a red flashing heart on the right
- ; of the "smiley face" (see above).
- ; If you have not run UNREAL.EXE before, your machine HANGS UP
- ; before printing the red heart !!!
-
- mov ax,0 ;Segments ? What are segments ???
- mov ds,ax ;DS = 0 !!! LET'S USE FLAT MEMORY !!!
- mov word ptr [ds:0b8142h],8403h
- ; ^^^^^^^^^^ FLAT MEMORY ABSOLUTE ADDRESS OF TEXTMEM!
-
- ;Well, if you see a RED flashing "heart" on the right of
- ;the green one then IT WORKS !
- ;Otherwise, if your machine hangs up and you have to reset you didn't
- ;run UNREAL.EXE before this program.
-
- mov ax,4c00h ;All done now. Terminate process and..
- int 21h ; ..return to DOS.
-
- Code ENDS
- END
-