Category : Assembly Language Source Code
Archive   : PROTEC.ZIP
Filename : MACRO3

 
Output of file : MACRO3 contained in archive : PROTEC.ZIP
;MACRO3

;---------------------------------------------
; STEP 5:
; message define area + mini-keyboard table
;---------------------------------------------

in_protected db 'Now in protected mode',0
in_real db 'Now in real mode ',0
int_msg db 'interrupt '
int_num dw ?
db 'H normal exit',0
db 8 dup(0) ;adjust
ex_cept db '= Exception - see HELP 7',0
pres_F9 db 'Press F9 to go to top of GS segment',0
loc_ate db 'location in segment',0
val_ue db 'byte values in segment',0
wh_en db 'When GS overruns at 1000h then',0
int_err db 'Interrupt 0DH = General Protection Fault',0
ty_ped: db 'C:\PROTECT\TYPED.DAT',0,0 ;file name
this_fs db ' this is real mode`s seg zero diz in protected mode ',0
he_lp: db 'F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 for help',0
db 5 dup(2ah) ;5 asterisks to ident location
count1 db 0 ;kybd repeat delay pointer
las_one db 0 ;previous keyboard character
line dw ? ;kybd's position on line count
savdi dw ? ;keyboard's line begin/position
savdi1 dw ? ;disp_it's next line begin
savdi2 dw ? ;help's save cursor location
savdi3 dw ? ;sim_edmod segment location
savdi4 dw ? ;display control/debug regs
savsi dw ? ;help 1 2 3 screen pointer
savsi2 dw ? ;used in setting seg regs
savsi3 dw ? ;used in diz interrupt table
savsi4 dw ? ;unused
dw 0
savax dw 0 ;used for set FS segment
dw 0
savbx dw 9000h ;used for set GS segment
dw 0
savcx dw 0 ;used to hold old FS segment
savdx dw 0
savds dw 0
sav_paj db ? ;which page help is on
sav_char dw ? ;last character (arrows use)
sav_any: db 0,0,0,0,0,0,0,0,0 ;used in diz_anything
sav_reg: db 0,0,0,0,0,0,0,0,0 ;used in CS DS ES FS GS +
sav_reg2: db 0,0,0,0,0,0,0,0,0 ;used in cr`s dr`s & flags
sav_seg: db 0,0,0,0,0,0,0,0,0 ;used in F12
sav_seg2: db 0,0,0,0,0,0,0,0,0 ;used in interrupt seg
sav_seg3: db 0,0,0,0,0,0,0,0,0 ;used in interrupt seg
edm_seg: db 0,0,0,0,0,0,0,0,0 ;used in sim_edmod
sav_del db 0,0,0,0,0,0,0,0,0 ;used in displaying segments
sav_sp db 0,0,0,0,0,0,0,0,0 ;used in diz stack pointer
array db 7,8,9,0,4,5,6,0,1,2,3,0 ;keypad diz 0 - 255
cra: db 'control reg CR0 = ',0
crb: db 'control reg CR2 = ',0
crc: db 'control reg CR3 = ',0
crd: db 'debug reg DR0 = ',0
cre: db 'debug reg DR1 = ',0
crf: db 'debug reg DR2 = ',0
crg: db 'debug reg DR3 = ',0
crh: db 'debug reg DR6 = ',0
cri: db 'debug reg DR7 = ',0
crj: db 'flags reg = ',0
saval db ? ;if set, skip welcome page
savbl db ? ;if set, display las_char
savcl db 4 ;nominal keyboard delay
dw 0
savch db 0 ;if set do not dupe Print Scrn
savdl db 33 ;33=fsseg 34=gsseg in HELP 9
savdh db 0 ;pointer to jmp to int_table

ta_ble: ;mini-kybd decode lower case
db 'þ1234567890-=áƒqwertyuiop[]ˆ€asdfghjkl;``ô\'
db 'zxcvbnm,./➄ ›ŸŸŸŸŸŸŸŸŸŸ¥ë'

ta_ble2: ;mini-kybd decode UPPER CASE
db 'þ[email protected]#$%^&*()_+áƒQWERTYUIOP{}ˆ€ASDFGHJKL:"~ô|'
db 'ZXCVBNM<>?➄ ›ŸŸŸŸŸŸŸŸŸŸ¥ë'

;=Esc á=backspace ƒ=tab ˆ=enter €=Ctrl ô=left shift â=right shift
;ž=PrtSc „=Alt ›=CapsLock Ÿ=F keys ¥=NumLock ë=Scrlock =keypad keys

hold_video: ;save screen while help display
db 4000 dup(?) ;or working in EDMOD


help1:
db 'ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»',0dh
db 'º PROTECTED MODE HELP 1 º',0dh
db 'ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹',0dh
db 'º This modified program uses a KISS mini- º',0dh
db 'º keyboard decode routine. º',0dh
db 'º º',0dh
db 'º Enter beginning next line down º',0dh
db 'º backspace erases & moves back a byte º',0dh
db 'º arrow keys PgUp PgDn Home are active º',0dh
db 'º Alt+C or c cls all inside rectangle º',0dh
db 'º Alt+keypad 3 digits for 0-255 ASCII º',0dh
db 'º F2 8 pages more information º',0dh
db 'º F3 segments size and addresses º',0dh
db 'º F4 EDMOD.OBJ typical page º',0dh
db 'º F5 speed up/slow down keyboard º',0dh
db 'º F6 Print Screen subroutine º',0dh

db 'º F7 Pentium protected exceptionsº',0dh
db 'º F8 display all CS DS ES FS GS º',0dh
db 'º F9 set FS/GS seg to 0000h-F000hº',0dh
db 'º F10 diz control-debug-flag regs º',0dh
db 'º F11 shift F1 thru shift F12 menuº',0dh
db 'º F12 Interrupt Descriptor Table º',0dh
db 'º Ctrl go Edmod - Del ret protectedº',0dh
db 'º Please read EN.DOC in C:\PROTECT º',0dh
db 'ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ',0

help3:
db 'ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»',0dh
db 'º PROTECTED MODE HELP 3 º',0dh
db 'ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹',0dh
db 'º Here in protected mode are the segments º',0dh
db 'º and pointer values currently in use. º',0dh
db 'º º',0dh
db 'º value size º',0dh
db 'º CS segment: FFFFh º',0dh
db 'º DS segment: FFFFh º',0dh
db 'º ES segment: FFFFh º',0dh
db 'º FS segment: FFFFh º',0dh
db 'º GS segment: FFFFh º',0dh
db 'º SS segment: privilege 0 FFh º',0dh
db 'º SS segment: privilege 1 FFh º',0dh
db 'º SS segment: privilege 2 FFh º',0dh
db 'º SP pointer: º',0dh
db 'º º',0dh
db 'º Add a 0 to segment values if you wish. º',0dh
db 'º º',0dh
db 'º If you have enough memory and the book º',0dh
db 'º "i386/i486 Advanced Programming" you º',0dh
db 'º may set them anywhere and most any size º',0dh
db 'º you wish in the 4 gigabyte + linear º',0dh
db 'º address space available. º',0dh
db 'ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ',0

HELP4:
db ' Edit/Modify 1024K Mem and Kiss Disassembler copyright 1977-1993 '
db '(c) R. Richardson 0123456789ABCDEF Real mode alpha'
db ' ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» '
db 'BEGIN º 000000000000000000000000000000000000000000000000000000000000000 º DSseg'
db '0000 º 00000000000000000000 When you exit EN.EXE 00000000000000000000 º 9000 '
db ' º 00000000000000000000 you will have the 00000000000000000000 º '
db 'MEMORY º 00000000000000000000 the option of going 00000000000000000000 º CSseg'
db '0000 º 00000000000000000000 to real mode EDMOD 00000000000000000000 º 9000 '
db ' º 000000000000000000000000000000000000000000000000000000000000000 º '
db 'VALUE º In Edmod Delete 0000 each page displays 0000 do not use º ESseg'
db '0000 º key will return 0000 1024 bytes of memory 0000 mouse if from º B800 '
db ' º protected mode 0000 in ASCII & extended 0000 protected mode º '
db 'EDIT º 00000000000000000000 ASCII most anywhere 00000000000000000000 º SSseg'
db 'MODE º 000000000000000000000000000000000000000000000000000000000000000 º 9000 '

db ' º 00000000000000000000 zero values are 00000000000000000000 º '
db 'DISAS- º 00000000000000000000 displayed as ASCII 0 00000000000000000000 º SP '
db 'SEMBLY º 00000000000000000000 use mouse only from 00000000000000000000 º FCF6 '
db ' º 00000000000000000000 goedmod.com. 00000000000000000000 º '
db 'HEX º 000000000000000000000000000000000000000000000000000000000000000 º END '
db 'INPUT ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍËÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹ 03FF '
db ' º : Up 1024 bytes º : Move cursor º '
db 'ADD º : Down 1024 bytes º : <- ^ v -> º F1 '
db '[Bx+Si]º : Toggle modify mode º : Change Seg 0 - F º Help '
db 'AL º : Hex modify º Keypad + : Disassemble Memory º '
db ' ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÊÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ ',0

help5:
db 'ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»',0dh
db 'º PROTECTED MODE HELP 5 º',0dh
db 'ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹',0dh
db 'º º',0dh
db 'º CHANGE KEYBOARD (TYPEMATIC) TIME DELAY º',0dh
db 'º º',0dh
db 'º delay subroutine: 4h nominal º',0dh
db 'º º',0dh
db 'º range 1h to 9h press up arrow º',0dh
db 'º more delay º',0dh
db 'º º',0dh
db 'º º',0dh
db 'º value: 6h <-- delay º',0dh
db 'º º',0dh
db 'º uses programmable º',0dh
db 'º interrupt timer º',0dh
db 'º press dn arrow º',0dh
db 'º less delay º',0dh
db 'º º',0dh
db 'ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ',0

help6:
db 'ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»',0dh
db 'º PROTECTED MODE HELP 6 º',0dh
db 'ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹',0dh
db 'º PRINT SCREEN KEY: º',0dh
db 'º º',0dh
db 'º The Print Screen subroutine (prt_scn) º',0dh
db 'º uses port 03bch as the printer data º',0dh
db 'º output port (change it if necessary). º',0dh
db 'º º',0dh
db 'º It is set for an HP LaserJet printer & º',0dh
db 'º will beep twice if printer is not ready.º',0dh
db 'º A single beep sounds if printer got it º',0dh
db 'º after printout is complete. º',0dh
db 'º º',0dh
db 'ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ',0

help2:
db 'HELP 2: : next page page 1 '
db 'ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ '
db 'None of the familiar DOS interrupt functions are available in protected mode '
db 'unless they are created. As such, Intel, Microsoft, Quarterdeck, Phar Lap, '
db 'Borland, Lahey, MetaWare and Watcom keep their protected mode source code in a '
db 'fire-proof safe, in a fire-proof triple-locked room. They would not share '
db 'their source code with their mother. '
db ' '
db 'Phar Lap generously offers an advanced license for their protected mode DOS '
db 'extender for $ 5,000. which allows 2000 copies to be distributed, plus '
db 'royalties for all above that number. '
db ' '
db 'The alternative? Order the excellent book, "i386/i486 Advanced Programming," '
db 'ISBN 0-442-01377-9, from Compubooks (800) 880-6818 and learn how to write '
db 'protected mode assembly language programs yourself. '
db ' '
db 'The source code, EN.ASM is from chapter 3 of this book, modestly supplemented '
db 'by R. Richardson. All the functions to enter and leave protected mode were '
db 'written by the original authors, Shirley Her and S-C. Ro who are with NexGen '
db 'Microsystems. The copyrighted source code from chapter 3 is reproduced with '
db 'the permission of S. Her. All the other routines were written by R. Richardson. '
db 'The mini-keyboard subroutine is just that! A minimum keyboard subroutine. '
db 'A few keys are NOT implemented and display equivalent characters as follows: '
db 'ƒ=tab ›=Caps Lock ¥=Num Lock ë=Scroll Lock =unused keypad Break=¥ or Ctrl '
db 'Please use the keypad on the far RIGHT of the keyboard rather than middle one. '
help2b:
db 'HELP 2: : next page : last page page 2 '
db 'ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ '
db ' '
db 'Keyboard (typematic) repeat delay: '
db 'The keyboard repeat delay is set at (hopefully) optimum for an average typist. '
db 'It may be speeded up or slowed down if you wish via the F5 help key. When '
db 'help 5 is displayed, pressing the up arrow key will increase the keyboard '
db 'repeat time delay or the down arrow key will decrease the repeat time delay. '
db ' '
db 'Testing the size of the GS segment: '
db 'If for some unfathomable reason you wish to test the size of the GS segment, '
db 'press shift + F2 keys. Line 10 on the video screen will display 00000000 which '
db 'is the beginning memory location of the GS segment. Line 12 on the video '
db 'screen will display the bytes in hex beginning at this location. '
db ' '
db 'Now press the F9 key to move up in the GS segment memory. In a few seconds you '
db 'will be over the top of this 65,536 byte segment which generates a "General '
db 'Protection Fault" and sends the program to real mode and exit. The exit '
db 'Interrupt is now interrupt 0DH instead of the the normal interrupt 14H. '
db ' '
db 'Exit options: '
db 'Pressing the Esc key will return to you to real mode where you have 3 options. '
db 'Press N to exit to the DOS> prompt, press Y to go to the real mode`s EDMOD '
db 'program (edit/modify any/all memory), or press Enter to return to protected '
db 'mode with the `type in` screen cleared. '
help2c:
db 'HELP 2: : next page : last page page 3 '
db 'ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ '
db 'The twelve + Help functions are largely self-explanatory as they should be. '
db 'F1 key - HELP 1: general info '
db 'F2 key - HELP 2: These pages '
db 'F3 key - HELP 3: Segment info '
db 'F4 key - HELP 4: Typical EDMOD.OBJ page in monochrome '
db 'F5 key - HELP 5: Speed up or slow down the keyboard`s repeat key time delay '
db 'F6 key - HELP 6: Print Screen info '
db 'F7 key - HELP 7: Pentium microprocessor exception summary '
db 'F8 key - HELP 8: Display all 65,536 bytes of cs, ds, es, fs, or gs segments '
db 'F9 key - HELP 9: Change FS/GS segs start address. It may be from 0000h to F000h'
db 'F10 key-HELP 10: Display control registers, debug registers & flags reg values '
db 'F11 key-HELP 11: Display shift + F1 through shift + F12 keys menu '
db 'F12 key-HELP 12: Display protected mode Interrupt Descriptor Table 21 vectors. '
db ' '
db 'NOTE: If you are using the Microsoft Macro Assembler version 6.0, EN.ASM must be'
db 'assembled with the /Zm directive to emulate the MASM version 5.1 assembler. '
db 'To assemble with MASM 6.0 type: ML /Zm EN.ASM. Other assemblers may not work. '
db ' '
db 'EDMOD.OBJ: (edit/modify/disassemble REAL mode Pentium memory) '
db 'Was first written in 1977 for the TRS-80 model 1 microcomputer. This umpteenth '
db 'version requires at least a 16 color EGA video display. It is an alpha version '
db 'for the Intel Pentium microprocessor operating in real mode, and is only about '
db '50 percent complete. Hopefully, it should be completed by early next year. '
help2d:
db 'HELP 2: : next page : last page page 4 '
db '______________________________________________________________________________ '
db ' '
db 'SPACK POINTER VALUE: '
db 'The stack pointer value is displayed after each keystroke at the bottom right '
db 'corner of the video display. Correct value is EEH. If your program modifications'
db 'display a different value check calls, push, pops, and returns. '
db ' '
db 'SOUND BEEP IN BOTH REAL MODE AND PROTECTED MODE: '
DB 'The beep subroutines in EN.ASM are beep for real mode and beep2 for protected '
db 'mode. One beep on a few functions indicates that the function was accomplished '
db 'correctly. Two beeps on a few functions indicate "file not present" or error. '
db ' '
db 'DISPLAY ALL 256 ALPHANUMERIC LETTERS/SYMBOLS: '
db 'Press shift + F1 to display the alphanumeric letters/symbols at the bottom of '
db 'the screen. Number zero and 255 are displayed as spaces. '
db ' '
db 'DISPLAY ASCII AND EXTENDED ASCII AT CURSOR: '
db 'Press Alt key and then the THREE digits of the character you wish to display at '
db 'the cursor on the KEYPAD from 0 0 0 to 2 5 5. A non-valid character returns to '
db 'normal mini-keyboard decoding. '
db ' '
db 'CLS BOTTOM 21 LINES OF VIDEO DISPLAY: '
db 'Press Alt key and then press the C key or c key. '
db ' ',0
help2e:
db 'HELP 2: : next page : last page page 5 '
db '______________________________________________________________________________ '
db ' '
db ' BIBLIOGRAPHY '
db ' '
db ' RECOMMENDED READING '
db ' '
db 'i386/i486 Advanced Programming - Van Nostrand Reinhold (contents next page) '
db ' '
db 'Pentium Processor User`s Manual Volumes 1, 2, & 3 - Intel '
db ' '
db '80486 Programmer`s Reference Manual - Intel '
db ' '
db '80386 Programmer`s Reference Manual - Intel '
db ' '
db 'Programmer`s Problem Solver for the IBM PC - Brady Books '
db ' '
db 'Macro Assembler Programmer`s Guide version 6.0 - Microsoft '
db ' '
db 'A86 Macro Assembler Reference Manual - Isaacson Software '
db ' '
db 'Programmer`s Guide To PC & PS/2 Video Systems - Microsoft Press '
db ' '
db 'Windows Assembly Language and Systems Programming - Prentice Hall '
db ' ',0
help2f:
db 'HELP 2: : next page : last page page 6 '
db 'ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ '
db ' '
db '"i386/i486 Advanced Programming" by Shirley Her & S-C. Ro: highly recommended '
db ' (chapters 2-11 have assembly language demo programs) '
db ' '
db ' - CONTENTS - '
db 'Preface : '
db 'Introduction: '
db 'Chapter 1: The i386/i486 Architecture '
db 'Chapter 2: Real-Address Mode '
db 'Chapter 3: Protected Mode - Memory Managememt '
db 'Chapter 4: Enter and Leave Protected Mode --> EN.ASM/EN.EXE '
db 'Chapter 5: Protected Mode - Page Programming '
db 'Chapter 6: Protected Mode - Control Transfers '
db 'Chapter 7: Protected Mode - Multitasking '
db 'Chapter 8: Protected Mode - Debugging '
db 'Chapter 9: Protected Mode - Input/Output '
db 'Chapter 10: Protected Mode - Exceptions and Interrupts '
db 'Chapter 11: Virtual-8086 Mode - Programming '
db 'Appendices: Sample i486 Programs '
db ' The i386/i486 Instruction Set '
db ' Assembler and Linker using MASM version 5.1 '
db 'Glossary : '
db 'Index : ',0
help2g:
db 'HELP 2: : next page : last page page 7 '
db '______________________________________________________________________________ '
db ' '
db ' '
db 'MORE INFORMATION REGARDING EDMOD.OBJ IN REAL MODE: '
db ' '
db 'Getting There Fast From Protected Mode: '
db ' '
db 'Pressing the Ctrl key will near instantly switch from protected mode to EDMOD '
db 'in real mode. Upon entering EDMOD, press F1 for the help index. Now press '
db 'F7 to read EDMOD.DOC`s many pages, plus read the other help pages too. '
db ' '
db 'Any time you are in EDMOD in real mode you may near instantly switch back to '
db 'EN.EXE`s protected mode by pressing the Delete key. Write this down so you will'
db 'remember it. Ctrl key to go to EDMOD and Del key to returm to protected mode. '
db ' '
db 'Pressing the Esc key in EDMOD will return you to the DOS> prompt. '
db ' '
db 'EDMOD`s Pentium disassembler function is only partially completed (in EDMOD '
db 'press the keypad`s + key to display the disassembler function on the lower '
db 'left of the video display). Needless to say, to correctly disassemble any '
db 'function in any RAM memory location you MUST start disassembly where the '
db 'function begins. See HELP 2`s page 5 for recommended reading. '
db ' '
db ' ',0
help2h:
db 'HELP 2: : last page page 8 '
db '______________________________________________________________________________ '
db ' '

db 'NONE OF THE FAMILIAR DOS INTERRUPTS ARE AVAILABLE IN PROTECTED MODE: '
db ' '
db 'You have three choices: '
db '1. Write your own DOS equivalent working subroutines. ENE.EXE uses a number '
db 'of equivalent subroutines; i.e., such as displaying a string on video, etc. '
db ' '
db '2. Copy most all of DOS`s interrupt functions/routines to protected mode. This'
db 'is a pain in the fanny and may require 3, 4, or 5 segments memory to hold them. '
db ' '
db '3. Write your protected mode program so that you may (very quickly) exit '
db 'protected mode in a millisecond to real mode, perform the interrupt function '
db 'required in real mode, and then (very quickly) return to protected mode in a '
db 'millisecond with NO fundamental variables/values changed. '
db ' '
db 'This is the way Phar Lap`s $5000 (+ royalties) DOS Extender handles a number of '
db 'interrupt routines. This is the way EN.EXE also handles a number of interrupt '
db 'routines. For example: shift + F3 save the file `TYPED.DAT` plus shift + F4 '
db 'read the file `TYPED.DAT` back into protected memory. Both of these functions '
db 'exit protected mode to real mode, do their INT 21H work, and then return to '
db 'protected mode. There is no point in re-inventing the wheel. '
db ' '
db ' - end - ',0
help7:
db 'ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»',0dh
db 'º PENTIUM EXCEPTION SUMMARY HELP 7 º',0dh
db 'ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹',0dh
db 'º description + protected beep number º',0dh
db 'º º',0dh
db 'º divide error 0 º',0dh
db 'º debug exception 1 º',0dh
db 'º none 2 º',0dh
db 'º breakpoint 3 º',0dh
db 'º overflow 4 º',0dh
db 'º bounds check 5 º',0dh
db 'º invalid opcode 6 º',0dh
db 'º segment not present 7 º',0dh
db 'º double fault 8 º',0dh
db 'º coprocessor segment overrun (80386) 9 º',0dh
db 'º invalid Task State Segment 0AH 10 º',0dh
db 'º segment not present 0BH 11 º',0dh
db 'º stack exception 0CH 12 º',0dh
db 'º general protection 0DH 13 º',0dh
db 'º page fault 0EH 14 º',0dh
db 'º none 0FH 15 º',0dh
db 'º floating-point error 10H 16 º',0dh
db 'º alignment check 11H 17 º',0dh
db 'º machine check 12H 18 º',0dh
db 'ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ',0

FRAME2:
db ' DISPLAY ALL OF DS SEGMENT '
db ' '
db ' ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» '
db 'BEGIN º º DSseg'
db '0000 º º 1AC1 '
db ' º º '
db ' º º '
db ' º º '
db ' º º '
db ' º º '
db ' º º '
db ' º º '
db ' º º '
db ' º º '
db ' º º '
db ' º º '
db ' º º '
db ' º º '
db 'ESC º º END '
db 'EXIT ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍËÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹ 03FF '
db ' º : Up 1024 bytes º : Diz DS Segment º '
db ' º : Down 1024 bytes º : Diz ES Segment º '
db ' º º : Diz FS Segment º '
db ' º : Diz CS Segment º : Diz GS Segment º '
db ' ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÊÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ ',0
help9:
db 'ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»',0dh
db 'º PROTECTED MODE HELP 9 º',0dh
db 'ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹',0dh
db 'º CHANGE FS OR GS SEGMENT: º',0dh
db 'º º',0dh
db 'º press f key for FS or g key for GS seg º',0dh
db 'º º',0dh
db 'º set seg start value from 0000h to F000h º',0dh
db 'º º',0dh
db 'º up arrow º',0dh
db 'º add 1000h º',0dh
db 'º º',0dh
db 'º GS segment 9000h start address º',0dh
db 'º º',0dh
db 'º dn arrow º',0dh
db 'º sub 1000h º',0dh
db 'º º',0dh
db 'º º',0dh
db 'ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ',0
help10:
db 'ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»',0dh
db 'º PROTECTED MODE HELP 10 º',0dh
db 'ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹',0dh
db 'º º',0dh
db 'º Current control - debug - flags registers values º',0dh
db 'º º',0dh
db 'º control register CR0 = system control flags º',0dh
db 'º control register CR2 = page fault address º',0dh
db 'º control register CR3 = page directory base º',0dh
db 'º debug register DR0 = breakpoint 0 address º',0dh
db 'º debug register DR1 = breakpoint 1 address º',0dh
db 'º debug register DR2 = breakpoint 2 address º',0dh
db 'º debug register DR3 = breakpoint 3 address º',0dh
db 'º debug register DR6 = status register º',0dh
db 'º debug register DR7 = control register º',0dh
db 'º eflags register = 16 bit mode º',0dh
db 'º bit 15 undefined º',0dh
db 'º º',0dh
db 'ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ',0
FRAME3:
db 'HELP WELCOME TO PROTECTED MODE DEMO '
db ' '
db ' F1 press any key to continue '
db ' ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»'
db ' F2 º º'
db ' º The fully commented source code EN.ASM which is included in the º'
db ' F3 º file PROTEC.ZIP will give newcomers to protected mode progamming an º'
db ' º excellent primer on entering protected mode, exiting protected mode º'
db ' F4 º to real mode, and then returning to protected mode. º'
db ' º º'
db ' F5 º The real mode program EDMOD.OBJ was first written in 1977 for the º'
db ' º Radio Shack TRS-80 Model 1 microcomputer and has been updated every º'
db ' F6 º few years since. It will allow you to edit/modify any/all RAM memory º'
db ' º from segment zero through the top of segment F000H. In essence it is º'
db ' F7 º a different approach to debugging and disassembling instructions. º'
db ' º º'
db ' F8 º To switch to EDMOD in real mode (after this page is displayed), º'
db ' º press the Ctrl key. To switch back to this program in protected mode º'
db ' F9 º while in EDMOD press the Del key. The program and mode switching º'
db ' º are almost instantaneous. º'
db ' F10 º º'
db ' º The Esc key in either program will allow you to return to the º'
db ' F11 º DOS> prompt. Please read the F1 to F12 key accessed Help routines. º'
db ' ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ'
db ' F12',0
help11:
db 'ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»',0dh
db 'º PROTECTED MODE HELP 11 º',0dh
db 'ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹',0dh
db 'º º',0dh
db 'º SHIFT F1 THRU SHIFT F12 MENU: º',0dh
db 'º º',0dh
db 'º shift F1 display all 256 characters º',0dh
db 'º shift F2 test GS seg overrun fault º',0dh
db 'º shift F3 write `typed.dat` file º',0dh
db 'º shift F4 read `typed.dat` file º',0dh
db 'º shift F5 display VGA graphics page º',0dh
db 'º shift F6 for your use as desired º',0dh
db 'º shift F7 " º',0dh
db 'º shift F8 " º',0dh
db 'º shift F9 " º',0dh
db 'º shift F10 " º',0dh
db 'º shift F11 " º',0dh
db 'º shift F12 " º',0dh
db 'º º',0dh
db 'ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ',0
help2s:
db 'ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»',0dh
db 'º INTERRUPT DESCRIPTOR TABLE: º',0dh
db 'ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹',0dh
db 'º 1: This is º',0dh
db 'º 2: fascinating º',0dh
db 'º 3: skulduggery º',0dh
db 'º 4: since the FS º',0dh
db 'º 5: segment must º',0dh
db 'º 6: be reset to º',0dh
db 'º 7: segment zero º',0dh
db 'º 8: where the º',0dh
db 'º 9: interrupt º',0dh
db 'º 10: table º',0dh
db 'º 11: resides. º',0dh
db 'º 12: º',0dh
db 'º 13: 1. FS is reset. º',0dh
db 'º 14: 2. Millisecond º',0dh
db 'º 15: exit protected º',0dh
db 'º 16: & reset protect. º',0dh
db 'º 17: 3. IDT diplayed. º',0dh
db 'º 18: 4. Reset FS seg. º',0dh
db 'º 19: 5. Millisecond º',0dh
db 'º 20: exit protected º',0dh
db 'º 21: & reset protect. º',0dh
db 'ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ',0

farproc dd ? ;EDMOD far jump address
db 7100h dup(0) ;was db 7000h
db 64 dup(20h)
db 'this is the end of protected mode data in the data segment'
db 64 dup(20h)
db 'STACK SEGMENT ENDS --------------->'
Gdata_limit equ $

Gdata ends




  3 Responses to “Category : Assembly Language Source Code
Archive   : PROTEC.ZIP
Filename : MACRO3

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/