⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 removemostjunkfrompdf.frm

📁 可以输入PC下编译的软件
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   3195
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   ScaleHeight     =   3195
   ScaleWidth      =   4680
   StartUpPosition =   3  'Windows Default
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()
    ' Copied the instruction set part from the intel.com PDF into a text file
    ' Then this file cuts out all the rubbish
    
    ' First I replaced some Unicode characters with =
    
    On Error Resume Next
    Dim tmp As String, tmp2 As String
    Dim tmpVal As Long
    
    
    
    ' Cut off most junk
    Open "Original Dump.txt" For Input As #1
    Open "Temp.txt" For Output As #2
    Do
        Line Input #1, tmp
        If tmp = "Opcode Instruction Description" Then
            Do
                Line Input #1, tmp
                If Left(tmp, 2) = "3-" Or Left(tmp, 8) = "Table 3-" Then
                    Exit Do
                Else
                    Print #2, tmp
                End If
            Loop
        End If
    Loop Until EOF(1)
    Close #1
    Close #2
    
    
    
    DoEvents
    
    
    
    ' Append some lines back together
    Open "Temp.txt" For Input As #3
    Open "Temp2.txt" For Output As #4
    Do
        Line Input #3, tmp
        'If Left$(tmp, 11) = "66 0F 58 /r" Then Stop
        tmpVal = CLng("&H" & Left$(tmp, 2))
        If Err <> 13 And Mid$(tmp, 3, 1) = " " Then
            Print #4, ""
        Else
            Err = 0
        End If
        Print #4, tmp;
    Loop Until EOF(3)
    Print #4, ""
    Close #3
    Close #4
    
    
    
    DoEvents
    
    
    
    ' Add Tabs to seperate stuff & gible
    Open "Temp2.txt" For Input As #5
    Open "Opcode List.txt" For Output As #6 ' Trim off some stuff by hand in the Description area
    Do
        Line Input #5, tmp
        For I = 3 To Len(tmp) Step 3
            If Mid$(tmp, I, 1) = "+" Then ' Register numbers
                tmp = Left$(tmp, I - 1) & " " & Mid$(tmp, I)
                I = InStr(I + 1, tmp, " ")
            ElseIf Mid$(tmp, I, 1) = "/" Then
                I = InStr(I, tmp, " ")
            ElseIf Mid$(tmp, I, 1) <> " " Then ' Description parts start
                Print #6, Left$(tmp, I - 3 - 1) & Chr$(9) & Mid$(tmp, I - 3 + 1)
                Exit For
            'ElseIf Mid$(tmp, I, 1) = " " Then ' Check for 2 letter named commands
            '    Err = 0
            '    tmpVal = CLng("&H" & Trim$(Mid$(tmp, I, 3)))
            '    If Err.Number = 13 Then
            '        Print #6, Left$(tmp, I - 3 - 1) & Chr$(9) & Mid$(tmp, I - 3 + 1)
            '        Exit For
            '    End If
            End If
        Next I
    Loop Until EOF(5)
    Close #5
    Close #6
    
    
    
    Kill "Temp.txt"
    Kill "Temp2.txt"
    End
    ' Manual adjustments needed afterwards - Tab positions mainly
    ' Check small codes - BT, IN, JP, OR ...
    ' Then rename to '.info'
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -